IRC logs for #openttd on OFTC at 2025-11-09
            
00:50:57 <DorpsGek> [OpenTTD/OpenTTD] fabrizioinsysnet-coder commented on issue #14761: [Crash]: Fatal application failure https://github.com/OpenTTD/OpenTTD/issues/14761
00:55:16 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #14763: [Crash]: NewGRFs which set a null custom currency thousands separator character cause NOT_REACHED in GetLayouter https://github.com/OpenTTD/OpenTTD/issues/14763
01:34:25 <peter1138> Easy to fix.
01:34:41 <peter1138> But raises the question of blocking any non-ASCII chars.
01:46:01 <_glx_> maybe use a temporary char array and convert to std::string
01:47:09 <_glx_> but that would only fix the \0 case
01:48:09 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14764: Fix #14763: Crash if NewGRF currency separator is not valid. https://github.com/OpenTTD/OpenTTD/pull/14764
01:48:31 <peter1138> No need to over-complicate.
01:51:42 <_glx_> hmm default is replace with question mark, maybe use no flags at all
01:52:44 <_glx_> oh question marks are fine actually since 0 is handled separately
01:56:27 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #14764: Fix #14763: Crash if NewGRF currency separator is not valid. https://github.com/OpenTTD/OpenTTD/pull/14764#pullrequestreview-3439137142
02:00:44 *** tokai|noir has joined #openttd
02:00:44 *** ChanServ sets mode: +v tokai|noir
02:02:28 *** Zathras_4 has joined #openttd
02:07:45 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:11:07 *** gelignite is now known as Guest30771
02:11:10 *** gelignite has joined #openttd
02:18:29 *** Guest30771 has quit IRC (Ping timeout: 480 seconds)
03:16:07 *** Wormnest has quit IRC (Quit: Leaving)
03:46:00 *** gnu_jj has joined #openttd
03:49:44 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:19:21 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:20:44 *** WormnestAndroid has joined #openttd
04:28:20 *** Zathras_11 has joined #openttd
04:28:24 *** Zathras_1 has joined #openttd
04:31:46 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:31:46 *** Zathras has quit IRC (Ping timeout: 480 seconds)
04:49:31 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
05:00:00 *** WormnestAndroid has joined #openttd
05:17:12 *** keikoz has joined #openttd
06:09:00 *** jinks has quit IRC (Remote host closed the connection)
06:11:28 *** jinks has joined #openttd
06:43:50 <andythenorth> Is a tile detectable as coast IFF the case where an industry or object is present on the tile?
06:44:08 <andythenorth> Empty coast tiles are already detectable
06:49:35 *** keikoz has quit IRC ()
06:52:11 <andythenorth> Maybe I can check a combination of current tile slope, and water class of all 8 adjacent tiles?
06:52:18 *** keikoz has joined #openttd
06:52:49 <andythenorth> Kind of thing nml sometimes has a built in expression for
07:01:03 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
07:01:05 *** WormnestAndroid has joined #openttd
07:01:08 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
07:01:24 *** WormnestAndroid has joined #openttd
08:22:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14764: Fix #14763: Crash if NewGRF currency separator is not valid. https://github.com/OpenTTD/OpenTTD/pull/14764
08:22:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #14763: [Crash]: NewGRFs which set a null custom currency thousands separator character cause NOT_REACHED in GetLayouter https://github.com/OpenTTD/OpenTTD/issues/14763
08:22:50 <peter1138> andythenorth, no, if a tile is industry or object then it is not a coast tile.
08:32:30 <andythenorth> I should read the src πŸ˜›
08:34:20 <andythenorth> so industry var 0x60 (and object var 0x62) will return a water class for actual water tiles, but not coasts
08:34:51 <andythenorth> (industry _tile_ var 0x60)
08:36:55 <andythenorth> hmm nvm πŸ™‚
08:41:49 <andythenorth> no way to stuff persistent storage from the shape check cb πŸ™‚
08:42:21 <andythenorth> I'll write some sort of horrific 'adjacent tiles are sea' combined with a slope check
08:45:39 <andythenorth> or I could replace all foundation sprites in action A or something πŸ˜›
08:45:44 <andythenorth> "bit rude"
08:45:46 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437000202224537671/image.png?ex=6911a63a&is=691054ba&hm=2ee0b19db1aed3575fefad221ed23bb4cc0f5e19fed9ec40c4d15f9ad7351159&
08:49:39 <peter1138> if (tile height == 0 and no foundations and neighbouring tile is water)
08:51:14 <peter1138> Problem is for industries "are there foundations" is a callback itself.
08:52:13 *** Flygon has joined #openttd
09:06:04 *** Wolf01 has joined #openttd
09:38:31 <andythenorth> wonder how FPS-intenstive FIRS spritelayouts are
09:38:59 <andythenorth> they have all sorts of stuff to set the ground tile, hide/show fences, hide/show snow, multiple building layers etc
09:39:30 <andythenorth> maybe I should write a compile-time compositor and pre-generate all the possible combinations
09:39:53 <andythenorth> then just have a single sprite
09:41:23 <andythenorth> doesn't reduce the number of var checks though, just the spritelayout
09:47:23 <peter1138> Well, with the animation fixes it matters much less.
09:48:22 * peter1138 ponders breaking a load of translations.
10:28:03 <andythenorth> Wonder what happens if I don’t set a groundsprite
10:33:01 <peter1138> Does Linus Tech Tips have anyone left? Many old presenters popping up doing solo videos instead...
11:42:54 <xarick> h
12:05:36 <andythenorth> hmm such FIRS project
12:06:02 <andythenorth> when the dock "foundations" are drawn on water, not sure I need a groundsprite at all
12:06:55 <andythenorth> probably IMHO
12:06:57 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437050829914771506/image.png?ex=6911d560&is=691083e0&hm=f53b8bbdc534130d5e83f93cfe5567b7db4bb3d5cd5566be520397d88a1314dc&
12:06:57 <andythenorth> but in transparent buildings mode, should the jetty foundations still be drawn?
12:08:04 <peter1138> Docks don't have foundations.
12:08:20 <andythenorth> yeah, dock is the wrong word
12:09:03 <andythenorth> pilings?
12:09:04 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437051364944515172/image.png?ex=6911d5e0&is=69108460&hm=0d0c977bd719c5aa03c363d48e765b921b8c4f35246a504c35ecd7c9fcdd0e21&
12:09:06 <andythenorth> jetty?
12:09:27 <peter1138> Ok, so "industry-on-water"
12:09:47 <_zephyris> Jelly?
12:10:24 <_zephyris> Jettys are for launching, from old french jetΓ©e, throw.
12:10:31 <peter1138> Is it a custom foundation, or just part of the industry building?
12:10:52 <andythenorth> it's just part of the industry building currently
12:11:04 <peter1138> (I'm not sure if they are separate things anyway)
12:11:22 <andythenorth> I think I have a branch somewhere trying to use actual custom foundations for slopes
12:11:26 <peter1138> Ideally the foundation is not transparent.
12:11:46 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437052042370613380/image.png?ex=6911d682&is=69108502&hm=906d857faa5a357221017cabaa75fc45d49486426608c11ee985477ec7417ee7&
12:11:46 <andythenorth> hmm auto-fences might need some thought too πŸ˜›
12:12:17 <peter1138> Well, you wouldn't want to fall in.
12:12:27 <andythenorth> indeed
12:12:29 <andythenorth> these are all objects ^
12:12:44 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437052279558504458/image.png?ex=6911d6ba&is=6910853a&hm=284b2a5e726a5426611533f96922400e7bb445d64e7d46dbeb22c8c47ea5c924&
12:12:44 <andythenorth> looks like I did figure out port foundations though
12:13:00 <andythenorth> wonder if I check tile height or not
12:13:22 <peter1138> Okay, there's a modifier you can apply to force the sprite of a build to not be transparent anyway.
12:13:28 <peter1138> (If that is the problem)
12:13:45 <andythenorth> there is yes
12:13:53 <peter1138> Ok.
12:14:07 <andythenorth> there isn't a problem, except deciding what behaviour is wanted
12:14:13 <peter1138> Okay.,
12:14:26 <peter1138> "Foundation" -- not transparent, buildings on top, transparent.
12:14:27 <andythenorth> spec does everything needed, with a small amount of yak shaving
12:14:53 <peter1138> Sentence formatting consistency: optional.
12:15:17 <andythenorth> such English very
12:15:50 <peter1138> Is yak shaving like cheese shaving?
12:16:43 <andythenorth> yak shavings
12:16:45 <andythenorth> yum
12:17:14 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437053418807099423/image.png?ex=6911d7ca&is=6910864a&hm=349d484f0903ebac631c872d29d994aa6b1e0dddb335ca387f1156b4c2923ec9&
12:17:14 <andythenorth> maybe I should just always use a custom 'foundation' sprite for FIRS tiles, and not the base set foundations
12:17:23 <andythenorth> mine is better than the stone πŸ˜›
12:18:21 <andythenorth> more industrial? πŸ˜›
12:19:10 <peter1138> Southeast or South-east?
12:19:13 <rito12_51026> andythenorth: What about logs from arctic terrain and custom basesets?
12:20:09 <andythenorth> peter1138: yes
12:20:31 <andythenorth> North-Northwest
12:23:27 <peter1138> andythenorthnorthwest
12:26:31 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14765: Change: Use proper tooltip strings for freeform edge toggles. https://github.com/OpenTTD/OpenTTD/pull/14765
12:31:20 <xarick> glx, can i clone an array of GSLists()? is that gonna work as I think it would?
12:32:05 <xarick> local lists = [GSList(),GSList(),GSList()];
12:32:05 <xarick> local more_lists = clone lists;
13:35:00 <andythenorth> andy-thenorth
13:35:04 *** Borg has joined #openttd
13:35:23 <andythenorth> hmm squirrels
13:36:33 <Borg> howdy
13:36:44 * andythenorth looking if nml has a built in expression to get the ground tile appropriate to terrain
13:36:49 <Borg> anyone tried to implement 2x scale zoom in map?
13:36:56 <andythenorth> ground tiles...sounds a bit BGT-like eh
13:37:01 <Borg> I have it sorta working.. but view is... unstable per pixel.. for now ;)
13:40:08 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
13:46:07 <peter1138> I have a patch for it, based on stuff in JGRPP.
13:49:57 <xarick> nop, clone didn't work as expected
13:50:09 <peter1138> Oh, nuget failed.
13:51:10 <peter1138> xarick, how do you clone a GSList()?
13:51:18 <xarick> more_lists didn't create copies of lists in lists
13:51:29 <xarick> it only points to the lists in them
13:51:31 <peter1138> Yes.
13:52:00 <peter1138> You've cloned the array, not but the objects of the array.
13:52:38 <xarick> very disappointed πŸ™
13:53:13 <peter1138> Oh, the CI publishes a nuget package, and that is failing as forbidden.
13:54:25 <xarick> for each list in lists more_lists.append(clone list) something like that?
13:56:46 <andythenorth> copy, deepcopy
13:56:46 <peter1138> Problem with a deep clone is knowing when to stop.
13:56:51 <andythenorth> dunno what squirrel has for that
13:57:32 <andythenorth> I usually find `deepcopy()` is a bit of a warning sign
13:57:49 <andythenorth> there are cases for it, but I am wary of it
13:59:26 <peter1138> Say object X contains object Y, and object Y contains a pointer to object X. A deep clone would have to not only create an object X2 and Y2, but also know that the pointer to X should (probably) not be deep cloned, but instead be changed to a pointer to X2.
14:00:23 <andythenorth> something on the squirrel 3 forum suggested json serialising the objects, then deserialising to a new table
14:00:37 <andythenorth> came with a recursion caveat
14:00:47 <peter1138> Squirrel objects are ref-counted so you don't have to care about ownership -- but ownership is something a deep clone may need to knkow.
14:01:17 <peter1138> Yeah. At least if you're serializing it then you also need to explicitly handle the recursion.
14:01:35 <peter1138> +explicitly serializing
14:01:39 <peter1138> I have no bread.
14:04:40 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437080454321668166/image.png?ex=6911f0f7&is=69109f77&hm=bc97f7d3a155c40d94826424544423bab7f2cfbb6c4aaa41d799a22e89df4f87&
14:05:01 <xarick> 109 / 88 / 88 / 66 ops... strange
14:06:06 <peter1138> "Reseted"
14:06:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437080975585706004/image.png?ex=6911f174&is=69109ff4&hm=b068ba18233e327f28f16194620b1584fee06c6c4751f1b4b080311846b55492&
14:07:58 <xarick> probably a sorter issue?
14:08:42 <xarick> no, that would make it more than 3 items counted
14:09:17 <xarick> unless there's more lists than expected
14:09:25 <xarick> let me count number of lists
14:13:24 <xarick> ah, it's the SetValue, for some reason
14:13:40 <xarick> but how
14:15:53 <peter1138> double free or corruption (out)
14:15:55 <peter1138> Uh oh
14:18:45 <xarick> got it right this time
14:19:44 <Borg> http://cache.borg.uu3.net/map_zoom2x_px_dist.png <- grrr still pixels distorted
14:22:02 <andythenorth> I have bread
14:22:07 <andythenorth> I ated some
14:22:12 <andythenorth> with cheese and ham
14:22:12 <peter1138> Borg, I'd like to make it variably scaled to be honest, not just add an extra 2x/4x zoom.
14:22:32 <andythenorth> 65k cargos for OpenTTD 16?
14:22:41 <andythenorth> I might put aside the 'big FIRS' economy for now
14:22:47 <andythenorth> do ground tile stuff πŸ˜›
14:24:25 <Borg> peter1138: that would be even harder I assume :) per pixel scaling..
14:24:29 <Borg> is it worth it?
14:24:40 <Borg> I think 2x extra zoom in in MAP will be enough
14:24:49 *** WormnestAndroid has quit IRC (Remote host closed the connection)
14:24:50 *** WormnestAndroid has joined #openttd
14:24:55 <Borg> I just need to get rid of that distorsions
14:26:36 <Borg> and im doing 2x map zoom because my new LinkGraphOverlay is so usefull now :>
14:33:52 *** Zathras_1 has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
14:45:59 <xarick> woah, safe btree stuff is so memory efficient
14:46:17 <xarick> 1.8 GB vs 10.8 GB in master
14:48:58 *** Zathras_4 has joined #openttd
14:51:04 *** Zathras_4 has quit IRC ()
14:53:21 <xarick> is this Allocator related?
15:06:33 <michi_cc[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1437096028359622728/image.png?ex=6911ff79&is=6910adf9&hm=994381a90c8bd3012292371a7acd25a392dcab53c28138b4380b9efdc69f471b&
15:06:33 <michi_cc[d]> Is this a cursed idea?
15:06:40 <michi_cc[d]> Note: not a working PR at all
15:07:05 <michi_cc[d]> Just some hardcoded stuff to experiment πŸ™‚
15:07:54 <michi_cc[d]> Collect all badges in a fixed pre-determined class and use it to generate sub-menus.
15:08:14 <michi_cc[d]> NewGRF authors will of course be mindful when defining the categories /s
15:10:39 <andythenorth> πŸ‘€
15:11:27 <andythenorth> it's definitely interesting
15:11:35 <andythenorth> 2 of the badges are for ground πŸ˜›
15:11:50 <michi_cc[d]> There's nothing in there 🀣
15:12:24 <michi_cc[d]> I imagine that a railtype with multiple category badges would be shown in all applicable submenus.
15:18:10 <peter1138> Would grouping in the same menu, rather than using sub-menus, make it easier to use?
15:22:39 <michi_cc[d]> My idea with the sub-menus was mostly to make the main menu short when having many railtypes.
15:22:49 <michi_cc[d]> *shorter
15:24:06 <andythenorth> so we could badge for e.g. gauge
15:24:09 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437100455825117254/image.png?ex=69120398&is=6910b218&hm=19bb057abb6d48b32054d8c2e881cbfc1932755e5d9cc47d87c3052f86898187&
15:25:19 <michi_cc[d]> On a related note, why is `GetRailTypeDropDownList` collecting badges when `config.show_icon` for GSF_RAILTYPES is false and thus not showing any of the badges?
15:25:35 <michi_cc[d]> Am I overlooking something in the GUI or do I need a specifically prepared NewGRF for it?
15:26:16 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437100991991382139/Zrzut_ekranu_z_2025-11-09_16-21-33.png?ex=69120418&is=6910b298&hm=4e199b9c04b5ffa052c968389af68f1f0ff5c6ef57b5c2d5e8c13f960cc5abd8&
15:26:16 <rito12_51026> michi_cc[d]: Dunno, subclasses for badges would be incompatible. I've made sorter item for dropdown.
15:27:19 <andythenorth> I see πŸ™‚
15:27:35 <andythenorth> you've avoided the pitchforks about "we can never accept a separate window"
15:27:41 <andythenorth> by pretending a window is a dropdown πŸ™‚
15:28:19 <rito12_51026> andythenorth: *dropdown is a window
15:28:36 <andythenorth> maybe in the implementation, but not in UI terms,
15:29:14 <peter1138> michi_cc[d], show_icon is not a feature thing, it's per badge class.
15:29:28 <peter1138> So you can have some badge classes visible and some not.
15:31:17 <peter1138> (And as there's no UI for configuring the badge UI for anything other than vehicles yet...)
15:31:34 <michi_cc[d]> Yes, but `GetBadgeClassConfigItem` for GSF_RAILTYPES is always returning BadgeClassConfig::EMPTY_CONFIG_ITEM.
15:31:53 <michi_cc[d]> Okay, so it is expected right now that the dropdown code is basically unused right now?
15:32:04 <peter1138> Nope.
15:32:18 <peter1138> The default value of show_icon is true.
15:32:24 <peter1138> It's not.
15:32:29 <peter1138> But it was meant to be.
15:33:49 <peter1138> I suspect I accidentally inverted it, or made the boolean inverted, during my many refactors.
15:34:00 <peter1138> So yes. it's a bug, it's meant to default to true.
15:37:19 <michi_cc[d]> Okay, inverted the default and got an instant crash opening the railtype dropdown 🀣
15:37:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
15:37:34 <peter1138> Haha
15:37:37 <peter1138> Well :)
15:37:51 <peter1138> I am still compiling.
15:39:03 <michi_cc[d]> Ah, it is because column has a default of -1
15:39:24 <michi_cc[d]> So std::max<uint> is kinda nonsensical
15:39:45 <peter1138> God f...... damn.
15:39:51 <peter1138> Who wrote this shit :(
15:39:58 <peter1138> Is that the bug that's reported too...
15:41:00 <peter1138> I have a feeling that originally -1 was meant to mean "don't display"
15:41:05 <peter1138> And then I changed it all.
15:41:57 <michi_cc[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1437104938856743033/image.png?ex=691207c5&is=6910b645&hm=d4248548bb0beceb49ac73a0028906bc6c5123cd5625b76369b7cc035a3648db&
15:41:57 <michi_cc[d]> Eh, padding kinda sus, too
15:42:07 <michi_cc[d]> (Set column defaukt to 0 for this)
15:42:28 <peter1138> Ok.
15:43:53 <belajalilija> michi_cc[d]: AC electric should be blue and DC red
15:44:07 <peter1138> Does not matter for simply testing that an icon is drawn.
15:44:42 <belajalilija> no way for me to know that
15:50:30 *** Smedles_ has joined #openttd
15:50:56 <xarick> woah, they killed the website... https://mathsolver.microsoft.com/
15:53:02 <xarick> am I dreaming? wasn't there an online site?
15:54:02 *** Smedles has quit IRC (Ping timeout: 480 seconds)
16:00:25 <peter1138> Yup, I clearly refactored and didn't test properly. Idiot.
16:01:34 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14765: Change: Use proper tooltip strings for freeform edge toggles. https://github.com/OpenTTD/OpenTTD/pull/14765#pullrequestreview-3440106936
16:02:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14759: Codefix 8f14894: Correct the comment for GetClassBadge function. https://github.com/OpenTTD/OpenTTD/pull/14759#pullrequestreview-3440107977
16:02:30 <andythenorth> code happens πŸ˜›
16:02:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14766: Fix c2d4098afa: Unconfigured badge classes should be visible by default. https://github.com/OpenTTD/OpenTTD/pull/14766
16:03:32 <peter1138> Now, padding...
16:07:53 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3440110386
16:11:44 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14743: Feature: Configurable sign text colors in scenario editor. https://github.com/OpenTTD/OpenTTD/pull/14743#pullrequestreview-3440115227
16:12:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3440115474
16:12:43 <peter1138> Hmm, why is this terminal not updating properly :(
16:14:29 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3440117261
16:19:46 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit commented on pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3440119805
16:22:00 *** Wormnest has joined #openttd
16:23:48 <rito12_51026> How to add a new palette?
16:24:11 *** Smedles has joined #openttd
16:24:15 <peter1138> You can't, there is only the DOS palette.
16:24:22 *** Smedles_ has quit IRC (Ping timeout: 480 seconds)
16:24:26 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744
16:25:52 <rito12_51026> But like the newgrf recolour sprites
16:29:20 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14744: Feature: Signs, waypoint and station names may be moved https://github.com/OpenTTD/OpenTTD/pull/14744#pullrequestreview-3440123184
16:29:40 <rito12_51026> I want to recolour black sprite into a white one, so it is visible on the black background
16:29:48 <DorpsGek> [OpenTTD/OpenTTD] michicc merged pull request #14759: Codefix 8f14894: Correct the comment for GetClassBadge function. https://github.com/OpenTTD/OpenTTD/pull/14759
16:34:13 <talltyler> Hmm, CodeQL checks are failing
16:37:00 <mmtunligit> the only thing i changed between the previous one and the current one was the comments and taking the thing out of the helper function and putting it inline instead
16:37:15 <talltyler> You didn't break CodeQL, it's failing on all PRs πŸ™‚
16:37:20 <mmtunligit> oh lol
16:38:00 <mmtunligit> I also remeber i put it in a helper function because I was gonna do a seperate PR later to have the "default" button hidden the same way
16:38:19 <mmtunligit> and they could jsut be in one thing with a comprehensible name and purpose
16:41:07 <mmtunligit> and i want to do one to make sign Ui just use the query string windoww, i dont really see any reason to have it be its own bespoke thing that looks and works identically
16:44:39 <peter1138> rito12_51026, yeah, recolour sprites are not palettes :)
16:44:43 <peter1138> And yes, they are sprites.
16:45:09 <peter1138> So a new add a recolour sprite it needs to be added to openttd.cfg
16:45:17 <peter1138> So to add a new recolour sprite it needs to be added to openttd.cfg
16:45:27 <peter1138> So to add a new recolour sprite it needs to be added to openttd.grf
16:45:29 <peter1138> ffs.
16:47:04 <peter1138> Alternatively, make a version of the black sprite but in white.
16:48:01 <peter1138> OpenTTD doesn't really do black backgrounds though.
17:21:15 <Borg> hah okey.. I gave up
17:21:28 <Borg> whole small map needs to be rewritten first..
17:21:41 <Borg> I looked at city mania branch how they did it
17:22:17 <Borg> will take a bite on it in next week..
17:24:51 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437130833285615828/image.png?ex=69121fe3&is=6910ce63&hm=b16d64356d42ec5a1cd9ab35587b2bdf62ac44209b6457e81221632bc993be73&
17:24:51 <andythenorth> should FIRS industries have specific ground sprites, like house?
17:25:03 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437130884355461342/image.png?ex=69121fef&is=6910ce6f&hm=a5808d2ccfc5cdc4666ea9b17d7c496fe651e1571d1167e3a3cb055789c9e620&
17:25:17 <andythenorth> spoiler: I didn't draw them due to time πŸ˜›
17:25:36 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437131021421121676/image.png?ex=69122010&is=6910ce90&hm=d0ba8a14b5857b078985cf03bf63c4765e147455347528e4b0ec1291b9007018&
17:25:36 <andythenorth> seems I did one here
17:27:34 <peter1138> If you want to make it vaguely identifiable, but it's not really necessary.
17:28:15 <peter1138> But for things like the car park stuff, the ground sprite should have lines on it, and the "building" should just be the vehicles on top.
17:29:19 <xarick> openttd memory management in squirrel feels slow, erratic at times... need to investigate if it's really a me problem
17:29:46 <xarick> so I'm clearing an array of 10000 lists
17:29:48 <peter1138> It's usually because you're making lists with 10,000,000 items.
17:29:55 <xarick> sometimes it's fast, sometimes it's slow
17:30:04 <xarick> why isn't it the same time
17:30:15 <xarick> they're the same lists
17:30:20 <xarick> i mean, their contents are
17:32:52 <peter1138> Hmm, I see, for "car park" trucks in the yard, you've got the lines as part of the building sprite too.
17:33:01 <michi_cc[d]> So, is it worth spending more time on the railtype sub-menu idea, or should I just put into to storage closet "back there"?
17:34:50 <peter1138> It's an interesting approach for sure.
17:35:38 <peter1138> I'm not sure grouping by badge is the right approach though.
17:36:05 <peter1138> I've wondered before if we should have more rail/road type properties that can be used to organise the lists.
17:36:08 <michi_cc[d]> Spending more time would mean stuff like making the submenu actually functional, right now the mouse movement somehow just goes right through to the base dropdown πŸ™‚
17:36:16 <peter1138> Heh
17:36:39 <peter1138> One way to avoid submenus is to make groups expand/collapse, but within the list.
17:37:18 <peter1138> (But then again, badges are sort of a way to have those otherwise unneeded properties and allow authors to do whatever)
17:37:37 <michi_cc[d]> Yes, specific property(ies) could be used. But then again, what would you want for a group? A text, maybe an icon and a list of railtypes to go into the group.
17:37:41 <michi_cc[d]> Sounds like a badge to me.
17:38:58 <michi_cc[d]> The risk is in allowing authors to freely define categories, because someone will make a separate category for each railtype, just to spite everybody :p
17:39:00 <peter1138> And then: "what about purchasing vehicles"
17:39:23 <peter1138> michi_cc[d], yeah, that was one reason for the idea of implementing some default badges.
17:40:42 <peter1138> What ideas can be taken from the rail type "schemes" that people have come up with.
17:41:05 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437134918164414564/image.png?ex=691223b1&is=6910d231&hm=7c82792b01bf393a7dfb7c53a3b70c37a52308a03f57730660734d591ba3be8d&
17:41:05 <xarick> these times here
17:41:25 <peter1138> Gauge, axle load, power...
17:41:51 <peter1138> "Reseted"
17:41:56 <xarick> it should all just be the same
17:42:25 <xarick> not the first one because it's coming from a smaller list
17:43:01 <xarick> but the others, they're essentially cloned lists
17:43:53 <xarick> i clear the array first, then clone
17:45:21 <peter1138> What does "Reseted ... item values" even mean.
17:45:35 <xarick> let me post the code in gist
17:46:35 <xarick> <https://gist.github.com/SamuXarick/ea391c07b1b43967bfcd51f609f77509>
17:48:00 *** Borg has quit IRC (Quit: leaving)
18:02:06 <_glx_> cloning takes time, it has to copy all items/values from one list to the other
18:02:51 <andythenorth> peter1138: how about actual 'type of infrastructure'? πŸ˜›
18:03:17 <peter1138> First, yeah.
18:03:50 <andythenorth> the railtype standardised spec chat obsesses about gauge
18:04:08 <andythenorth> but the first character is 'track type and gauge' https://newgrf-specs.tt-wiki.net/wiki/Standardized_Railtype_Scheme#Track_type_and_gauge_class_.5BX.2A.2A.2A.5D
18:04:47 <peter1138> Yes, because model railwayers are not interested in things like monorail or maglev, only rails and, oddly, tiles with no rail at all.
18:04:56 <andythenorth> and the type of sleepers
18:05:19 <peter1138> I wish this keyboard could do key-split :/
18:05:33 <andythenorth> and it's really important to have the right sleepers, but US trains can run in the london tube fine
18:05:46 <andythenorth> hmm unrelated...might we draw badges on industry tiles directly? πŸ˜›
18:05:48 <andythenorth> in the middle?
18:06:18 <talltyler> Tiles with no rail are used for filling ground textures when the actual rail is diagonal
18:06:42 <peter1138> Some linux audio nerd would probably just write a one-liner csound thing, claim it's super easy, and not actually help.
18:07:22 <andythenorth> wouldn't they pipe it all through emacs or something?
18:07:30 <_glx_> though I don't think clone would be the cause for the huge time change
18:07:35 <andythenorth> I presume emacs is the audio editor du jour for some linux people
18:07:36 <peter1138> emacs has too much of an interface.
18:08:17 <andythenorth> I presumed correctly, according to google
18:08:35 <andythenorth> I probably don't deserve a cookie for winning that internet game
18:08:47 <peter1138> Well, there's that web-based programming language thing that I've forgotten the name of.
18:08:58 <andythenorth> Perl?
18:11:08 <andythenorth> hmm probably not going to draw 800 or so unique ground overlays with black areas to indicate building outline πŸ˜›
18:11:20 * andythenorth briefly considered it
18:11:35 <talltyler> I don't think those ground tiles are necessary
18:12:33 <peter1138> No, strudel.
18:15:44 <kaji_kaede> peter1138: Not a whole lot of monorail nor maglev to be modelled.
18:16:03 <rito12_51026> peter1138: > OpenTTD doesn't really do black backgrounds though.
18:16:05 <rito12_51026> The selected item inside the dropdown has black bg
18:19:46 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437144651403362488/image.png?ex=69122cc1&is=6910db41&hm=f6edc379283e75cc10dca72bc750ffc0eb209482268920179b9f265443170902&
18:19:46 <xarick> looks strange
18:20:45 <xarick> this is not master, but my std::map/std::set implementation
18:20:52 <xarick> gonna do master now, brb
18:22:28 <xarick> that escalator happens at the SlowValuate where the original list is sorted by value
18:22:47 <xarick> but no escalator happens when the original list is sorted by item
18:22:48 <xarick> it's flat
18:24:59 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437145965348917278/image.png?ex=69122dfb&is=6910dc7b&hm=37c932bb18a74dbbbfc245f657d5bff0a91de1114f9ee9c6697a3dcdffad8037&
18:24:59 <andythenorth> hmm default houses have quite a lot of the ground always shown
18:25:12 <andythenorth> including crates, fences etc
18:26:15 *** kuka_lie has joined #openttd
18:26:15 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437146286334935120/image.png?ex=69122e47&is=6910dcc7&hm=a4e7c8380e42bbef30b9ad0f917950f3a982ab14e7b0e250f09e9ebd7b6afcdc&
18:26:15 <andythenorth> possibly industries like this should only hide the buildings, not the cargo
18:27:19 <andythenorth> but some of them have z height
18:28:03 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437146737050648636/image.png?ex=69122eb3&is=6910dd33&hm=60680fa563f24563808a2d4745b41728e1650fb88bc2e3e8feef1b68d39b7f8d&
18:28:03 <andythenorth> default clips to the tile boundary
18:28:56 <andythenorth> "what's transparent mode for?"
18:34:01 <xarick> the slowdown part seems to be caused by `array.clear()`
18:36:07 <xarick> clearing the array would mean calling `~ScriptList()` as many times as there are lists?
18:38:54 <xarick> dang, master is so much worse
18:39:02 <xarick> peaks at 15 GB mem use
18:39:15 <xarick> test still running
18:43:06 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1437150525316399188/ragaruno.png?ex=6912323a&is=6910e0ba&hm=5f2921cfd041626b7063dda71eb201bd309d38b2eb27c911e165ec0175329a8a&
18:43:06 <talltyler> andythenorth: In case you're ever questioning FIRS having split industry layouts and extra tiles for decoration, here is proof that at least one player (me) uses them πŸ™‚
18:43:28 <andythenorth> hurrah
18:43:38 <andythenorth> I haven't questioned it recently πŸ™‚
18:43:42 <andythenorth> I use them constantly
18:44:04 <andythenorth> I think I do want to do something about industry ground tiles and transparent mode
18:44:12 <andythenorth> but it has to be cheap on time πŸ˜›
18:45:04 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1437151018180804749/more.png?ex=691232af&is=6910e12f&hm=11edcad5dfd718d526e906ba488b1bafef0b87a6c8b8af4ffaf4df5dfc9e0c51&
18:45:04 <talltyler> More industries I build recently πŸ™‚
18:45:22 <talltyler> It's nice to mix and match tiles from different industries
18:45:26 <andythenorth> hmm I think the only way transparent mode tiles can work is like original base set - suspend disbelief
18:45:57 <andythenorth> yeah that screenshot has gone nicely for world building πŸ™‚
18:48:47 <peter1138> Wasn't the double-industry thing a bug according to Reddit?
18:57:25 <andythenorth> and forums
18:57:27 <andythenorth> mostly forums
18:57:31 <andythenorth> massive pitchforks
18:58:00 <kaji_kaede> talltyler: Shit, this all looks good...
18:58:21 <kaji_kaede> Biggest issue for me with industries is just that I'd never have a clue where to even put half the dang station tiles.
18:59:36 <kaji_kaede> Though to be fair maybe I just gotta see more of this for inspiration.
19:05:43 <andythenorth> ok this was cheap, what do we think?
19:05:45 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437156226122252419/image.png?ex=69123789&is=6910e609&hm=0ba832bc0b9b8220dde62f1f67b3bb804c0013b938e5228f3f0010ce4e3ef84c&
19:05:51 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437156249509822576/image.png?ex=6912378e&is=6910e60e&hm=027f127ebdab833ba00b7ae045e8dcc0854cccfc45caad3af7ca31f002d8742f&
19:10:41 <peter1138> _glx_, I think you have more access to github things than me, do you have any idea about the CI nuget package authorisation failure?
19:42:23 <DorpsGek> [OpenTTD/OpenTTD] Rau771 commented on pull request #14717: Feature: New selection for rail types. https://github.com/OpenTTD/OpenTTD/pull/14717#issuecomment-3508748997
19:45:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437166224793534604/image.png?ex=691240d9&is=6910ef59&hm=fb24833e11c37b55a95b1d3f5b0d44dc2c5f412dec5c1b48a2290f0a112cb077&
19:45:29 <xarick> hmm...
19:55:16 <xarick> erase_tree
19:56:42 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437169043852234996/image.png?ex=69124379&is=6910f1f9&hm=6a51b260bb6411718daabc697d309b3b2b1439f4f69020830c354656c99f92d6&
19:56:42 <xarick> woah that's deep
19:58:10 <xarick> std::set?
20:00:21 <xarick> seems to be the bucket list per value
20:00:28 <xarick> ScriptListBucket
20:02:55 <xarick> oh, each item has a different value on my custom valuator
20:03:21 <xarick> that means as many buckets as there are items?
20:05:26 <xarick> so I imagine if my valuator assigned the same value for every items, there would only be 1 bucket?
20:05:41 <xarick> aka, faster clear?
20:24:09 <_glx_> peter1138: the issue is not the nuget thing (GITHUB_TOKEN not having the correct permissions), but a failure to download libdasm source from sourceforge
20:24:25 <_glx_> nuget messages are not new
20:30:35 <peter1138> Oh, so I suck at reading the error. Sorry :(
20:31:39 <_glx_> well nuget is so verbose it's hard to find the actual error hidden inside all the log
20:35:08 *** gelignite has quit IRC (Read error: Connection reset by peer)
20:43:50 *** gelignite has joined #openttd
20:44:05 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437180969688764537/Zrzut_ekranu_z_2025-11-09_21-42-25.png?ex=69124e94&is=6910fd14&hm=2876f9a6a11f7b6dfb20a00b517fb24e0005230e37971d6bc4b86a00a9525d4a&
20:44:05 <rito12_51026> peter1138: That was not easy
20:44:49 <peter1138> Oh, the solution to that is to make that row unselectable.
20:45:04 <peter1138> Because highlighting the whole thing in black doesn't make sense.
20:46:45 <peter1138> ALthough currently if it's not selectable the click stuff doesn't work, but I can imagine breaking it out to allow that to work without highlighting it.
20:48:03 <peter1138> Or do it like the badge configuration, where the separate clickable parts on top appear as their own buttons which overlay the black.
20:48:45 <peter1138> Sort of an XY problem here :/
20:49:33 <peter1138> You asked "How do I use a new custom colour remap", when the better question is "How d I add a clickable button do a drop down"
20:49:57 <andythenorth> what's that quote about "just because we could...doesn't mean we should"?
20:51:26 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #14767: Codefix 6d495d1: [Actions] vcpkg caching for codeql requires some permissions https://github.com/OpenTTD/OpenTTD/pull/14767
20:51:41 <_glx_> it should be less annoying now
20:53:13 <_glx_> and most likely should use the cached packages from linux nightly build
20:54:54 <_glx_> yup it's better when it can restore packages from the cache
21:07:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #14767: Codefix 6d495d1: [Actions] vcpkg caching for codeql requires some permissions https://github.com/OpenTTD/OpenTTD/pull/14767#pullrequestreview-3440367487
21:32:03 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #14767: Codefix 6d495d1: [Actions] vcpkg caching for codeql requires some permissions https://github.com/OpenTTD/OpenTTD/pull/14767
21:39:29 <peter1138> Rebase needed I guess.
21:39:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14765: Change: Use proper tooltip strings for freeform edge toggles. https://github.com/OpenTTD/OpenTTD/pull/14765
21:43:30 <_glx_> yup as always, rebase needed
21:50:28 <andythenorth> hmm to make these water objects work, I need to sometimes handle ground overlays etc
21:50:30 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1437197686037282846/image.png?ex=69125e26&is=69110ca6&hm=26fdb897fd23518210d25e47b2e825e025d43a1725db10d39d06aa1dfd52eb8d&
21:50:45 <andythenorth> which are usually provided as groundsprite and childsprite
21:51:03 <andythenorth> that won't work here, groundsprite has no zoffset
21:52:29 <andythenorth> but if I use a `building` sprite, the overlay is drawn over the tile behind
21:52:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437198199302389952/image.png?ex=69125ea0&is=69110d20&hm=55e3a5161e8a432349e43b9b41e05f05d0d0add6f32792fb71709c0d2ee9b5c9&
21:52:32 <xarick> this is how SlowValuate operates inside the vm, interesting
21:53:15 <andythenorth> and I'm not supposed to adjust the `zextent`
21:55:37 <peter1138> Well.
21:55:52 <peter1138> What do you mean?
21:58:18 <xarick> very inefficient indeed
22:00:05 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437200097132675143/image.png?ex=69126065&is=69110ee5&hm=6528ea81a063987ce9ffc2ba89354350ecb65516aefe79bc70459daadee45907&
22:00:42 <peter1138> Well I was asking andythenorth.
22:01:56 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/NML:Spritelayout#Positioning
22:02:12 <andythenorth> "unless you know exactly what you're doing" does not apply to me
22:02:24 <andythenorth> I do not know what I'm doing πŸ˜›
22:02:44 <reldred> Then find out what you’re doing then πŸ˜›
22:02:59 <andythenorth> trial and error
22:03:11 <andythenorth> hmm
22:03:37 <andythenorth> dunno maybe objects on water are not a good idea πŸ™‚
22:03:55 <andythenorth> it's too much conditional crap in the spritelayout
22:03:58 <reldred> They’re a delightful idea
22:04:04 <reldred> I’d use them
22:04:07 <andythenorth> me too
22:04:10 <reldred> A lot of folks would I think
22:04:17 <andythenorth> but the chances of it working .... I think are low
22:06:04 <andythenorth> fucking about with something that is supposed to be a ground tile....low chance of success
22:08:20 <peter1138> zextent is just the height of it, it's... really quite simple.
22:09:36 <xarick> funny, an array is actually a vector
22:10:14 <peter1138> A squirrel array is an array.
22:10:19 <andythenorth> maybe I just set zextent to 1 for fake groundsprite
22:10:26 <peter1138> How it's implemented behind the scenes doesn't matter.
22:10:36 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437202745152245830/image.png?ex=691262dc&is=6911115c&hm=7151de1a92a86c57dc9f3a60f3b7281ad8a6933d2e981fdd361123c44341aff3&
22:10:57 <xarick> array.clear() does ScriptList::~ScriptList
22:11:08 <xarick> finally understand why it's so slow
22:11:33 <peter1138> Is that somehow surprising?
22:11:38 <xarick> but i still don't understand why duration is varied
22:13:25 <xarick> why does it require to do some tidying
22:14:21 <peter1138> You're deleting the list. Deleting an object always calls its destructor.
22:15:12 <peter1138> The items and buckets of the list need to be deleted.
22:15:23 <xarick> it's like it's cleaning your boots only to then throw them out the window at the end
22:15:47 <xarick> just throw them out, no cleaning
22:16:04 <peter1138> It is only throwing them out.
22:17:37 <xarick> rotting boots, i might add
22:20:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14765: Change: Use proper tooltip strings for freeform edge toggles. https://github.com/OpenTTD/OpenTTD/pull/14765#pullrequestreview-3440395758
22:21:26 <andythenorth> hmm now is not the time to try and find sprite sorter glitches eh πŸ˜›
22:21:28 <andythenorth> naptime
22:40:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14765: Change: Use proper tooltip strings for freeform edge toggles. https://github.com/OpenTTD/OpenTTD/pull/14765
22:48:21 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:02:56 <audigex> xarick: Jesus christ
23:04:15 <audigex> Is that not equivalent to something like this?
23:04:15 <audigex> foreach (item, _ in this) {
23:04:15 <audigex> list[item] = valuator_function.acall([item].extend(vargv));
23:04:15 <audigex> }
23:04:15 <audigex> this.Clear();
23:04:16 *** kuka_lie has quit IRC (Quit: Lost terminal)
23:04:17 <audigex> this.AddList(list);
23:04:57 <xarick> will that work? hmm
23:05:02 <xarick> let's try
23:05:43 <audigex> I'm no squirrel pro and I wrote it in about 20 seconds, but if not exactly that then I'm sure you could do something approximately similar
23:19:40 <rito12_51026> https://cdn.discordapp.com/attachments/1008473233844097104/1437220122983927818/Zrzut_ekranu_z_2025-11-10_00-16-55.png?ex=6912730b&is=6911218b&hm=0c131d22c17237bf37e9e8d7ca3fad2843c6d50154b7c7d86ef94e8358085646&
23:19:40 <rito12_51026> peter1138: Changing colour to green instead of black also works?
23:21:08 <peter1138> That's one way to completely miss the point.
23:23:43 <xarick> audigex: didn't work
23:25:52 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1437221686016606278/image.png?ex=69127480&is=69112300&hm=faea4122ad499c4022a84d96453484140afa1ef203417ce3d4bc7daa2ede7f43&
23:26:29 <peter1138> rito12_51026, when you put a button in a dropdown item, the background colour of the dropdown item doesn't matter: https://fuzzle.org/~petern/ottd/buttonsindropdown.png
23:28:15 <peter1138> rito12_51026, so basically, we already use the button-in-dropdown-item approach, rather than what you attempted which is dropdown-item-as-button.
23:28:59 <peter1138> xarick, if you step through that sq_clear, ask yourself what is it clearing.
23:50:19 *** gelignite has quit IRC ()
23:58:23 <xarick> it's resizing to 0
23:59:53 <xarick> ```for(SQUnsignedInteger i = newsize; i < _size; i++) {
23:59:53 <xarick> _vals[i].~T();
23:59:53 <xarick> }
23:59:53 <xarick> _size = (size_t)newsize;```