IRC logs for #openttd on OFTC at 2024-10-22
⏴ go to previous day
01:44:42 *** Wormnest has quit IRC (Quit: Leaving)
02:45:12 *** gnu_jj_ has joined #openttd
02:48:36 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:00:03 *** godbed_ has quit IRC (Ping timeout: 480 seconds)
03:00:03 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:44:20 *** D-HUND is now known as debdog
04:47:34 <DorpsGek> - Update: Translations from eints (by translators)
05:58:39 *** HerzogDeXtEr has joined #openttd
08:00:36 *** Flygon has quit IRC (Remote host closed the connection)
08:43:02 <merni> PeterNviaGitHub: > ### No suitable AI can be found:
08:43:02 <merni> > If you have no AIs and an AI is started the so-called 'dummy' AI will
08:43:02 <merni> > be loaded. This AI does nothing but writing a message on the AI debug
08:43:02 <merni> > window and showing a red warning.
08:43:04 <merni> Why does this even qualify as a "bug"?
08:44:31 <peter1138> Bug: my coffee is cold.
08:45:37 <kuhnovic> So was mine. I downed it and I'm making a new one.
08:46:08 <peter1138> This was a new one. I forgot to put the kettle on.
08:46:22 <peter1138> I think I'm going senile... already.
08:47:16 <kuhnovic> Some people would just market that as cold brew
08:47:52 <kuhnovic> It's a chicken-egg-problem. You needed that coffee to remember to put the kettle on.
08:50:36 <andythenorth> what cargo class is the egg?
08:50:45 <andythenorth> chicken is easy enough
08:51:24 <kuhnovic> Depends on whether it was fertilized I guess
08:51:35 <kuhnovic> Better add a label for that
08:51:36 <andythenorth> are eggs food-grade?
08:52:07 <andythenorth> hmm ok so nml arbitrary constants, that's custom_tags.txt?
08:52:38 <peter1138> No, it's "const X = Y" in your .nml file.
08:52:45 <peter1138> (Or something, I don't actually know)
08:53:17 <peter1138> `const default_palette = PALETTE_USE_DEFAULT;`
08:53:36 <andythenorth> custom_tags.txt is maybe strings only
08:53:41 <andythenorth> never understood it
08:55:33 <peter1138> custom_tags is strings-only, yes.
08:55:54 <Rubidium> merni: known-bugs is there more to prevent people from reporting the same perceived issues over and over again. So it's basically what enough people have considered a bug, but we do not consider a bug in OpenTTD
08:56:05 <andythenorth> presumably custom_tags is quite useful for translated lang files
08:56:35 <merni> Rubidium: Fair enough. In that case perhaps "I can't find block signals" should be added there :)
08:56:57 <andythenorth> ok so I could do `const CC_FLATBED = CC_OVERSIZED`
08:57:05 <andythenorth> or more practically, just the bit number
08:57:19 <andythenorth> but currently I just write the bit numbers directly into the nml 😛
09:18:02 <peter1138> It's okay, consts are a relatively new feature of NML.
09:22:27 <LordAro> merni: it's not a particularly well curated list
09:22:54 <andythenorth> so I could distribute consts in a file, intended to be included
09:36:41 <peter1138> I'm willing to bet that most people never look at known bugs.
09:51:36 <kuhnovic> I just picked up my coffee mug, looked into it and wondered to myself "when did I drink this?"
11:23:57 *** johnfranklin has joined #openttd
11:23:57 <johnfranklin> ate lunch. still not full.
12:00:57 <kuhnovic> Should have noticed the first time I looked at it, sorry
12:14:10 <xarick> i fail at this flooding shennanigans
12:31:21 <peter1138> (Btw I noticed that the original string formatting was hardcoded to 16 too :))
12:31:34 <peter1138> Well, the array size.
12:35:22 <kuhnovic> Do you want to make this code better or what 😛?
12:36:53 <kuhnovic> Now Xarick can change the region size to his heart's content
12:37:24 <peter1138> As long as it's not half the map size.
12:38:10 <peter1138> I'm sure I've played on a 16x16 map at some point 🙂
12:39:43 <xarick> I give up on the water flooding
12:39:51 <xarick> not enough patience atm
12:41:21 <xarick> until I understand what the hell stuff is supposed to do, I won't go anywhere
12:42:35 <peter1138> It is supposed to reduce the number of water tiles that continue flooding.
12:42:40 <peter1138> It achieves that aim.
12:44:29 <xarick> yes, but I am unable to follow it
12:45:03 <johnfranklin> Should we fix a BAD FEATURE
12:45:29 <johnfranklin> new vehicles coming up to 2 years later than their introduction dates
12:46:27 <_jgr_> xarick: It is much more simple than you are trying to make it
12:48:42 <_jgr_> The point is to use a fast path to efficiently handle the common, trivial case
12:49:24 <_jgr_> False negatives are perfectly fine and can be handled by the main path
13:00:10 <xarick> water regiones let's go
13:02:33 <xarick> btw why is label 0 represented by a .
13:03:16 <xarick> traversability bits say 0
13:04:06 <peter1138> Because it's easier to distinguish.
13:06:52 <xarick> taversability bits could say . too :p
13:07:34 <peter1138> But those are only 0 or 1, not 0-255.
13:11:46 <xarick> TileAddXY still crashes with larger traversability bits
13:11:55 <xarick> but that's something rubidium is taking care of
13:15:04 <peter1138> easy to fix, `assert_compile(WATER_REGION_EDGE_LENGTH < MIN_MAP_SIZE / 2)`
13:17:16 <peter1138> Yes, static_assert.
13:30:21 <xarick> GetTileIndexFromLocalCoordinate
13:33:03 <xarick> `const auto label = this->GetLabel(GetTileIndexFromLocalCoordinate(GetWaterRegionX(this->tile_area.tile), GetWaterRegionY(this->tile_area.tile), x, y));`
13:33:40 <xarick> oh, identifier not found
13:39:12 <xarick> const auto label = this->GetLabel(TileXY(TileX(this->tile_area.tile) + x, TileY(this->tile_area.tile) + y));
13:39:19 <xarick> circunvented the assert
13:42:53 <xarick> btw center tile of an area already exists
13:58:39 <xarick> GetCenterTile uses TileAdd...
14:11:36 *** MnHebi_ has joined #openttd
14:11:48 <xarick> code style issue detected
14:16:23 <xarick> `this->GetLocalIndex(tile)`
14:58:24 <xarick> how to... english commit message
15:01:37 <xarick> is this okay or too many changes or...
15:02:31 <kuhnovic> Not that many changes tbh
15:10:33 <kuhnovic> Peter got me inspired
15:11:45 <_jgr_> At the risk of being a contrarian, the name/code style is not the biggest problem with it 😛
15:13:06 <xarick> I waste 30 minutes writing the PR message
15:14:39 <xarick> number_of_patches -> highest_patch_label maybe?
15:21:27 <peter1138> _jgr_: But fixing the code style can help identify the issues as it'll improve readability.
15:22:46 <peter1138> Although HashTable to HashTable indeed.
15:28:04 <_jgr_> It's more that I was expecting it to disappear outright, given the focus on removing similar types of late
15:31:03 <kuhnovic> That might happen eventually, but until this time at least we can make it a bit prettier 🙂
15:31:40 <kuhnovic> I guess I could have a look at what you did JGR, with the robin_map. Do some performance comparison.
15:33:08 <kuhnovic> I did that quite a while ago with a unordered_map, and that's not an improvement (kind of expected that)
15:33:33 <peter1138> If it's not an improvement, but also not worse, then that's still worth doing.
15:35:30 <kuhnovic> It is worse, by quite a bit
15:36:45 <kuhnovic> Between 10%-30% depending on map size. But quite a bit worse. This was on windows, the results might differ quite a bit for other platforms.
15:57:13 <xarick> oh snap, i failed somewhere
16:26:58 <xarick> that script_road.cpp part is witchcraft!
16:28:06 <xarick> it is heavily used by road pathfinder btw
16:33:53 <xarick> like... every neighbour visiting
16:50:18 <xarick> well my AI is building roads fine
16:56:16 <xarick> ` * @param existing An array with the existing neighbours in the same format
16:56:16 <xarick> * as "start" and "end", e.g. ScriptMap.GetTileIndex(0, 1).
16:56:16 <xarick> * As a result of this all values of the existing array
16:56:16 <xarick> * must be of type integer.
16:57:26 <xarick> but you changed to TileIndex
16:58:19 *** MnHebi_ has quit IRC (Quit: Going offline, see ya! (www.adiirc.com))
17:00:03 <xarick> how does a script pass an array
17:15:53 <xarick> i could pass an array of GSMap.GetTileIndex
17:20:59 <xarick> relative tile, i failed
17:22:43 <xarick> `GSLog.Info(GSRoad.CanBuildConnectedRoadParts(GSTile.SLOPE_FLAT, stuff, GSMap.GetTileIndex(1, 0), GSMap.GetTileIndex(-1, 0)));`
17:25:26 <peter1138> GetTileIndex seems a weird choice there.
17:28:35 <xarick> it's our TileIndexDiff
17:29:30 <xarick> reuses that function for the purpose
17:33:27 <andythenorth> silly Horse, this will cause a mostly-unrefittable vehicle 🙂 `self.class_refit_groups = ["covered_hopper_freight_non_food_grade", "covered_hopper_freight_food_grade"]`
17:58:10 <_glx_> something feels wrong in saveload stuff peter1138
18:00:40 <peter1138> I'll turn #13021 into a draft, I need to investigate but going out.
18:00:43 <_glx_> ah no it's fine, RAIL chunk is actually unchanged on disk, and ROTT is added
18:04:55 *** Wormnest has joined #openttd
18:23:58 <peter1138> Ok the basics work but the UI list is a bit weird. Maybe it's just missing being refreshed.
18:25:15 <peter1138> And yes, I started with templating things to reduce duplication but it's subtly different with the subtype
18:25:41 <peter1138> Needed lots of template parameters 🙂
18:59:24 <ian01223> so it turns out factorio and the DLC costs like £5 less if you buy it through their website, and it even gives you a steam key if you want it
18:59:39 <ian01223> ...one steam refund and repurchase later...
19:01:24 <dwfreed> I wonder if they do something different in UK ? in the US, it's the same price, but the store is run by humble bundle, so they probably take a cut
19:02:27 <dwfreed> it's 35 USD regardless of website or Steam (website still gives steam key, of course)
19:30:28 <ian01223> same store, humble bundle, and I note that's the place where you get it for less
19:30:34 <ian01223> it's on steam where it costs more
19:30:51 <ian01223> though I did see other people say it was the same for them in other countries
19:30:56 <ian01223> I think it's just a UK thing
19:31:08 <ian01223> the same price between the two countries, that is
19:32:21 <ian01223> something to do with steam's regional pricing, I imagine
19:33:52 <johnfranklin> Why steam costs more than epic?
19:34:39 <peter1138> Nobody wants to use Epic
19:35:07 <_glx_> my epic library is mostly thursday giveaways
19:35:42 <peter1138> Same, though I stopped looking years ago.
19:48:10 <dwfreed> ian01223: what is the website price in pounds? 25?
19:49:59 <dwfreed> okay, so that lines up with conversion rates to the steam euro and usd prices, give or take
19:51:42 <ian01223> but on steam in gbp it's £30, or £3.14 more
19:51:49 <dwfreed> yeah, I see that in steamdb
19:52:02 <dwfreed> guessing what's happening is the steam price made sense to be 30 pounds at some point in the past, and it's never been adjusted because they just don't adjust the price
19:52:28 <dwfreed> but humble bundle is auto-converting to pounds from some other currency, either euro or usd
19:57:57 <peter1138> But discounted if you have the membership stuff
19:58:22 <dwfreed> probably their store page is just set to match the steam pricing, vs the own-website widget
20:05:20 *** akimoto has joined #openttd
20:06:45 *** akimoto has quit IRC (Remote host closed the connection)
20:21:31 <_glx_> kuhnovic: replace `typedef` with `using` while at it ?
20:22:22 <kuhnovic> I'm planning on making a bunch of changes to the hashtable after this PR. I want to stick to renaming for this one.
20:56:47 <peter1138> Ah, okay, rail/road types are update, just if a build road/rail toolbar is open then it is not refreshed.
21:04:42 <xarick> CoPilot thx for the commit message
21:09:37 <peter1138> Using "AI" assistants is against TOS.
21:14:33 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:19:43 <peter1138> (In my made up world that is )
21:20:42 <LordAro> peter1138: there are certain areas where they're an improvement
21:23:43 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:36:46 <xarick> time to test dumb stuff
21:39:48 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:41:52 *** Tirili has quit IRC (Quit: Leaving)
21:42:49 <xarick> there's a missing information part
21:51:47 *** ChanServ sets mode: +v tokai
21:58:44 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:08:13 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:50:27 <peter1138> Okay, that was ... a few things.
continue to next day ⏵