IRC logs for #openttd on OFTC at 2025-01-19
            
00:10:36 <xarick> okay bed time, got no time
00:19:59 *** gelignite has quit IRC (Quit: Stay safe!)
00:26:53 <_glx_> xarick: if you think about what void tiles are (all around the map) the answer is 1 void can have max 2 void neighbours
00:59:29 *** Flygon has joined #openttd
03:12:39 *** Wormnest has quit IRC (Quit: Leaving)
03:24:09 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone opened pull request #13332: Fix #12987: Historical houses always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332
03:27:33 *** D-HUND has joined #openttd
03:31:05 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:52:39 *** gnu_jj has joined #openttd
03:55:46 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:03:21 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #13332: Fix #12987: Historical houses always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332#pullrequestreview-2560844828
04:16:26 <goddess_ishtar> amending and force-pushing to a pull request is safe, right?
04:17:21 <goddess_ishtar> oh wait, I should have used rebase and squash, shouldn't I
04:35:08 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone updated pull request #13332: Fix #12987: Historical houses always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332
04:35:53 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone commented on pull request #13332: Fix #12987: Historical houses always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332#issuecomment-2600591149
04:41:12 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/00367aa39132dde866b8d91c1e009d49a6e350e0
04:41:13 <DorpsGek> - Update: Translations from eints (by translators)
05:12:12 *** keikoz has joined #openttd
08:21:08 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330451971286765640/image.png?ex=678e0774&is=678cb5f4&hm=9abcfa8b69b70dd86d88e784a06a30e5336ad553012b5a7e97227c04723417e5&
08:21:08 <andythenorth> ok badges working in Ibex
08:21:17 <andythenorth> as extra text info
08:21:30 <andythenorth> not sure why Horse isn't showing them, might be localised issue
08:38:43 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330456395018928190/image.png?ex=678e0b93&is=678cba13&hm=1fd6a9a47336e804a2d0c25f0ad7141ae37f67ea36cd52dfc6906f8e405434ae&
08:38:43 <andythenorth> ok Iron Horse is mangling the badge string
08:39:04 <andythenorth> it's using a vehicle name string for both badge strings
08:39:39 <andythenorth> Iron Ibex does not
08:39:58 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330456710363742219/image.png?ex=678e0bde&is=678cba5e&hm=c04fe18697cf1058641a5d1e216ec45fcd9fe553a1ede82f3113b1818d10143d&
08:39:58 <andythenorth> if I add Ibex *after* Horse in the grf list, then the string works
08:40:17 <andythenorth> if I move Horse after Ibex, then the badge strings are wrong in both grfs
08:49:50 <truebrain> Always finding ways to break things ๐Ÿ˜„
08:49:57 <truebrain> (which is a good thing btw ๐Ÿ˜› )
08:55:47 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on issue #12987: [Bug]: Historical houses can spawn under construction https://github.com/OpenTTD/OpenTTD/issues/12987
09:01:53 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13333: Codechange: use std::vector instead of ReallocT-ed memory https://github.com/OpenTTD/OpenTTD/pull/13333
09:23:25 <andythenorth> coffee?
09:23:45 <goddess_ishtar> it's always time for coffee
09:23:47 <goddess_ishtar> or tea
09:24:00 <goddess_ishtar> tea is also good, dare I say, better
09:34:16 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13333: Codechange: use std::vector instead of ReallocT-ed memory https://github.com/OpenTTD/OpenTTD/pull/13333
09:37:30 *** nielsm has joined #openttd
10:00:37 <peter1138> 8Badfes are unique by label. the last name set replaces earlier names.
10:00:43 <peter1138> uh...
10:00:53 <peter1138> Badges...
10:02:11 <peter1138> Sounds like theres a festure mixup in your IH strings.
10:02:52 <andythenorth> or nmlc is writing over some
10:03:14 <andythenorth> let's see
10:04:06 <andythenorth> hmm how do I define which feature a string is for?
10:04:16 <andythenorth> the .lng file does not declare that
10:04:43 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on issue #13239: [Bug]: scenario editor/ town generation https://github.com/OpenTTD/OpenTTD/issues/13239
10:05:23 <andythenorth> action 4 has a feature byte
10:05:37 <andythenorth> is nml doing something magical?
10:07:14 <goddess_ishtar> nielsmhviaGitHub: oh wow, that is... certainly a bug report
10:11:29 <peter1138> Github seems a bit slow.
10:13:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #13239: [Bug]: scenario editor/ town generation https://github.com/OpenTTD/OpenTTD/issues/13239
10:17:47 *** merni has joined #openttd
10:17:47 <merni> That's 2 bug reports about the same thing so far
10:19:37 <peter1138> andythenorth, NML is not magic, it's just dumb.
10:20:31 <peter1138> When it sees the name property it creates the action 0 for it, and also prepares the action 4, and (logically) uses the same feature as the property.
10:20:59 <peter1138> Yes, it's a dup issue.
10:21:18 <andythenorth> I should branch Horse eh
10:22:58 <peter1138> git switch -c badges
10:23:40 <peter1138> badgers.
10:23:43 <peter1138> bradges.
10:26:04 <merni> peter1138: Yeah, my point was more that obviously this behaviour is something people are noticing and is at least somewhat unintuitive
10:26:08 <merni> bridges
10:26:53 <andythenorth> ok what are all the things for Horse Badger?
10:27:07 <peter1138> nielsm's suggestion of a new button is most sensible.
10:27:10 <andythenorth> power source, vehicle role, randomisation
10:27:31 <xarick> hi
10:28:34 <peter1138> And all the hidden things you want to avoid having a list of 256 different engines.
10:28:39 <merni> peter1138: Would that help? The way I read it that would *spawn* the town without roads, but upon expanding it again it would still build more
10:29:07 <merni> Zephyris' idea in the original PR seems better to me: https://github.com/OpenTTD/OpenTTD/pull/11377#issuecomment-1766033684
10:31:06 <peter1138> merni, get your VS Code out then.
10:31:31 <merni> If I had the time to do that I'd have the time to address Tyler's feedback on my existing PR :p
10:31:55 <merni> Hopefully in two weeks.
10:31:58 <peter1138> Disconnect from Discord. :p
10:32:13 <merni> Nah discord is just a distraction
10:32:28 <merni> It isn't something that needs my full time attention, unlike openttd programming :p
10:33:31 <peter1138> Right, magical drop down items. Let's see.
10:34:56 <bohaska> nielsmhviaGitHub: changing the code to match the docs...
10:36:04 <goddess_ishtar> merni: yeah this is the way I would do it
10:39:48 <_zephyris> Woop, people agree with me, fuzzy warm feelings ๐Ÿ™‚
10:40:12 <_zephyris> I'd like to think I'm good at taking a step back and seeing the bigger picture problem
10:40:41 <andythenorth> hmm badgers
10:40:50 <peter1138> Is it working now?
10:40:55 <andythenorth> no
10:41:02 <peter1138> I wondered if you happened to be reusing the same string id :D
10:41:13 <andythenorth> I'd have to edit the nfo to test
10:41:30 <andythenorth> identical code produces 2 grfs
10:41:32 <andythenorth> one works
10:41:34 <andythenorth> one doesn't
10:41:46 <peter1138> Push your branch to github so I can pull it and take a look?
10:41:57 <andythenorth> the only difference in the non-working version is the number of vehicles and strings
10:41:57 <peter1138> (See, always branch)
10:42:03 <andythenorth> always
10:42:15 <andythenorth> it's there
10:42:21 <andythenorth> https://github.com/andythenorth/iron-horse
10:43:21 <andythenorth> is 'tilt bonus' a badge?
10:43:42 <peter1138> So it's cabbage/foobar that are not working?
10:43:43 <andythenorth> it's already just an action 0 prop, but I'm trying to avoid using extra text info callback ๐Ÿ˜›
10:43:48 <andythenorth> and power/steam
10:43:52 <andythenorth> well no
10:43:55 <andythenorth> it works in Ibex
10:44:00 <andythenorth> it does not work in Horse
10:44:21 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330488011695194165/image.png?ex=678e2905&is=678cd785&hm=1ff90a7060de918e590a53fbeaf77e08521629d870d8d1857f48bb7099e7f206&
10:44:47 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330488122257182740/image.png?ex=678e291f&is=678cd79f&hm=d713e891a7681c349df2f31a35fc24497ddc9a4556050d144355f6fbce60fd78&
10:46:27 <peter1138> I like that you forgot how string files are formatted and put the : in the wrong place :-)
10:47:16 <peter1138> Compiling now, in about 10 minutes I will inspect the NFO.
10:48:48 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330489131947790337/image.png?ex=678e2a10&is=678cd890&hm=b8538602876d7c2df434f8164cb57b3db99ab94779b269b65f369c733159ae53&
10:48:48 <andythenorth> these two? ๐Ÿ˜›
10:49:01 <peter1138> Indeed.
10:49:12 <andythenorth> I have 90MB of nfo here
10:49:25 <peter1138> I wonder if other people do that. I've seen other NewGRFs with spaces in weird places...
10:50:00 <andythenorth> {BLACK}Probably {YELLOW}Maybe
10:51:33 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330489821545893908/image.png?ex=678e2ab4&is=678cd934&hm=aed69b118d68902f82627eee9d556f324e3df8944e8c446bc0c2d1908ba5588f&
10:51:33 <xarick> new FindSpring algorithm, I finally have results
10:52:33 <xarick> I am not impressed ๐Ÿ˜ฆ
10:52:42 <peter1138> Parsing ... 136.2 s
10:52:42 <peter1138> Preprocessing ... 37.6 s
10:52:42 <peter1138> Generating actions ... 3.5 s
10:52:50 <peter1138> Assigning Action2 registers ... 129.9 s
10:53:05 <merni> Have you somehow piped your console output to IRC :p
10:53:35 <andythenorth> I should do that with mine
10:53:40 <peter1138> Why is a 7 year old processor so slow...
10:53:57 <andythenorth> we'd see how often I accidentally up-enter on `git reset --hard`
10:54:12 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330490490478657628/image.png?ex=678e2b54&is=678cd9d4&hm=e034f1a939e1965dba323275d27060e1ac6c86e0caad0e6a7f6afd655fecb2eb&
10:54:12 <andythenorth> this could all be badges....
10:54:42 <peter1138> Could be.
10:55:18 <peter1138> Your makefile breaks with -j :(
10:55:37 <andythenorth> not for me ๐Ÿ˜
10:55:44 <andythenorth> oh there's a couple of edge cases where it does
10:55:48 <peter1138> It produced the nml files, iron-horse.nfo, iron-ibex.nfo, and stopped. Nothing else created.
10:56:18 <andythenorth> 'run it again' ๐Ÿ˜›
10:56:23 <andythenorth> one-person project eg ๐Ÿ™‚
10:56:43 <andythenorth> is it failing on Iron Moose missing a string?
10:57:44 <peter1138> I ran make again and it completed. So there is something not right in the chain.
10:57:50 <peter1138> I didn't see an error but maybe there was.
10:58:12 <peter1138> Oh! Yes, it was. I see the error when I ran it again.
10:59:38 <andythenorth> too much output
11:00:19 <andythenorth> I've force pushed, that string should be fine now
11:02:31 <peter1138> Okay, it's a bug in my understand of how OpenTTD treats strings :D
11:03:56 <peter1138> +ing
11:04:36 <peter1138> They are not separated interally by feature.
11:05:11 <peter1138> I think also that engine IDs > 53248 will have similar issues.
11:05:35 <peter1138> (They'll conflict with D000+ strings)
11:12:04 <peter1138> Engines of different types don't conflict because it uses the mapped engine id, not the action 0 id.
11:12:35 <peter1138> So you'd need to actually have 53,248 engines before it starts to conflict.
11:12:43 <andythenorth> "who would do such a thing"
11:13:33 <peter1138> That's in total, not per-GRF, so it's easier than you might think.
11:14:41 *** peter1138[d] has joined #openttd
11:14:41 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1330495644128903240/image.png?ex=678e3020&is=678cdea0&hm=e1f1331e05caeb905fcecc245169df4a0eb795d41057e5b343a804ef9cd5cd71&
11:14:49 <peter1138> That fixed it.
11:15:18 <peter1138> Now, does this separation break anything?
11:18:50 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330496691673108500/image.png?ex=678e311a&is=678cdf9a&hm=fbd9a08b8470858dc015fcd63e19eee31c0e352273c88dc5ce80ad4ec0dc408e&
11:18:50 <xarick> comparing it to PR version
11:21:57 <xarick> i have a hard time to make a judgment
11:23:06 <xarick> who won, son?
11:31:20 <xarick> code complexity explosion for a tiny benefit
11:31:37 <xarick> or even losing at times
11:33:17 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073
11:34:10 <peter1138> Hmm, maybe that's not the best way after all :p
11:35:11 <johnfranklin> Peter is using ChillRoundF? ๐Ÿ˜ฎ
11:44:39 <peter1138> Ah, probably is. Checking one 32-bit value is better than checking one 16-bit value and one 8-bit value.
11:45:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073#issuecomment-2600824439
11:47:04 <andythenorth> hmm
11:47:09 <andythenorth> I could drop all my python attrs
11:47:17 <andythenorth> and just set badge strings
11:47:19 <andythenorth> then parse them
11:47:26 <andythenorth> no, that would be silly ๐Ÿ˜›
11:48:34 <peter1138> Well, congratulations on finding a huge flaw in your first use ;D
11:53:07 <andythenorth> "it's what I do" ๐Ÿ˜›
11:53:34 <andythenorth> probably the main reason I don't use JGRPP is I instantly break everything
11:58:05 *** D-HUND is now known as debdog
12:13:11 <peter1138> I did something drastic.
12:13:22 <peter1138> I close a whole browser window with a load of unknown tabs.
12:13:38 <peter1138> (I shall now proceed to open more)
12:21:22 <andythenorth> I have tabs open sometimes
12:26:17 <peter1138> Just imagine all the extra features you could target if you did use JGRPP.
12:28:50 <andythenorth> like trains > 7 tiles?
12:28:56 <andythenorth> and cargodist
12:29:24 <peter1138> Sure.
12:29:45 <andythenorth> `has_badge` eh
12:30:26 <peter1138> Well, it's more difficult to mess up than cargo class bitmasks, right?
12:36:25 <peter1138> It automatically does the mapping from label to translation table index.
12:37:03 <peter1138> Oh, and automatically does it as a 32-bit parameter. So it's fairly complex under the hood.
12:39:10 <peter1138> Hmm, maybe it doesn't, I might've forgotten about that.
12:41:56 <peter1138> Var 7A.
12:41:58 <peter1138> Hm.
12:42:52 <peter1138> That's... weird.
12:43:37 <peter1138> In the regression test, the switch is before the badgetable. In theory that shouldn't work :D
12:45:54 <peter1138> Okay, it's use a byte parameter.
12:49:14 <peter1138> Testing with a longer translation table, let's see.
12:50:07 <peter1138> Is there a standard way to split an array into chunks...?
12:55:30 <peter1138> Magical. NML automatically uses a byte parameter if it can, otherwise it stores a dword in a register.
12:58:41 <_glx_> I see Andy found weird bug when testing, as always ๐Ÿ™‚
12:59:14 <DorpsGek> [OpenTTD/nml] PeterN updated pull request #359: Add: Support for NewGRF badges. https://github.com/OpenTTD/nml/pull/359
12:59:36 <peter1138> andythenorth, ^ now supports more enough badgetable entries to satisfy iron-horse...
12:59:44 <peter1138> +than
13:00:05 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330522171289636916/image.png?ex=678e48d5&is=678cf755&hm=61fe2d69600f68eb151a1f9ee69398f9753897a0d3f045fdcd5188ec4f99451b&
13:00:28 <andythenorth> hmm I never figured out how to update a local fetch of a PR
13:00:33 <andythenorth> the GPT suggestions just don't work
13:01:34 <peter1138> git pull...
13:01:46 <peter1138> Maybe.
13:09:31 <xarick> stupid background tasks ruining my benchmarks
13:10:09 <peter1138> Anyway, "git fetch upstream pull/359/head:pr359" should update it.
13:10:20 <peter1138> -f if it's been force-pushed.
13:14:56 <andythenorth> thanks
13:24:34 *** gelignite has joined #openttd
13:41:21 *** stenyg has joined #openttd
13:41:21 <stenyg> Hi im trying for a custom game to prepare a new button in mission orders, could someone guide me how to add a mission button that adds a conditional to first with 100% from start and set the current selected to No_Unloading or FullLoad?
13:55:29 <peter1138> Anyone know what any of that is about?
13:57:57 <Rubidium> it's about adding some conditional feature to the vehicle's orders, but beyond that I've got no real clue
13:59:36 <andythenorth> it's not an LLM?
14:00:38 <stenyg> il try to reformulate it, just need pointers the order_gui wasnt easy to get into ๐Ÿ™‚
14:05:47 <stenyg> https://cdn.discordapp.com/attachments/1008473233844097104/1330538702069436547/image.png?ex=678e583a&is=678d06ba&hm=9b8f3efe511ae17739a371f4341a7341ae08346508f8c57208c7ad2444259754&
14:05:47 <stenyg> https://cdn.discordapp.com/attachments/1008473233844097104/1330538702279282718/image.png?ex=678e583a&is=678d06ba&hm=1e5540d16ed4d99301e3438c2e8af643173c368040ef399cf458e9c19669c506&
14:05:47 <stenyg> what i would like to try is to add a button so when u click on it it will add go from
14:05:47 <stenyg> this to this
14:06:06 <stenyg> and put it under the "goto menu"
14:06:56 *** akimoto has joined #openttd
14:33:06 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334
14:37:03 <DorpsGek> [OpenTTD/OpenTTD] glx22 requested changes for pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334#pullrequestreview-2561023246
14:37:20 <peter1138> Also NUM_BADGES_PER_GRF is bogus, it was part of an earlier scheme that use station-type way of assigning class names.
14:39:19 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334#pullrequestreview-2561023964
14:39:52 *** akimoto has quit IRC (Remote host closed the connection)
14:40:27 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073#pullrequestreview-2561024289
14:42:18 <xarick> woah, that was a bad error
14:42:29 <xarick> 0 is the first town
14:42:41 <_glx_> not an issue actually ๐Ÿ™‚
14:43:02 <_glx_> just confusing
14:44:39 <peter1138> Hmm. What's the difference between a CursorID and a SpriteID?
14:44:40 <andythenorth> var `0x7A` eh
14:44:51 <andythenorth> I need to check badges on neighbouring vehicles
14:45:00 <peter1138> They're both just sprite numbers as far as I can tell.
14:45:09 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13335: Codefix: EngineID is used when it's not an actual EngineID https://github.com/OpenTTD/OpenTTD/pull/13335
14:47:56 <xarick> gah, I still fail at commiting comits
14:48:09 <xarick> i mix everything
14:48:15 *** kuka_lie has joined #openttd
14:48:18 <andythenorth> ah 0x7A needs a parameter
14:48:30 <Rubidium> peter1138: CursorID has a few flags to denote some animated cursors that aren't actual direct sprites
14:48:52 <peter1138> Ah, so it's the flags on top. Gotcha.
14:48:55 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334
14:49:59 <Rubidium> so... when it has a flag it does not have a sprite number at all, when the flag's not set it's actually a sprite number
14:50:23 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334#pullrequestreview-2561026777
14:50:25 <Rubidium> get rid of animated cursors and they're all sprites ;)
14:52:22 <andythenorth> can't remember how to parameterise the var for 0x61
14:52:39 <andythenorth> `[STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x0000FFFF, 0xC6]]` is the code I have checking IDs, but needs to use 0x7A
14:54:14 <_glx_> replace 0xC6 I guess
14:55:27 <peter1138> Rubidium, so almost like a std::variant, but encoded in a single value...
14:56:03 <peter1138> I believe there are special variants that can do that, using unused space rather than allocating (and re-aligning)
14:56:25 <andythenorth> _glx_: need to give it a badge as the param ๐Ÿ™‚
14:57:46 <_glx_> The 60+x parameter specifies the variable to access and temporary register 10E is passed as the new 60+x parameter.
14:58:24 <_glx_> so variable number replaces 0xC6, and you put the param in 0x10E
14:59:46 <peter1138> Why do you need to parameterise this?
15:00:16 <peter1138> Are you testing for a different badge based on some other condition?
15:04:01 <andythenorth> I need to test neighbouring vehicle
15:04:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336
15:05:03 <peter1138> For what though?
15:06:28 <andythenorth> presence of badge(s)
15:06:33 <peter1138> If it's one particular badge, then use has_badge().
15:07:01 <andythenorth> what do I miss in the syntax?
15:07:21 <_glx_> isn't has_badge() only for SELF or PARENT ?
15:07:25 <peter1138> I don't know, is the example in 042_badges.nml not enough?
15:08:08 <peter1138> Hmm.
15:09:01 <peter1138> Ah you need the magical relative scope which only exists for random switches.
15:09:26 <xarick> `CalculateCoverageLine` has this weird pointless variable
15:09:26 <xarick> ``` const DiagDirection neighbour_dir[] = {
15:09:26 <xarick> DIAGDIR_NE,
15:09:26 <xarick> DIAGDIR_SE,
15:09:26 <xarick> DIAGDIR_SW,
15:09:28 <xarick> DIAGDIR_NW,
15:09:28 <xarick> };```
15:09:29 <_glx_> but using that in normal switches ๐Ÿ™‚
15:10:07 <andythenorth> var 61
15:11:29 <peter1138> Okay.
15:12:14 <peter1138> Is it `[STORE_TEMP(badgetype("blah"), 0x10E), STORE_TEMP(-1, 0x10F), var[0x61, 0, 0x00000001, 0x7A]]`?
15:12:20 <peter1138> Then the result is 1 or 0.
15:12:41 <peter1138> Untested of course.
15:13:44 <peter1138> I stil wonder if relative scope for varaction 2 would make sense, but I think someone said no. Maybe it was some other restriction.
15:13:55 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336#pullrequestreview-2561031361
15:14:31 <_glx_> peter1138: untested but looks correct
15:15:25 <peter1138> I could make a helper function... has_badge("blah", 0)
15:15:34 <peter1138> has_badge("blah", -1)
15:15:53 <peter1138> Would hide all the STORE_TEMP.
15:16:16 <_glx_> I think only Andy does relative access
15:16:21 <peter1138> On the other hand, if you need to test multiple vehicles in the chain, that's less efficient as it will needless set 0x10E every time.
15:16:30 <peter1138> +ly
15:18:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336#pullrequestreview-2561032433
15:18:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336
15:19:37 <peter1138> There's also no "count number of vehicles in the chain with this badge"
15:20:26 <peter1138> Something equivalent to 0x60 I guess.
15:20:57 <peter1138> Not sure if that's needed.
15:21:49 <peter1138> I guess has_badge() by itself is usually pointless, testing your own badges is not very useful.
15:22:06 <peter1138> It just happens to work for the wagon attach callback.
15:22:23 <peter1138> parent/self I guess.
15:23:31 <andythenorth> I need to re-read my own code
15:23:45 <andythenorth> but I think I test 128 vehicles forwards and backwards, checking IDs
15:24:03 <andythenorth> I'm looking for an unbroken chain
15:24:18 <peter1138> 128 :o
15:24:38 <peter1138> Looking for ways to slow the game down :D
15:24:41 <_glx_> yeah it's done with 128 switches
15:24:48 <peter1138> !
15:24:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13337: Codefix: use INVALID_VEHICLE where more appropriate https://github.com/OpenTTD/OpenTTD/pull/13337
15:25:15 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336#pullrequestreview-2561033884
15:25:58 <peter1138> Oops
15:26:15 <andythenorth> it's only called for every vehicle in the chain
15:26:19 <andythenorth> on every graphics draw
15:26:23 <andythenorth> probably fine
15:26:49 <_glx_> https://gist.github.com/andythenorth/b38ab4476bacd317452c3019a2c48af9
15:26:54 <_glx_> this one ๐Ÿ™‚
15:27:04 <peter1138> "Have some persistent storage" "What's the point?"
15:27:05 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13338: Cleanup: Remove pointless DiagDirection array https://github.com/OpenTTD/OpenTTD/pull/13338
15:28:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13337: Codefix: use INVALID_VEHICLE where more appropriate https://github.com/OpenTTD/OpenTTD/pull/13337#pullrequestreview-2561034443
15:30:34 <andythenorth> we had a PR for persistent storage?
15:33:17 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330560724736675911/image.png?ex=678e6cbd&is=678d1b3d&hm=5ad9eae7618226e4c36ce33815b0d5dc311d19d46e7a126d74c84775c6386b6a&
15:33:17 <andythenorth> seems I did something with it
15:35:19 <peter1138> Yes, the argument was "when should persistent storage be writable?"
15:47:59 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1330564424641019947/image.png?ex=678e702f&is=678d1eaf&hm=b061afdb7b08465ff8686f8808a9b732c0c9896987c7b855f33066164893e565&
15:47:59 <peter1138[d]> Not ideal.
15:51:34 <peter1138> (I was trying to differentiate Sprite 0 and INVALID_SPRITE...
15:51:36 <peter1138> )
15:52:13 <LordAro> close enough
15:54:46 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13334: Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' https://github.com/OpenTTD/OpenTTD/pull/13334
15:55:18 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13338: Cleanup: Remove pointless DiagDirection array https://github.com/OpenTTD/OpenTTD/pull/13338#pullrequestreview-2561039577
15:58:17 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13336: Codefix: Sprite offsets and counts are not SpriteIDs. https://github.com/OpenTTD/OpenTTD/pull/13336
16:08:29 <andythenorth> well hidden badges working
16:10:25 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13337: Codefix: use INVALID_VEHICLE where more appropriate https://github.com/OpenTTD/OpenTTD/pull/13337
16:17:03 *** nielsm has quit IRC (Remote host closed the connection)
16:17:26 *** nielsm has joined #openttd
16:19:54 <peter1138> Hmm, why should clicking on toolbars not take focus (away from windows with an editbox)
16:22:14 <peter1138> https://github.com/OpenTTD/OpenTTD/commit/861e9cefb3c31f1cab46ddb068af7a3648f45b4a#diff-7209f122341722118b8e0247ac6923a36d0f8cdde9ff7a696688b140a6012dd7
16:22:19 <peter1138> This introduced that.
16:22:48 <peter1138> So if you have a window with an editbox open, and then click on th toolbar, the editbox window still has focus.
16:24:31 <andythenorth> hmm
16:24:43 <andythenorth> I don't like requesting specialise vars for grf, they're usually weird
16:25:02 <andythenorth> but this loop unroll I use to find unbroken chains of similar-but-different vehicles
16:25:06 <andythenorth> is not efficient ๐Ÿ˜›
16:25:48 *** Wormnest has joined #openttd
16:35:42 <xarick> I'm making histograms multithreaded
16:36:31 <xarick> wish i could template this
16:37:33 <xarick> [GetHistograms multithreaded] 15591 us
16:37:46 <xarick> i forgot to get the result for single threaded
16:41:51 *** gelignite has quit IRC (Quit: Stay safe!)
16:44:34 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1330578664160497841/bulldoze.png?ex=678e7d72&is=678d2bf2&hm=678a47caf9d830054c8bc92cbf2fb64417775f2b11564bd12f8a077d34bc47b8&
16:44:34 <talltyler> Interesting, if you remove a house set from a game, the fallback houses don't know how big they are and can be demolished one tile at a time...
16:44:45 <talltyler> Probably not a bug, this is why the warning exists ๐Ÿ˜„
16:47:30 <truebrain> It can even crash your game
16:48:01 <truebrain> We fixed so many games because of that over the years .. don't remove house GRFs, it rarely ends well ๐Ÿ˜›
16:50:14 <peter1138> Aren't you meant to to use a fallback house of the same size?
16:50:42 <talltyler> I am playing with my family, one of them is the server host ๐Ÿ™‚
16:51:07 <talltyler> (I am shocked that I managed to get them hooked on OpenTTD)
16:51:19 <talltyler> I don't even know which house set was removed
16:51:20 <peter1138> Like, if you make a house that is 2x2, then it should use the appropriate parts of a default 2x2 house as the fallback IDs.
16:51:28 <peter1138> Not sure if that's the case or whatever.
16:53:37 <peter1138> Hmm, seems weird to me that if you have a query window open (e.g. rename vehicle), click on the toolbar and open a dropdown menu, keeping it open, if you type, the query window still recieves the characters.
16:56:06 <peter1138> Hmm, okay, I guess it's focus-stealing prevention.
16:57:26 <peter1138> Focus switching happens deep within the window opening->initialisation path, so there's no way to tell if it's opening from manual interation or automatically.
17:00:55 <xarick> > [GetHistograms multithreaded] 23040 us [avg: 23040.0 us]
17:00:55 <xarick> > [GetHistograms singlethreaded] 0 us [avg: 0.0 us]
17:00:55 <xarick> makes no sense
17:01:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #10938: Feature: Option to disable activate-on-release behaviour of toolbar dropdown buttons. https://github.com/OpenTTD/OpenTTD/pull/10938
17:02:20 <peter1138> An oldie...
17:05:40 <xarick> is cpu cache doing something?
17:05:42 <xarick> or what?
17:05:47 <xarick> why 0
17:14:03 <kuhnovic> peter1138: I still really like that one!
17:15:05 <peter1138> Well I finally decided to fix the niggling issue, and without a workaround.
17:15:22 <peter1138> It kinda still is.
17:15:59 <peter1138> But focus-stealing preventation is usually full of gotchas.
17:16:09 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:18:34 <andythenorth> ok so the strings are just indexes into the BTT?
17:24:26 <peter1138> Use `badgetype("badge")` to get the number.
17:25:25 <andythenorth> curious where I can just use strings
17:25:34 <andythenorth> presumably procedure params are fine
17:26:17 <peter1138> Only in the badgetable list, the badges list, and in the badgetype() built-in function.
17:26:48 <peter1138> You should not ever use the index directly, same as you don't normally use the cargotable index.
17:26:50 <kuhnovic> peter1138: What's that issue? It's not entirely clear to me from the commit message, and I can't find it in the comments either
17:27:32 <peter1138> The dropdown menu did not close if you clicked on the same button again.
17:27:39 <peter1138> This seems like a simple thing, but...
17:28:14 <peter1138> But actually, the dropdown menu did not close if you clicked on ANY button in the toolbar.
17:28:37 <peter1138> So the first commit of that PR is now a change that makes dropdown menus ignore focus stealing protection.
17:29:13 <peter1138> With focus stealing protection removed, the dropdown gains and loses focus normally, even though the toolbar itself doesn't get focused.
17:29:30 <peter1138> And with that, the dropdowns now close properly without needing hacks in the toolbar window.
17:30:40 <peter1138> It's not listed as a "fix" in any of the commit messages, because the "bug" was never introduced in the first place.
17:33:04 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13292: Cleanup: Missing TileDiffXY conversion in GenerateTerrain https://github.com/OpenTTD/OpenTTD/pull/13292#pullrequestreview-2561056828
17:35:20 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13264: Codechange: Optimize FlowRiver https://github.com/OpenTTD/OpenTTD/pull/13264#pullrequestreview-2561057033
17:39:23 <xarick> Oh, that issue uint vs int again ๐Ÿ˜
17:39:59 <LordAro> uint foo = *(int *)bar makes no sense to me
17:40:07 <LordAro> which i think RB brought up already
17:40:23 <LordAro> this seems to be the case with many of your PRs - there are outstanding comments that have not been addressed
17:40:33 <LordAro> i've looked through a few of them
17:41:20 <xarick> I don't know what to do
17:42:35 <LordAro> `for (uint i = apc->terminals[0]; i > 0; i--) num += apc->terminals[i];` this is a really weird line of code
17:42:42 <LordAro> (it was there already, don't worry)
17:44:28 <andythenorth> hmm do badges transcend grfs?
17:44:34 <andythenorth> do / should ?
17:47:00 <xarick> ``` uint height_lake = *static_cast<int *>(user_data);
17:47:00 <xarick> if (!IsValidTile(tile) || TileHeight(tile) != height_lake || !IsTileFlat(tile)) return false;```
17:47:00 <xarick> ``` int height_lake = *static_cast<int *>(user_data);
17:47:00 <xarick> if (!IsValidTile(tile) || static_cast<int>(TileHeight(tile)) != height_lake || !IsTileFlat(tile)) return false;```
17:49:46 <LordAro> ok, look at it this way - height_begin (in FlowRiver) is a uint. You're passing it into MakeLake via its pointer. The type of this variable has not changed
17:50:03 <LordAro> so why is it suddenly becoming an int?
17:50:35 <LordAro> that's the case in master
17:51:14 <xarick> it did in this PR
17:51:35 <xarick> wait, no, im so confused
17:51:38 <xarick> int height_begin = TileHeight(begin);
17:51:39 <LordAro> in your branch, for some reason you've made height_being into an int - please explain why, when TileHeight returns a uint
17:52:43 <xarick> I need it to be int to compare it with IsTileFlat's int
17:53:22 <xarick> IsTileFlat(lake_centre, &height_lake) &&
17:53:22 <xarick> height_lake == height_begin &&
17:53:27 <LordAro> ah, interesting
17:53:43 <kuhnovic> peter1138: Will this affect any other windows? You could argue that the odd window is the toolbar window, so it would make sense to have any hacks there instead of the general window class
17:53:45 <LordAro> i think IsTileFlat suffers from the same problem - int* in, assigns to a uint
17:54:44 <kuhnovic> (I know very little about the window system, so if you say this is the best solution then I believe you)
17:55:49 <peter1138> An alternative is to allow the toolbar to be focused.
17:56:18 <peter1138> Currently if you have an edit window open, and you click on pause, your edit window still has text input focus.
17:56:40 <peter1138> If the toolbar gained focused, then the edit window would lose focus.
17:56:55 <peter1138> One could argue this is correct, because you interacted with the toolbar window.
17:57:09 <LordAro> perhaps that behaviour could be specific to toolbar buttons that don't have a dropdown?
17:57:30 <LordAro> that non-focus-stealing behaviour*
17:57:50 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/tile_map.cpp#L95-L109>
17:57:54 <xarick> I see
17:58:00 <peter1138> Hah, well that system is definitely not aware of which buttons do which actions in a window.
17:58:16 <LordAro> protip: -j isn't a particularly useful method of build parallelism
17:58:53 <LordAro> peter1138: i am also just an ideas guy, no idea of the complexities of implementing such a system :po
17:58:56 <LordAro> -o
18:01:35 <peter1138> I think the "cleanest" thing is that focus-stealing-prevention should only occur if the window being opened was not opened as a result of a user interaction.
18:02:48 <peter1138> Currently no new windows get focused if an editbox has focus, even if it's a user interaction.
18:03:32 <peter1138> The dropdown window has to gain focus, and then lose focus, to be automatically closed.
18:05:01 <peter1138> Hmm, and of course there are windows which can be manually opened, or automatically opened, So I can't cheat with using the window descriptions.
18:05:21 <xarick> gonna test what happens when I do stuff like this: height_lake = INT_MAX;
18:05:46 <kuhnovic> UI design is always so much more difficult that it seems on the surface
18:08:50 <peter1138> The code that focuses a new window is under new Window()->FinishInitNested()->InitializeData(). So getting a parameter to that to say that a window was opened automatically or manually means every single place where a window is opened would need to be modified.
18:09:48 <peter1138> TBH I've often thought the self-building calls are a bit annoying.
18:10:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330600255611211930/image.png?ex=678e918e&is=678d400e&hm=d20e9618121c90da1d15298e3e56a4cb676373fac54829b42329c4cd487e412c&
18:10:22 <xarick> so far it looks right
18:10:25 <peter1138> Everything being done through the constructor led to some virtual inheritance bugs at point.
18:11:15 <xarick> now gonna test height_lake = UINT_MAX;
18:11:20 <peter1138> Oh no, not another side-quest :(
18:12:09 <xarick> height_lake -1 int
18:12:14 <xarick> interesting
18:13:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330600998670041292/image.png?ex=678e923f&is=678d40bf&hm=eac90c2c84739817ddca123795874dc9ddae5342313a7da1e9a336128dea06de&
18:13:30 <xarick> 4294967295, it's correct
18:14:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13292: Cleanup: Missing TileDiffXY conversion in GenerateTerrain https://github.com/OpenTTD/OpenTTD/pull/13292
18:15:08 <LordAro> i'm pretty sure the easiest solution is to change TileHeight to return int
18:15:37 <LordAro> i'm not sure it's the most correct solution - but i've just played around with changing all the other functions to return uint, and it's a huge amount of change
18:17:33 <xarick> let me try
18:19:54 <xarick> can't compile without errors
18:20:04 <LordAro> this is not surprising
18:20:14 <LordAro> height variables are a complete mess of signed/unsigned
18:20:57 <peter1138> IIRC it's signed because you sometimes need a height difference.
18:21:05 <peter1138> unsigned - unsigned will not be quite right.
18:21:14 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13297: Codechange: use std::variant instead of a custom version for news references https://github.com/OpenTTD/OpenTTD/pull/13297#issuecomment-2600969439
18:21:33 <LordAro> peter1138: my assessment of the code so far is "it depends"
18:21:44 <LordAro> there are very few cases so far where it's actually a difference
18:22:32 <_glx_> you should know by now that 4294967295 (unsigned) and -1 (signed) are the same value
18:22:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13297: Codechange: use std::variant instead of a custom version for news references https://github.com/OpenTTD/OpenTTD/pull/13297#issuecomment-2600969955
18:23:12 *** virtualrandomnumber has joined #openttd
18:23:44 *** virtualrandomnumber has quit IRC ()
18:26:50 <peter1138> Opinion-detected, shielding-raised.
18:28:29 <xarick> uint8_t number >= int number
18:29:02 <xarick> nevermind, I think my approach is fine
18:29:42 <xarick> it's weird, but I don't wanna make the code uglier
18:29:52 <_glx_> comparing uint and int can have unexpected effects
18:29:58 <LordAro> two separate people have told you that it is not fine
18:30:19 <LordAro> even just an extra cast (and probably explanatory comment) would likely be enough
18:30:23 <xarick> yes, that's what would happen if TileHeight would return int, there are places doing uint comparing to Tileheight
18:30:33 <LordAro> in MakeLake, that is
18:31:10 <LordAro> clearly needs more strong types. TileHeight, TilePixelHeight, TileHeightDiff etc etc :D
18:31:50 <_glx_> you want to compare uint and uint, or int and int, never mix unsigned and signed
18:32:18 <_glx_> that's why compiler usually warns about that
18:33:39 <_glx_> unless you really know it's fine (and use cast then)
18:33:41 <Rubidium> peter1138: is that about #13297? I kinda agree that enums aren't the best solution, though it needs something that's stronger than a typedef and less annoying than strongtypedef ;(
18:34:09 <peter1138> The opinion detected was mine, but yes :)
18:35:14 <Rubidium> can you maybe push to stash where you have the perfect middle ground between typedef and stongtypedef? ;)
18:35:21 <peter1138> Hehe
18:35:25 <Rubidium> s/to/that/
18:38:42 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330607384279646298/image.png?ex=678e9831&is=678d46b1&hm=d1495f50b1ca94f7a6f772e98f4fd5f998f175a3e9965fb03947eac37542e755&
18:38:42 <xarick> does this look okay lordaro4353
18:39:38 <LordAro> yes
18:39:47 <andythenorth> badges in newgrf debug window maybe? ๐Ÿ™‚
18:39:48 <xarick> looks so weird to me, but okay
18:39:53 <LordAro> it is weird
18:39:59 <LordAro> but tile heights are weird generally
18:40:06 <andythenorth> `dumpinfo badges`
18:40:07 <andythenorth> also
18:40:16 * andythenorth and two ponies
18:42:54 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick dismissed a review for pull request #13264: Codechange: Optimize FlowRiver https://github.com/OpenTTD/OpenTTD/pull/13264#pullrequestreview-2532989045
18:42:57 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13264: Codechange: Optimize FlowRiver https://github.com/OpenTTD/OpenTTD/pull/13264
18:47:25 <peter1138> Rubidium, needs more opinions than just mine, because it might be reasonable...
18:47:58 *** tokai has joined #openttd
18:47:58 *** ChanServ sets mode: +v tokai
18:48:37 <peter1138> A WeakType::Typedef similar to StrongType::Typedef might feasible, but with all the automatic conversions put back in place. But at that point... all that code for something that an enum could do?
18:52:57 <xarick> @rubidium <https://github.com/OpenTTD/OpenTTD/commit/b71a5158cf69fc373dd8726452d813a5cc0ed99f#diff-a56a9d308ddda25fd1d7f2eba91921efc5f2bd9097342a3f2c3553b80298003a>
18:52:57 <xarick> that doesn't look right
18:54:20 <xarick> let me check CMD_STORY_PAGE_BUTTON
18:54:51 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
18:55:19 <xarick> CommandCost CmdStoryPageButton(DoCommandFlag flags, TileIndex tile, StoryPageElementID page_element_id, VehicleID reference); nevermind, it's correct
18:55:31 *** Compu has joined #openttd
18:56:38 *** Compu has quit IRC ()
19:16:25 *** gelignite has joined #openttd
19:25:20 <peter1138> Boop.
19:32:45 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330620986814627953/image.png?ex=678ea4dc&is=678d535c&hm=f905039f237d9a81fa96615ca388f47eb92aa79e46f7385ec47b08571457fbd0&
19:32:45 <andythenorth> boop boop badges eh
19:32:55 <andythenorth> colours next I think
19:33:09 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330621089948106752/image.png?ex=678ea4f5&is=678d5375&hm=5ca89c2049cff7d2990ee3ed3ff027cd080c829569baac1098957219bbf41d53&
19:33:09 <andythenorth> this should be badger-able
19:38:37 <peter1138> Why do I get the feeling I'm going to regret things :D
19:41:45 <xarick> can I touch/fix tgp.cpp codestyle?
19:42:14 <Rubidium> isn't regret like standard? Either you regret not merging it, or you regret having merged it at some point
19:53:58 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1330626326062694650/image0.gif?ex=678ea9d5&is=678d5855&hm=49b051e651461719b0b62adea5aaaaf28b8df23f201249adbd36052e78f8ada9&
19:55:54 <talltyler> Todayโ€™s multiplayer shenanigans.
19:55:54 <talltyler> https://www.youtube.com/watch?v=SS5hLsnEGs8
19:56:04 <talltyler> Correct use of Horse?
19:58:23 <peter1138> If it lets you do it, it can't be incorrect.
20:11:10 <talltyler> Iโ€™m glad the snowplough, Garrett, and livestock wagons all have compatible braking systems ๐Ÿ˜›
20:14:15 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13339: Codechange: Make StationType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13339
20:17:32 *** kuka_lie has quit IRC (Quit: Lost terminal)
20:18:31 *** Wolf01 has joined #openttd
20:19:18 <andythenorth> seems correct
20:19:41 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13339: Codechange: Make StationType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13339#pullrequestreview-2561082680
20:21:03 <andythenorth> oops
20:21:22 <andythenorth> can't assign a badge name depending on company colour
20:21:27 <andythenorth> or...can I? ๐Ÿ˜›
20:21:39 <andythenorth> do we have {COLOUR}?
20:24:37 *** Speedyn has joined #openttd
20:24:55 <andythenorth> we do not ๐Ÿ˜›
20:26:20 <andythenorth> maybe badges are not the solution for this part ๐Ÿ™‚
20:28:03 <talltyler> Why do you need to put the company colour in text?
20:30:55 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1330635627066294364/image.png?ex=678eb27f&is=678d60ff&hm=0bfe520e7019b06c0e49e2805f3091ee5b45b6c9fe55f594288df212f0d2f83b&
20:30:55 <andythenorth> for the colour hints
20:31:15 <andythenorth> just "company colour, complementary company colour" is less good
20:31:29 <andythenorth> better to be direct
20:32:09 *** Speedy` has quit IRC (Ping timeout: 480 seconds)
20:32:47 <peter1138> I think it works better, otherwise there's no indication that some colour variations are fixed and others are CC-dependent.
20:33:13 <peter1138> IMHO.
20:33:56 <andythenorth> I tried both previously
20:34:54 <talltyler> I think โ€œcompany colourโ€ is the most direct. If you change your company colour, the wagons will change.
20:36:38 <andythenorth> yeah I don't have the screenshots
20:36:44 <andythenorth> but it was somewhat worse
20:36:52 <andythenorth> as is 'complementary company colour'
20:37:15 <andythenorth> 'Company colour, complementary company colour, brown, grey'
20:37:28 <andythenorth> it's more cognitive work than 'red, pink, brown, grey'
20:43:22 <xarick> what is a long
20:43:32 <xarick> `long n = x + y * prime + _settings_game.game_creation.generation_seed;`
20:44:28 <xarick> any difference between long and int
20:45:29 <andythenorth> ok no badges for colours
20:45:45 <andythenorth> hmm, actual pixels? ๐Ÿ˜›
20:48:01 <stenyg> xarick: Long vs int is different sizes The long uses 64 bits. The int uses 32 bits, and so can only hold numbers up to ยฑ2 billion (-2^31 to +(2^31)-1).
20:49:00 <stenyg> while a long can hold -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
20:50:08 *** Speedyn has quit IRC (Ping timeout: 480 seconds)
20:50:55 <LordAro> stenyg: not always ;)
20:51:19 *** Speedy` has joined #openttd
20:51:45 <andythenorth> peter1138[d]: do I need to namespace badges somehow?
20:51:51 <andythenorth> e.g. horse_foo/bar?
20:53:10 <LordAro> https://www.intel.com/content/www/us/en/developer/articles/technical/size-of-long-integer-type-on-different-architecture-and-os.html
20:53:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13339: Codechange: Make StationType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13339
20:54:36 <peter1138> Well, I don't think the purchase list name should change just because my company colour has changed.
20:55:04 <peter1138> For namespace... depends really. The are deliberately not unique to a NewGRF so that they can be shared.
20:55:43 <peter1138> On the other hand, if it's for some technical detail that wouldn't make sense for anything else ever, maybe.
20:56:05 <andythenorth> the case I have in mind is specific to Horse sprite resolution
20:56:39 <peter1138> How specific?
20:57:42 <andythenorth> specific enough that I think `ih_ruleset_flags` is better than `ruleset_flags`
20:58:26 <andythenorth> some of the labels in that class will be specific to multiple unit trains
20:58:35 <andythenorth> `ih_ruleset_flags/my_fast_eurostar`
20:58:38 <andythenorth> or whatever
21:03:50 *** Speedy` has quit IRC (Read error: Connection reset by peer)
21:03:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13340: Codechange: Make RoadStopType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13340
21:04:14 <peter1138> Alright, I'm slightly bored of one-change-at-a-time here ;)
21:05:02 *** Speedy` has joined #openttd
21:06:22 <peter1138> Hmm, vague idea about focus-stealing...
21:09:42 <stenyg> LordAro: Correct to that but in general . As a inte in some cases can only be 8 bits depending on architecture
21:20:13 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13340: Codechange: Make RoadStopType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13340#pullrequestreview-2561092620
21:20:46 <peter1138> Hmm, doing lots at once would be harder to review anyway.
21:23:59 <Rubidium> it depends on how similar the changes are, and whether they're trivial or not
21:24:40 <Rubidium> these last two enum class ones could've been one with two commits
21:31:54 *** gelignite has quit IRC (Quit: Stay safe!)
21:34:57 <xarick> i touched tgp, let's see how much it broke
21:37:51 <xarick> no warnings? hmm
21:38:36 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #13338: Cleanup: Remove pointless DiagDirection array https://github.com/OpenTTD/OpenTTD/pull/13338
21:39:20 <xarick> built with no warnings
21:39:38 <xarick> oh, nvm, i built master
21:39:42 <xarick> wrong branch
21:39:47 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #13034: Fix bb8a0c7641: Strip control codes before sorting NewGRF names. https://github.com/OpenTTD/OpenTTD/pull/13034
21:40:47 <andythenorth> very naptime
21:41:03 <andythenorth> badgers will have to wait ๐Ÿ˜
21:43:21 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13340: Codechange: Make RoadStopType an enum class. https://github.com/OpenTTD/OpenTTD/pull/13340
21:43:40 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13333: Codechange: use std::vector instead of ReallocT-ed memory https://github.com/OpenTTD/OpenTTD/pull/13333#pullrequestreview-2561096436
21:44:05 <xarick> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:tgp-codestyle
21:44:20 <xarick> yay or nay
21:46:18 <LordAro> not all of it, certainly
21:46:31 <LordAro> remove the #define changes and you might have a shot
21:47:31 <LordAro> some of the changes in HeightMapSmoothCoastInDirection look wrong
21:48:19 <LordAro> as per usual, only make one sort of change at a time
21:48:22 <xarick> oops is valid tile x, x ๐Ÿ˜ฆ
21:48:23 <LordAro> you've done a lot of changes
21:48:30 <LordAro> a lot of different changes
21:48:52 <xarick> line 776 is a typo
21:49:09 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13333: Codechange: use std::vector instead of ReallocT-ed memory https://github.com/OpenTTD/OpenTTD/pull/13333
21:49:51 <peter1138> Oh.
21:51:04 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:52:14 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13327: Codechange: remove direct access to Textbuf's buffer https://github.com/OpenTTD/OpenTTD/pull/13327#pullrequestreview-2561097882
21:53:19 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13320: Codechange: replace custom deque with actual deque when loading network games https://github.com/OpenTTD/OpenTTD/pull/13320#pullrequestreview-2561098049
21:56:23 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13317: Codechange: remove manual memory management in old string loading https://github.com/OpenTTD/OpenTTD/pull/13317#pullrequestreview-2561098487
22:01:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13327: Codechange: remove direct access to Textbuf's buffer https://github.com/OpenTTD/OpenTTD/pull/13327
22:01:59 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13320: Codechange: replace custom deque with actual deque when loading network games https://github.com/OpenTTD/OpenTTD/pull/13320
22:06:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330659688576057475/image.png?ex=678ec8e8&is=678d7768&hm=da005e8d6f3f21de618ce3f632ea8b635a61759bd830ced405ee82c8a0e240ec&
22:06:32 <xarick> looks like I didn't break it... so far
22:06:38 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13308: Codechange: use C++ constructs over MallocT/free https://github.com/OpenTTD/OpenTTD/pull/13308#issuecomment-2601039695
22:17:24 <peter1138> Hmm, I wonder what happened to r12566.
22:17:41 <peter1138> And r12568. Maybe they were in in a branch.
22:18:17 <peter1138> Ah probably, r12567 mentions "in trunk"
22:19:00 <Rubidium> svn commits that were missing were indeed likely in a branch
22:19:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13341: Cleanup: Remove two unused PaletteType values. https://github.com/OpenTTD/OpenTTD/pull/13341
22:20:23 <xarick> LordAro: for clarification, you want me to change the #defines into functions, or the opposite, don't touch them?
22:20:29 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13341: Cleanup: Remove two unused PaletteType values. https://github.com/OpenTTD/OpenTTD/pull/13341#pullrequestreview-2561103083
22:20:34 <LordAro> xarick: don't touch them
22:20:37 <xarick> oik
22:20:49 <peter1138> What's the purpose of IRC if not for immediately realising the answer to your own question the moment you post it.
22:21:00 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13308: Codechange: use C++ constructs over MallocT/free https://github.com/OpenTTD/OpenTTD/pull/13308#issuecomment-2601044317
22:22:04 <peter1138> Hmm, I think I had a branch/stash for that one somewhere. What did I do...
22:22:05 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 dismissed a review for pull request #13317: Codechange: remove manual memory management in old string loading https://github.com/OpenTTD/OpenTTD/pull/13317#pullrequestreview-2561098487
22:22:08 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13317: Codechange: remove manual memory management in old string loading https://github.com/OpenTTD/OpenTTD/pull/13317
22:23:19 <xarick> where do I start
22:24:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13317: Codechange: remove manual memory management in old string loading https://github.com/OpenTTD/OpenTTD/pull/13317#pullrequestreview-2561103827
22:24:15 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:31:31 <peter1138> Hm.
22:41:17 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1330668434719117373/image.png?ex=678ed10d&is=678d7f8d&hm=3d1504d27852ebacad8410a06c97dd4674c67811951ba7f8c946d9dfb64f2988&
22:41:17 <xarick> I found a typo
22:41:25 <xarick> are use
22:43:19 <Rubidium> just keep a local branch to fix them, and once you've got a dozen or so make a PR?
22:43:35 <Rubidium> as there are definitely way more typos
22:44:09 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13342: Codechange: Capitalise static consts https://github.com/OpenTTD/OpenTTD/pull/13342
22:45:44 <xarick> maybe cleanup?
22:45:53 <xarick> not much of a codechange
22:47:32 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:48:17 <Rubidium> you know there a document stating what to use, right?
22:52:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13343: Codechange: Use member initialisation for GRFConfig instead of ZeroedMemoryAllocator. https://github.com/OpenTTD/OpenTTD/pull/13343
22:52:51 <xarick> okay, seems to be Codechange
22:53:09 <peter1138> Scary commit date.
23:06:31 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13343: Codechange: Use member initialisation for GRFConfig instead of ZeroedMemoryAllocator. https://github.com/OpenTTD/OpenTTD/pull/13343#pullrequestreview-2561113269
23:11:34 <LordAro> can't be much ZMA left now?
23:22:33 <peter1138> There's enough.
23:22:37 <peter1138> It's in every Window.
23:22:59 <peter1138> I have more patches to get rid of it, but because Window is everywhere, it's quite a bit change.
23:23:02 <peter1138> And a big change.
23:25:05 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13332: Fix #12987: Historical houses now always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332#pullrequestreview-2561117502
23:25:30 <goddess_ishtar> woooooo
23:25:45 <goddess_ishtar> so when do I get my Developer role? ;p
23:27:40 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13342: Codechange: Capitalise static consts https://github.com/OpenTTD/OpenTTD/pull/13342#pullrequestreview-2561118077
23:31:19 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13343: Codechange: Use member initialisation for GRFConfig instead of ZeroedMemoryAllocator. https://github.com/OpenTTD/OpenTTD/pull/13343
23:58:09 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #13332: Fix #12987: Historical houses now always spawn completed https://github.com/OpenTTD/OpenTTD/pull/13332
23:58:12 <DorpsGek> [OpenTTD/OpenTTD] LordAro closed issue #12987: [Bug]: Historical houses can spawn under construction https://github.com/OpenTTD/OpenTTD/issues/12987
23:58:15 <DorpsGek> [OpenTTD/OpenTTD] LordAro closed issue #12987: [Bug]: Historical houses can spawn under construction https://github.com/OpenTTD/OpenTTD/issues/12987
23:58:24 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #13342: Codechange: Capitalise static consts https://github.com/OpenTTD/OpenTTD/pull/13342