IRC logs for #openttd on OFTC at 2026-08-31
β΄ go to previous day
00:03:20 *** aperezdc has joined #openttd
00:29:28 *** aperezdc has quit IRC (Ping timeout: 480 seconds)
00:33:18 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
00:38:18 *** MinchinWeb[m] has joined #openttd
00:39:50 *** aperezdc has joined #openttd
01:26:11 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
01:26:58 *** MinchinWeb[m] has joined #openttd
01:39:07 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
01:39:40 *** MinchinWeb[m] has joined #openttd
02:12:50 *** WormnestAndroid has quit IRC (Remote host closed the connection)
02:12:54 *** WormnestAndroid has joined #openttd
03:43:29 *** Flygon has quit IRC (Read error: Connection reset by peer)
03:49:43 *** Philemon has joined #openttd
03:53:03 *** Phileman has quit IRC (Ping timeout: 480 seconds)
04:27:07 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
04:28:17 *** MinchinWeb[m] has joined #openttd
05:03:40 *** tokai|noir has joined #openttd
05:03:40 *** ChanServ sets mode: +v tokai|noir
05:10:27 *** tokai has quit IRC (Ping timeout: 480 seconds)
05:52:37 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
06:48:53 *** Philemon has quit IRC (Ping timeout: 480 seconds)
06:54:50 *** Philemon has joined #openttd
06:55:22 <andythenorth> could we support a GS function that returns how many water tiles are connected to a water tile at (x,y)?
06:55:30 <andythenorth> or would that be non-performant?
06:56:03 <andythenorth> alternately, whether we can pathfind from a water tile to map edge
06:56:13 <andythenorth> but the might be pathological with some maps
08:25:47 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
09:08:47 <kuhnovic> Shouldn't be that bad as long as we put a distance limiter on it. Can be a simple breadth first search.
09:09:24 <kuhnovic> Are you trying to snap industries to the nearest coast tile?
09:16:23 <peter1138> I'm in favour of making the GS do it itself.
09:16:56 <peter1138> We end up with performance issues when we make a complex task look like a simple function call.
09:19:48 <peter1138> And if this is for industry-placement then it would be better to have industry placement rules.
09:28:58 <andythenorth> kuhnovic: trying to prevent them appearing in small lakes at map gen time
09:29:10 <andythenorth> which can be done by post-hoc deleting them in GS at game start
09:43:01 <andythenorth> it's not ideal, but every other option so far was shot down
09:44:34 <kuhnovic> The water regions don't currently track the size of each patch of interconnected water within them. Adding this wouldn't be too difficult, and that would give you something that's quite perfomant since it doesn't have to check anything at tile level.
09:45:11 <andythenorth> that would be nice
09:45:30 <andythenorth> ideas like that have previously been rejected because player can terraform
09:45:35 <andythenorth> which changes the water region
09:45:57 *** reldred has joined #openttd
09:45:57 <reldred> I think you only really need to worry about game creation
09:46:10 <andythenorth> it wasn't me rejecting them π
09:46:11 <peter1138> "shot down" and "rejected" are I think possibly imaginary.
09:46:11 <reldred> after all players can spawn industries themselves as well and you cant stop stupid
09:46:38 <andythenorth> "edge cases were identified by some people who are not here"
09:48:02 <kuhnovic> Water regions only get calculated when they are marked as invalid (dirty if you will). So as long as you don't do any terraforming in between you should be ok.
09:49:17 <kuhnovic> That being said, every water region will have be initialized at least once, which means iterating over the entire map (worst case) checking for interconnected water tiles. So at that point you could argue that it might be more appropriate for the GS to do it.
09:49:51 <andythenorth> it's expensive to do that in game for basically one industry grf
09:50:54 <_zephyris> My unrequested 2c, water pathfinding is _way_ more efficient now. Worth a test 'pathfind to map edge' to see if it's actually a performance concern?
09:51:32 <_zephyris> Might need to expose it as an industry flag rather than callback variable, to avoid silly things like production callbacks depending on access to the map edge
09:52:09 <andythenorth> tile var I think
09:52:20 <andythenorth> placement cb only
09:53:38 <andythenorth> might be too expensive though, placements are tested a lot by random placer?
10:06:31 <_zephyris> I haven't looked at the code... More efficient to do it backwards, right? For industries which must connect by water to the map edge, pick a random edge tile and ray cast until it hits land.
10:42:23 <peter1138> Half-baked comment :D
10:43:06 <peter1138> So this is placement rules for objects, to allow the hardcoded rules to be generalised and re-used.
10:43:43 <peter1138> Industry placement rules could be something similar for industries.
10:52:16 <andythenorth> these are the tile rules for 2F, not the cb 28 rules
11:12:36 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
11:12:52 *** WormnestAndroid has joined #openttd
11:12:54 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
11:12:56 *** WormnestAndroid has joined #openttd
11:13:09 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
11:14:30 *** WormnestAndroid has joined #openttd
11:14:41 *** WormnestAndroid has quit IRC (Remote host closed the connection)
11:14:58 *** WormnestAndroid has joined #openttd
11:15:00 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
11:15:01 *** WormnestAndroid has joined #openttd
11:19:55 <peter1138> Doxygen strikes again :p
11:28:34 <peter1138> What object sets support map-gen spawning?
11:31:20 <peter1138> FIRS has objects but I don't know if they are meant to spawn.
11:36:11 <peter1138> Chujo's deserts still works, so must be fine :D
11:58:26 <_zephyris> Not many AFAIK, because spawning ~~is~~ was clunky.
12:04:36 <peter1138> Okay, anyone got a town data json file for me to test.
12:29:44 <talltyler> There should be an example data set in my PR, assuming GitHub doesn't delete PR attachments after they've been merged.
12:32:00 <peter1138> Assuming I know where that is :D
12:51:03 <andythenorth> peter1138: They donβt spawn
12:55:19 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
12:55:21 *** WormnestAndroid has joined #openttd
12:55:22 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
13:06:35 *** alone22wolf has quit IRC (Quit: User went offline on Discord a while ago)
13:15:41 *** WormnestAndroid has joined #openttd
14:21:59 <peter1138> Documenting iterators.
14:51:14 <DorpsGek> - Add: summary for week 35 of 2026 (by OpenTTD Survey)
15:18:31 *** TSM has quit IRC (Quit: Page closed)
16:05:24 *** gelignite has joined #openttd
16:19:52 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
16:25:46 *** SigHunter has joined #openttd
16:35:06 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
16:36:20 <andythenorth> should forests plant trees or something? π
17:27:12 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:27:16 *** WormnestAndroid has joined #openttd
17:33:52 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:33:54 *** WormnestAndroid has joined #openttd
17:34:08 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:50:40 <mnhebi> tbh I always liked the tropical lumbercamp more.
17:51:01 <mnhebi> had to keep the area forested or you got nothing
17:52:38 *** WormnestAndroid has joined #openttd
18:13:49 <will_marshall_> Doxygen is a harsh mistress?
18:19:01 <will_marshall_> So I have this view that `auto` is best used when the right hand side of the assignment operator includes the typename, and I try to discourage my engineers from using `auto` otherwise because the way I read code means that I care a lot about the types. Am I stuck in the past? Should I get with the times, grandpa?
18:20:29 <will_marshall_> ```auto *thing = ResolveReference<ThingPointedTo>(container); // Yes
18:20:29 <will_marshall_> auto *thing = &Variable; // no```
18:22:09 <will_marshall_> I probably inherited this from the coding standard my lead programmer had written when I started writing C++ professionally...
18:29:32 <peter1138> will_marshall_, I have the some opinion mostly, but apparently ignored it here.
18:30:15 <will_marshall_> You're porting code that's previously approved, I don't blame you for not scrutinizing it with a fine tooth comb.
18:30:31 <will_marshall_> But yes that was sort of my comment though I wasn't going to leave it formally π
18:30:52 <LordAro> i run into `auto foo = 7` semi regularly at work. it makes me sad
18:31:01 <peter1138> I mean, not really, this is new code I wrote.
18:31:02 <LordAro> (and no, it's not the old C definition)
18:31:40 <will_marshall_> `auto foo = 7L` just to really cost the next guy some brain time thinking about it.
18:32:04 <peter1138> What about the `std::optional<TileIndex>` return. Hmm
18:34:24 <will_marshall_> tileindex has a valid "none" value already, right?
18:40:57 <peter1138> will_marshall_, you should've started your unpaid code review process earlier ;-)
18:42:44 <will_marshall_> Ehhhhh, look I will probably forever have this weird feeling that I'm muscling in on other people's turf when I do code review here. I don't want to just show up with a load of preconceptions from years of making Train Simulator and make a nuisance of myself.
18:43:02 <will_marshall_> So for the time being I'll snipe from the sidelines instead, thus being even more annoying π
18:43:52 <peter1138> Honestly, it is appreciated.
18:44:23 <peter1138> And yes, the doxygen rules are harsh but worth it.
18:45:11 <peter1138> If it's difficult to write, then it would be difficult to figure out what a function/class does.
18:46:31 <peter1138> Tediousness is just tediousness.
18:46:50 <will_marshall_> A few times a year I have a conversation with my boss about presubmit hooks where we could validate code. Mostly, I knock them back on the basis that a check that validates the presence of documentation doesn't validate the currency of documentation.
18:47:39 <will_marshall_> I think if you're going to mandate every method has a doxygen compliant comment, your review process needs to include an explicit "does the comment still match the function as written"
18:47:57 <will_marshall_> i.e you need wetware to account for the fact that the comment can diverge from the code.
18:48:08 <will_marshall_> an incorrect comment is worse than no comment at all.
18:48:34 <peter1138> Sure. At least if the parameters change we get told off for not updating it.
18:49:05 <will_marshall_> Yeah, the params changing is at least obvious but when the contract/semantics change it really can be a landmine.
18:49:39 <will_marshall_> I think doxygen is a worthwhile nag but I don't implement it on any of my own projects.
18:49:44 <will_marshall_> Might change that.
18:50:03 <andythenorth> it's good to have a bit more review chat IMHO
18:50:19 <andythenorth> balances out the endless pixels
18:50:26 <will_marshall_> It's very hard to have unproductive review chat, is my view.
18:51:04 <will_marshall_> It's actually really great just to know what other people are focusing on and see the code go past.
18:51:53 <will_marshall_> I'm on the tail end of a 4 day weekend and I'm sad that I have to go back to work tomorrow so I'm giving lots of undue focus to my side interests π
18:52:48 <andythenorth> hmm lunch though?
18:53:07 <will_marshall_> Bit late. Personally thinking about putting the air fryer to work.
18:54:14 <will_marshall_> (haha, looking at this PR is my first time seeing a C++17 structured binding in the wild)
18:54:21 <_jgr_> At one point at a project I was on at work was encouraging mandatory method documentation and the like and the results seemed very poor to me
18:54:29 <_jgr_> Lots of useless comments which stated the obvious
18:54:58 <will_marshall_> Yeah, in an ideal world the method name/parameter names are sufficient to document the method's function.
18:55:21 <andythenorth> 14 industry IDs left in FIRS
18:55:24 <will_marshall_> If the structure of the project overall makes writing descriptive names impossible you've already failed for some other reason.
18:55:45 <andythenorth> not sure if I can reuse ids per economy, due to nml internal constant resolution
18:55:47 <will_marshall_> Andy you want more coastal industries to ruin performance?
18:56:07 <andythenorth> actually deleted 1 π
18:56:21 <will_marshall_> Meh you already deleted nuclear you're dead to me π
18:56:30 <andythenorth> campaign for 128 cargos
18:56:40 <will_marshall_> Robbing me of the pleasure of modellning an FNA
18:56:48 <andythenorth> decided they would be boring
18:57:27 <will_marshall_> 2x coal sector class 31s with a pair of FNAs.
18:57:34 <andythenorth> that's it, that's the entire grf
18:57:46 <andythenorth> mail, pax, nuke fuel, nuke waste, greenpeace
18:58:13 <will_marshall_> new SHARK vessel: MY Steve Irwin
18:58:36 <will_marshall_> (it's a good looking boat, don't @ me)
20:03:34 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:03:43 *** WormnestAndroid has joined #openttd
20:06:09 <peter1138> Hmm, tempted to do the Randomizer stuff separate and then use it elsewhere.
20:26:50 *** jfs_ has quit IRC (Ping timeout: 480 seconds)
20:32:29 <peter1138> Oh, right, the implementation of shuffle might not be the same. Crap. :(
20:58:06 *** Smedles has joined #openttd
21:19:30 *** MinchinWeb[m] has joined #openttd
21:21:12 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:27:32 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
21:27:59 *** MinchinWeb[m] has joined #openttd
22:47:49 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
22:47:52 *** MinchinWeb[m] has joined #openttd
23:52:29 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
23:52:44 *** MinchinWeb[m] has joined #openttd
continue to next day β΅