IRC logs for #openttd on OFTC at 2025-11-29
            
00:47:51 *** lobstarooo has joined #openttd
00:47:51 *** lobster has quit IRC (Read error: Connection reset by peer)
01:08:37 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #14762: Change: [Script] Spread ScriptList::Valuate load over multiple ticks https://github.com/OpenTTD/OpenTTD/pull/14762
01:10:46 *** tokai|noir has joined #openttd
01:10:46 *** ChanServ sets mode: +v tokai|noir
01:13:14 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #14762: Change: [Script] Spread ScriptList::Valuate load over multiple ticks https://github.com/OpenTTD/OpenTTD/pull/14762
01:17:40 *** tokai has quit IRC (Ping timeout: 480 seconds)
01:18:11 <jfkuayue> 
01:18:21 <jfkuayue> wait how i type this
01:19:00 <jfkuayue> space + touchpad middle button.
02:31:13 *** kuka_lie has quit IRC (Quit: Lost terminal)
02:54:05 *** Tirili has quit IRC (Quit: Leaving)
03:23:41 *** gnu_jj_ has joined #openttd
03:27:05 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:40:08 *** Wormnest has quit IRC (Quit: Leaving)
03:40:44 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14831: Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons https://github.com/OpenTTD/OpenTTD/pull/14831#pullrequestreview-3520457209
04:39:58 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/18103546227a470e1b1cdb5972e7f3da3b801784
04:39:59 <DorpsGek> - Update: Translations from eints (by translators)
06:44:12 *** keikoz has quit IRC ()
06:45:41 *** keikoz has joined #openttd
07:03:54 *** Flygon has joined #openttd
07:50:40 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14831: Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons https://github.com/OpenTTD/OpenTTD/pull/14831
07:50:55 <mmtunligit> *dont code when youre tired, you make stupid mistakes*
08:03:16 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
08:18:28 <kaji_kaede> very fun :>
08:23:25 <LordAro> mmtunligit: woah, deja vu
08:23:33 <mmtunligit> yep
08:23:37 <LordAro> :p
08:23:53 <mmtunligit> this PR has me feeling liek the entire circus
08:30:57 *** Zathras_4 has joined #openttd
08:50:49 <kuhnovic> I don't need to be tired to make stupid mistakes
08:55:52 <rito12_51026> Lucky you
09:02:41 <mmtunligit> does discord formatting come through on IRC?
09:03:04 <mmtunligit> or is it just the raw text
09:22:15 *** Wolf01 has joined #openttd
10:05:41 <LordAro> just text
10:06:45 <mmtunligit> ah, so my italics for emphasis were not seen lol
10:13:28 <peter1138> Sort of. Discord just wraps text with asterisks for italics, which in the traditional world means bold.
10:15:17 <peter1138> https://modern.ircdocs.horse/formatting.html#characters
10:15:31 <peter1138> Not sure which of those works, and which would get me banned from the server :)
10:21:51 <peter1138> *bold* _underlined_ /italic/
10:22:24 <mmtunligit> https://cdn.discordapp.com/attachments/1008473233844097104/1444272277855273041/image.png?ex=692c1ae0&is=692ac960&hm=b2dceefe66ec59fc4d08cad885a9632dc433b0dcc72895d7ca30de469cd41101&
10:22:24 <mmtunligit> discord says no
10:22:39 <mmtunligit> i wonder why it didnt adopt the standard
10:23:08 *** Borg has joined #openttd
10:23:16 <Borg> hoi...
10:23:24 <michi_cc[d]> *italic* **bold** is Markdown syntax
10:23:32 <Borg> so.. Pernament Storage for Object (per GRF) was extended to 256 bytes...
10:23:40 <peter1138> michi_cc[d], es.
10:23:42 <peter1138> +y
10:24:01 <Borg> kinda exceesive.. anyway.. do we have Global Pernament Storage (per GRF) ? I could not find anything like that in newGRF spec..
10:24:05 <michi_cc[d]> So apparently Discord though thata Markdown sounded more modern than IRC 🙂
10:24:08 <peter1138> Borg, 256 entries, not 256 bytes.
10:24:19 <peter1138> And no, there is no per-grf storage.
10:24:21 <Borg> if so.. maybe smarter decision would be to do 128 entries per object.. and 128 entries global
10:24:39 <Borg> and those upper 128 entries could be accessible from whatever mode (general or related)
10:24:49 <peter1138> Too late now.
10:25:11 <Borg> maybe... do we have any newGRF that sport 256 entries of pernament storage?
10:25:16 <Borg> 16 was enough [;
10:25:32 <peter1138> Apparently 16 wasn't enough otherwise it would not have been extended.
10:26:05 <Borg> okey.. so still.. maybe some poll on tt-forums for this...
10:27:10 <Borg> another solution.. is to have yet another access mode.. like.. world.. are they any bytes free for this?
10:27:49 <Borg> so.. there could be 256 entries global.. but now.. moving data around would requires extra steps.. store into temporary.. (or use last chain result) and switch access mode.. and store data
10:30:49 <andythenorth> Just use GS
10:31:23 <peter1138> Probably quite a few NewGRFs aren't going to work properly in 1.8 anyway.
10:32:02 <Borg> andythenorth: hmm..
10:32:16 <andythenorth> NewGRF isn't for map-global things
10:32:22 <andythenorth> For that you should use GS
10:32:25 <peter1138> andythenorth, snowline.
10:32:37 <Borg> andythenorth: can GS access pernament storage of objects now?
10:33:04 <andythenorth> no
10:33:07 <Borg> also.. using GS for that would be excessive..
10:33:10 <Borg> so.. no GS
10:33:35 <andythenorth> peter1138: it never was a consistent rule eh 😛
10:33:53 <Borg> peter1138: no worries.. I can backport whatever I want to my fork :)
10:34:04 <Borg> but.. I pretty much play only w/ my own GRFs..
10:34:19 <peter1138> Or just switch your OS to Linux and run current OpenTTD.
10:35:04 <Borg> but im happy right now :)
10:36:54 <Borg> it seems there are free bytes for VarAction2.. 0x80 are reserved for this
10:37:12 <Borg> so having 83 87 8B for world/global variables is possible
10:37:39 <Borg> but.. if noone ever requested that :) might not be needed indeed...
10:37:53 <Borg> I was toying w/ global electricity idea today...
10:38:06 <Borg> per Town is interesting, especially in multiplayer.. but :) well. idea sparked
10:39:46 <peter1138> Parent Parent Parent scope.
10:39:49 <Borg> oh cant use 83 its for Parent scope
10:40:35 <peter1138> I'm not sure if 0x80+ is specifically reserved, or if just those values are treated specially.
10:40:40 <peter1138> In the code it's the latter.
10:41:17 <Borg> * if 80 or greater, this is a randomized or variational
10:41:21 <Borg> is this comment invalid?
10:42:57 <peter1138> It doesn't match the code, and I don't think it appears in the NewGRF spec.
10:44:01 <Borg> yeah it doesnt.. the question is about spec.. whatever values > 128 are allowed for sprites..
10:44:15 <Borg> that would be weird.. having holes reserved for special values
10:44:16 <peter1138> The spec never mentions that `num-ent1` and `type` overlap, and that you can't have a `num-ent1` of 0x80 or more.
10:44:40 <Borg> oh.. so its ok
10:44:42 <peter1138> I'm willing to bet that nothing does use other values > 0x80;
10:45:05 <peter1138> But the spec currently doesn't say no.
10:45:16 <Borg> 0x87 0x8B 0x8F would be ok [;
10:45:29 <peter1138> These days most current sets have no idea what num-loaded/num-loading are for.
10:45:41 <peter1138> NML kind made everyone use variables instead of those.
10:45:51 <peter1138> *kinda
10:46:08 <mmtunligit> if i wanted to embed an editbox in a dropdown, is that something id have to change in the dropdown files or is there some other way to do it, i can think of a few ways to cheat it but id like to do it properly
10:49:38 <peter1138> You'd need to change the dropdown code.
10:50:04 <mmtunligit> joy of joys
10:50:05 <Rubidium> wait! what? you don't have a stash for that? :D
10:50:33 <peter1138> Until recently dropdowns always closed when you clicked, so... no :)
10:51:10 <peter1138> 914 files to compile, eesh.
10:51:27 <peter1138> (I tried rebasing an old branch, failed, and of course that means it's back to that old branch...)
10:52:41 <mmtunligit> additionally, should i make a separate PR for that?
11:13:44 <xarick> I'm experimenting unordered_map with a std::vector helper for the indexes sorting
11:14:15 <xarick> but i'm not getting it right yet for removal of items 😐
11:15:24 <xarick> looks promising
11:15:41 <xarick> 21 seconds adding 30 million items
11:16:28 <andythenorth> wonder how fast Horse would compile with 30 million trains
11:16:37 <xarick> hehe
11:22:31 <DorpsGek> [OpenTTD/nml] PeterN opened pull request #400: Change: Validate action 2 loaded list does not overlap special types. https://github.com/OpenTTD/nml/pull/400
11:23:33 <peter1138> andythenorth, well, I did have a patch to increase the engine limit...
11:24:37 <mmtunligit> extremely wanting to cheat and have the collections dropdown menu just also open an editbox that looks like its part of the dropdown but technically isnt, i cant even begin to wrap my head around properly embedding one
11:24:38 <peter1138> But as variants are already a shit-show for AIs probably not wise :)
11:25:10 <peter1138> Separate window might work, but watch out for focus issues.
11:26:00 <mmtunligit> yeah, it just feels wrong and i dont want to be hacky but also i want something that works
11:28:52 <peter1138> Depends where you want the filter to be. If it's at the top of the dropdown, then adding an editbox at the top isn't too much hassle, right?
11:29:09 <peter1138> Then you can just have a parameter to turn that on/off.
11:30:30 <mmtunligit> yeah at the top wouldnt be hard, i guess i just have it my head that i shouldnt "cheat"
11:31:04 <peter1138> I can imagine that having an text filter to search for game language, currenty, etc, might be useful, as well.
11:31:08 <peter1138> -n
11:31:32 <peter1138> ... in which case it's entirely possible to add editbox functionality as a separate PR that does that.
11:33:20 <mmtunligit> yeah, i can do the hacky way now and once its actually done and works i or someone else could go back and put something properly in the dropdown list. itd make searching through cargotypes so much nicer and imo, solve the whole railtype mess
11:33:26 <mmtunligit> just type in the thing you want
11:34:28 <peter1138> Well.
11:34:56 <peter1138> Should I have a go at the general dropdown-filter box?
11:36:12 <mmtunligit> yeah i think its a good idea and useful feature, and would also personally appreciate it, and seeing how you do it
11:37:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14836: Change: Explicitly reserve sprite group types >= 0x80. https://github.com/OpenTTD/OpenTTD/pull/14836
11:42:23 <Borg> oh ;) I see some actions
11:50:58 <michi_cc[d]> frosch's https://wiki.openttd.org/en/Development/Design%20Drafts/NewGRF/Secondary%20Related%20Objects eh? 😛
11:51:44 <peter1138> Dunno :)
11:52:19 <peter1138> But JGRPP already uses an additional type, though in traditional fashion it treats that as an extension which has more stuff behind it.
11:55:29 <andythenorth> that frosch post contains strong opinions 🙂
11:55:58 <andythenorth> is there any need for random action 2 that couldn't be substituted by something else?
11:56:07 <andythenorth> (obviously we have legacy grfs)
11:56:34 <peter1138> Should I leave the house today?
11:58:07 <andythenorth> I am going to
11:58:13 <andythenorth> very sunny
12:01:55 <peter1138> Soaking wet here.
12:07:32 <Borg> oh so there are moar values in 0x80 range... still, my range fits :)
12:20:58 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfilter.png
12:21:04 <peter1138> Hmm.
12:23:01 <mmtunligit> oooh
12:24:21 <Borg> yeah.. good feature
12:30:50 <andythenorth> typeahead widget 🙂
12:31:01 <andythenorth> can I hit enter to accept the result?
12:32:08 <peter1138> No, because at the moment it does absolutely nothing.
12:40:53 <Borg> the enter hit should work only when there is just 1 item left..
12:41:40 <peter1138> Step 1: make it work at all...
12:44:45 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfilterz.png
12:44:49 <peter1138> It's doing things.
12:47:46 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfilterrail.png
12:47:54 <peter1138> I actually forgot that it... works here for free...
12:49:13 <mmtunligit> yeah thats why i wanted to make it as an actual dropdown feature and not just a hack
12:49:33 <peter1138> Looks like you might not need to do any of it :D
12:49:43 <mmtunligit> hehe
12:50:14 <pickpacket> God I really want to get back to coding on the game. Life's been very busy
12:52:51 *** kuka_lie has joined #openttd
12:55:29 <peter1138> Okay, so you can stuff filterable text into a dropdown item, it doesn't have to be displayed.
12:55:49 <peter1138> Means it's possible to filter in badges attached to railtypes.
12:56:10 <peter1138> Of course nobody does that yet...
12:57:00 <peter1138> Should the height of the dropdown window shrink/expand? Hmm.
12:58:05 <michi_cc[d]> Hierarchical dropdowns with filters in level and freely configurable badge display and groupings in a window that can be detached to a floating toolbar /s
12:58:29 <peter1138> michi_cc[d], did you add text filter already?
12:58:54 <michi_cc[d]> No, only hierarchy, and not even configurable 😛
12:58:59 <peter1138> Ah, ok.
12:59:10 <peter1138> So no conflict there.
12:59:25 <michi_cc[d]> It was "synthesis" of all railtype selection PRs/ideas 🙂
13:00:59 <peter1138> Yeah
13:01:13 <peter1138> Hmm, is it useful to filter the per-company vehicle menus?
13:01:24 <peter1138> The top-level ones.
13:01:37 <mmtunligit> does the filter text stay saved when you close and reopen the dropdown?
13:02:00 <peter1138> No.
13:02:05 <mmtunligit> mhm
13:02:14 <peter1138> That's going to require some... engineering.
13:02:26 <mmtunligit> yeah i can imagine
13:02:53 <peter1138> Some kind of mostly-unique ID for each drop down.
13:03:02 <peter1138> But it may want to be shared for common things.
13:03:37 <peter1138> Currently I can't even turn it off, so everything has a filter.
13:04:41 <mmtunligit> yeah theres still work to be done before you get to that point, and saving the text wouldnt even be desireable in all cases
13:05:16 <mmtunligit> railtypes definently, my PR, i think so, to match the behavior of the other filters
13:05:23 <mmtunligit> game languge? probably not
13:05:26 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfiltercompany.png e.g. is this desirable?
13:05:58 <mmtunligit> only if the limit eve gets increased a bunch
13:06:01 <tabytac> yeah probable not (until that cursed 255 company patch gets merged into vanilla :P)
13:06:15 <mmtunligit> and you wouldnt want it in the sort-by dropdowns either
13:06:18 <peter1138> I think the language and currency lists are actually long enough to warrant filters.
13:06:22 <peter1138> Why not?
13:06:29 <mmtunligit> no im not saying no filters
13:06:40 <mmtunligit> im saying saving the text wouldnt be desireable there
13:06:51 <mmtunligit> but it probably is in the railtype menu
13:09:27 <peter1138> What about when you don't have NewGRF railtypes loaded and there's only 4 types?
13:09:47 <DorpsGek> [OpenTTD/OpenTTD] michicc commented on pull request #14826: Proof of concept: Hierarchical build railtype menu https://github.com/OpenTTD/OpenTTD/pull/14826#issuecomment-3591664720
13:09:51 <peter1138> Basically -- trying to define an arbitrary cut-off point based on length is... tricky.
13:11:15 <mmtunligit> yeah youd want an option when drawing to only show the filter when X items or more are in the list, or if there are GRF items in the list
13:11:35 <mmtunligit> dunno which one is more useful long term
13:12:45 <mmtunligit> i know theres generally an "avoid magic numbers" directive which has me leaning to "show if GRF items exist"
13:12:56 <tabytac> im not sure if its worth hiding the filter box when you only have the default 4 track types (or 3 in some climates)
13:13:54 <peter1138> For consistency it's best to keep it there.
13:14:02 <mmtunligit> yeah
13:14:02 <tabytac> yeah thats kinda my thinking
13:14:30 <mmtunligit> agreed
13:15:24 <tabytac> can you publish your branch on this in gh peter? want to look at a few things if you dont mind
13:17:09 <peter1138> I've not even made a branch yet, it's just working-tree :)
13:19:15 <tabytac> icic
13:45:16 <peter1138> Hmm. Refactor 1.
13:48:19 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14837: Codechange: Replace drop down list's default bools with DropDownOptions. https://github.com/OpenTTD/OpenTTD/pull/14837
13:52:25 <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #14837: Codechange: Replace drop down list's default bools with DropDownOptions. https://github.com/OpenTTD/OpenTTD/pull/14837#pullrequestreview-3520709038
14:01:47 *** moll has joined #openttd
14:09:05 <rito12_51026> michi_cc[d]: A total rework?
14:11:35 <michi_cc[d]> No, the /s at the end is kinda important 🙂
14:31:28 <DorpsGek> [OpenTTD/OpenTTD] TheDude-gh opened pull request #14838: Add: New hotkeys for vehicle related control https://github.com/OpenTTD/OpenTTD/pull/14838
14:36:28 <DorpsGek> [OpenTTD/OpenTTD] TheDude-gh updated pull request #14838: Add: New hotkeys for vehicle related control https://github.com/OpenTTD/OpenTTD/pull/14838
14:42:06 <DorpsGek> [OpenTTD/OpenTTD] TheDude-gh updated pull request #14838: Add: New hotkeys for vehicle related control https://github.com/OpenTTD/OpenTTD/pull/14838
14:52:03 *** lobster has joined #openttd
14:58:49 *** lobstarooo has quit IRC (Ping timeout: 480 seconds)
15:01:58 *** Wormnest has joined #openttd
15:05:12 <DorpsGek> [OpenTTD/OpenTTD] Retzilience opened issue #14839: [Bug]: Timetable window crashes with assertion failure when "Show arrival and departure date" is disabled https://github.com/OpenTTD/OpenTTD/issues/14839
15:09:41 <DorpsGek> [OpenTTD/OpenTTD] Retzilience commented on issue #14839: [Bug]: Timetable window crashes with assertion failure when "Show arrival and departure date" is disabled https://github.com/OpenTTD/OpenTTD/issues/14839
15:21:06 <peter1138> rebase is hard huh
15:32:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14831: Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons https://github.com/OpenTTD/OpenTTD/pull/14831#pullrequestreview-3520738119
15:32:36 <Borg> I never did rebasing.. (or barely remembers).
15:32:51 <Borg> always just merging into topic.. and then back once done :)
15:32:57 <Borg> but I guess its not best workflow..
15:38:33 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14835: Fix #8062: Overlapping text in vehicle group info panel. https://github.com/OpenTTD/OpenTTD/pull/14835#pullrequestreview-3520739804
15:47:26 <Timberwolf> Can a game script get the current *calendar* date instead of the *economy* date?
15:52:46 <_glx_> no
15:53:13 <_glx_> well it's something to implement
16:08:43 <Timberwolf> Horrible idea: create story page, read date, delete.
16:17:27 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14835: Fix #8062: Overlapping text in vehicle group info panel. https://github.com/OpenTTD/OpenTTD/pull/14835
16:17:30 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #8062: Overlapping text in vehicle group window https://github.com/OpenTTD/OpenTTD/issues/8062
16:17:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14837: Codechange: Replace drop down list's default bools with DropDownOptions. https://github.com/OpenTTD/OpenTTD/pull/14837
16:22:07 <DorpsGek> [OpenTTD/nml] rubidium42 approved pull request #399: Update: changelog for 0.8.1 https://github.com/OpenTTD/nml/pull/399#pullrequestreview-3520750927
16:29:00 <DorpsGek> [OpenTTD/nml] rubidium42 commented on pull request #389: Codefix: Fix typos and grammar errors https://github.com/OpenTTD/nml/pull/389#pullrequestreview-3520752691
16:34:22 <DorpsGek> [OpenTTD/nml] rubidium42 approved pull request #400: Change: Validate action 2 loaded list does not overlap special types. https://github.com/OpenTTD/nml/pull/400#pullrequestreview-3520754090
16:34:43 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #14836: Change: Explicitly reserve sprite group types >= 0x80. https://github.com/OpenTTD/OpenTTD/pull/14836#pullrequestreview-3520754192
16:35:14 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14840: Fix: Drop down scrolling broken for mixed-height items. https://github.com/OpenTTD/OpenTTD/pull/14840
16:35:47 <peter1138> This things...
16:36:48 <peter1138> These?
16:36:51 <peter1138> thing?
16:53:05 <Rubidium> well... it could be missing capitalisation, e.g. This Things song is not the one I expected"
17:23:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #14753: Codechange: [Script] Use std::optional for script list next iteration item https://github.com/OpenTTD/OpenTTD/pull/14753#pullrequestreview-3520767217
17:26:34 <xarick> yes!
17:36:44 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14753: Codechange: [Script] Use std::optional for script list next iteration item https://github.com/OpenTTD/OpenTTD/pull/14753
17:48:27 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:56:47 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:57:03 *** WormnestAndroid has joined #openttd
17:59:59 <xarick> unordered_map is hard
18:07:24 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1444389296839856289/image.png?ex=692c87db&is=692b365b&hm=df1054e67401f7dee60413816097eb923a9b2f107baff800b6a4793c4992ef6a&
18:07:24 <xarick> after Randomize list dump which processed correctly, KeepTop10 screwed it over
18:12:08 <peter1138> For something should be sorted, unordered_map seems wrong.
18:14:16 <xarick> I have a vector with indexes sorted
18:14:21 <xarick> some kind of helper
18:17:53 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1444391937586233394/image.png?ex=692c8a51&is=692b38d1&hm=d5049575eb69e0dbff18a1504d5d9551044c3d132b3aea61dbd127f4941582f1&
18:17:53 <xarick> ah, almost
18:17:54 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:18:03 *** WormnestAndroid has joined #openttd
18:20:50 <xarick> pass!!
18:21:00 <xarick> regression finally passes with unordered_map!
18:21:32 <xarick> im suspicious this will still be slow
18:27:41 <xarick> well, it is slow at removing
18:27:41 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:29:16 *** WormnestAndroid has joined #openttd
18:31:23 <peter1138> I remember wondering if there was some value that is invalid that could be used as a "is deleted" marker, but no, all keys and all values are valid.
18:34:11 <peter1138> Right.
18:34:22 <peter1138> Filtering a drop down list should probably also shrink the size of the dropdown?
18:43:17 <_glx_> Clear() is calling clear() on the containers, and its complexity is linear in the size
18:47:43 <_glx_> and for map, set, or vector the effect will be the same when clearing
18:51:58 <Rubidium> vector.clear() might be constant complexity
18:52:36 <peter1138> Yeah, map/set may have complex memory allocations behind the scenes. vector does not.
18:52:52 <peter1138> Argh at trying to resize a window :/
18:54:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1444401053348139149/image.png?ex=692c92ce&is=692b414e&hm=d4756fef66c7e0f503d85b901a74dca38d8f5ec1bb23b0e140390c8d71704e26&
18:54:07 <xarick> bah... stupid vector
18:54:14 <xarick> this->keys is a vector
18:55:16 <peter1138> If it's unsorted, then yes you have to search each elemented.
18:59:27 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:59:29 *** WormnestAndroid has joined #openttd
18:59:50 <xarick> well, time to delete everything
19:00:05 <DorpsGek> [OpenTTD/nml] Rito13 opened pull request #401: Cleanup: Remove unused variable member. https://github.com/OpenTTD/nml/pull/401
19:00:19 <xarick> got this into a regression passable state but finding in a vector is just slow
19:01:07 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #14783: Codechange: Use enum class and EnumBitSet for various order flags. https://github.com/OpenTTD/OpenTTD/pull/14783#pullrequestreview-3520793252
19:01:21 <peter1138> Yeah, removing from a vector is faster when it's sorted, but you still need to move everything after it forwards, and when it's sorted moving everything after it backwards when inserting.
19:10:03 <peter1138> Hmm, string_filter.AddLine() isn't doing what I thought.
19:15:10 <peter1138> Ohhh, you womble.
19:16:26 <peter1138> Hmm, better idea.
19:23:53 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:24:04 *** WormnestAndroid has joined #openttd
19:26:14 <peter1138> Maybe I need "unfilterable" items.
19:26:59 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #14841: Change: Vehicles loading at stations don't lose reliability https://github.com/OpenTTD/OpenTTD/pull/14841
19:28:31 <peter1138> What about vehicles unloading at stations?
19:28:53 <peter1138> Also, what if they're waiting years on full load and nothing turns up.
19:29:08 <peter1138> Also, why am I writing here, not in the PR.
19:31:01 <talltyler> Unloading should be covered too, if I'm reading the code properly 🙂
19:31:27 <talltyler> If they wait for full load for years, they're not breaking down but they're also not making you any money...
19:33:12 <talltyler> Also friendly reminder that I'm trying to solve "players hate breakdowns and turn them off" not "everyone should play my way" 🙂
19:33:31 <peter1138> Friendly reminder that I'm just thinking of things, I'm not against it.
19:34:14 <peter1138> (Also "friendly reminder" is a phrase best left alone because it does have connotations.)
19:36:30 <xarick> unordered_map actually is interesting in a way
19:36:48 <xarick> items are ordered by insertion order
19:37:14 <xarick> feels like a vector
19:40:00 <peter1138> They can be but I'm not sure it's gauranteed to stay that way.
19:42:06 <_jgr_> Ordered by insertion order suggests that the hash function is broken?
19:42:29 <_jgr_> In any case you should not try to rely on that
19:43:17 <xarick> you sure?
19:43:36 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfilterrail.mp4
19:43:49 <xarick> when i optimized river flow i used unordered set
19:44:04 <xarick> and i was counting on it to be ordered by insertion
19:44:42 <michi_cc[d]> "Internally, the elements are not sorted in any particular order, but organized into buckets." -> https://en.cppreference.com/w/cpp/container/unordered_set.html
19:46:44 <peter1138> Yup, don't rely on order. It's called "unordered" for a reason :)
19:47:31 <xarick> need to refresh my memory
19:48:47 <xarick> ah, marks.contains
19:48:48 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
19:48:58 <xarick> i'm only using to see if it contains inserted items
19:48:59 <xarick> tiles
19:50:01 <xarick> i use the auxiliary vector queue for the ordered by insertion instead
19:50:03 <xarick> my bad
19:50:17 <xarick> false alarm
19:50:18 <DorpsGek> [OpenTTD/nml] Rito13 updated pull request #389: Codefix: Fix typos and grammar errors https://github.com/OpenTTD/nml/pull/389
19:50:58 <peter1138> https://fuzzle.org/~petern/ottd/dropdownfilterbottomup.png
19:51:08 <peter1138> Hehe, slightly broken when in bottom-up mode.
19:51:25 *** WormnestAndroid has joined #openttd
19:55:59 <DorpsGek> [OpenTTD/nml] rubidium42 approved pull request #389: Codefix: Fix typos and grammar errors https://github.com/OpenTTD/nml/pull/389#pullrequestreview-3520808982
19:57:36 <xarick> copilot never tires of giving me alternatives to
19:57:43 <xarick> deal with ScriptList containers
20:08:23 * peter1138 mumbles about CONTRIBUTING.md
20:11:42 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
20:12:41 *** WormnestAndroid has joined #openttd
20:23:34 <peter1138> Okay. Filter persistence?
20:28:47 <talltyler> Fair enough, I did not intend any of the other connotations of the phrase “friendly reminder” 🙂
20:45:56 *** Borg has quit IRC (Quit: leaving)
20:49:50 <peter1138> Ok, persistent filter text is useful for rail type toolbar menus.
20:50:58 <andythenorth> 👀
20:57:29 <_zephyris> @peter1138 I'm enjoying the filter. I think being at the top works is fine for infrequently used 'dumb ordered' (like alphabetical currency options). Not sure about the toolbars - probably best to keep the main option in the same position at the top, what are you thinking?
21:02:33 <peter1138> The filter *has* to be at the top (or bottom, for bottom-up menus). It is an "actual" widget, not a drop down item itself, so it cannot be positioned in between other items.
21:03:49 <peter1138> If some kind of sorting/configuring stuff is added later, if they are drop down items they will have to be below, or if they are also actual widgets that can be wherever they need to be in the layout.
21:04:20 <DorpsGek> [OpenTTD/nml] rubidium42 approved pull request #401: Cleanup: Remove unused variable member. https://github.com/OpenTTD/nml/pull/401#pullrequestreview-3520825011
21:13:12 <peter1138> Oh for gods' sake.
21:13:28 <peter1138> "Why do so many rail types match 'AC'?"
21:14:00 <peter1138> Because JP+ Tracks puts the word "Track" on everything.
21:14:52 * Rubidium wonders whether enough people will get annoyed by that to file bug reports for the NewGRF
21:18:04 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
21:19:40 *** WormnestAndroid has joined #openttd
21:27:54 *** Wormnest has joined #openttd
21:28:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14842: Add: Text filter searching to some drop down lists. https://github.com/OpenTTD/OpenTTD/pull/14842
21:33:27 <peter1138> https://fuzzle.org/~petern/ottd/githubwhat.png Uh...
21:36:46 <mmtunligit> peter1138: i was having the same bug the other day, was really weird and hard to get rid of
21:46:31 <DorpsGek> [OpenTTD/OpenTTD] michicc updated pull request #14826: Proof of concept: Hierarchical build railtype menu https://github.com/OpenTTD/OpenTTD/pull/14826
22:02:11 <peter1138> Fight! Fight!
22:08:49 <peter1138> Hmm, okay, Windows.
22:08:57 <peter1138> Ah.
22:11:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14842: Add: Text filter searching to some drop down lists. https://github.com/OpenTTD/OpenTTD/pull/14842
22:20:11 * peter1138 ponders trying to rebase 14826 on to 14842.
22:22:00 *** kuka_lie has quit IRC (Quit: Lost terminal)
22:28:02 <peter1138> It's building...
22:29:06 <peter1138> Probably sharing the text filter is not quite right :)
22:29:29 <peter1138> Possibly having a filter at all makes no sense.
22:34:46 <peter1138> Sort of works.
22:42:50 <jfkuayue> I think I can easily distinct “British Chinese takeaways” and “real Chinese for Chinese” from the names of restaurants…
22:43:48 <jfkuayue> Wait there is another type
22:45:12 <jfkuayue> “The Ivy Asia” type, which you generally don’t go there
22:55:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #14783: Codechange: Use enum class and EnumBitSet for various order flags. https://github.com/OpenTTD/OpenTTD/pull/14783
23:00:54 <DorpsGek> [OpenTTD/OpenTTD] TheDude-gh updated pull request #14838: Add: New hotkeys for vehicle related control https://github.com/OpenTTD/OpenTTD/pull/14838
23:15:19 <DorpsGek> [OpenTTD/OpenTTD] Rito13 updated pull request #14717: Feature: New selection for rail types. https://github.com/OpenTTD/OpenTTD/pull/14717
23:17:42 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:22:40 <DorpsGek> [OpenTTD/nml] glx22 merged pull request #389: Codefix: Fix typos and grammar errors https://github.com/OpenTTD/nml/pull/389
23:23:28 *** honza_ has joined #openttd
23:23:28 <honza_> could someone please give me advice why this check failed and how to solve it? I am little lost in github stuff
23:23:28 <honza_> https://github.com/OpenTTD/OpenTTD/actions/runs/19790470630/job/56702706317?pr=14838
23:23:30 <DorpsGek> [OpenTTD/nml] glx22 commented on pull request #401: Cleanup: Remove unused variable member. https://github.com/OpenTTD/nml/pull/401#issuecomment-3592019484
23:24:43 <_glx_> honza_: it's because you have merge commits, we prefer rebases
23:25:35 <DorpsGek> [OpenTTD/nml] Rito13 closed pull request #401: Cleanup: Remove unused variable member. https://github.com/OpenTTD/nml/pull/401
23:25:38 <DorpsGek> [OpenTTD/nml] Rito13 commented on pull request #401: Cleanup: Remove unused variable member. https://github.com/OpenTTD/nml/pull/401#issuecomment-3592020339
23:25:52 *** lobstarooo has joined #openttd
23:26:39 <honza_> I can see that, but I don't know how to revert or fix that
23:29:14 *** lobster has quit IRC (Read error: Connection reset by peer)
23:30:28 <michi_cc[d]> `git rebase origin/master` (or whatever your upstream branch is called). Rebase command will remove merge commits by defaut.
23:33:47 <honza_> it seems it is rebased to master, but how do I get rid of the merge commits? Should I squish them together?
23:38:40 <DorpsGek> [OpenTTD/OpenTTD] Rito13 commented on pull request #14717: Feature: New selection for rail types. https://github.com/OpenTTD/OpenTTD/pull/14717#issuecomment-3592026245
23:43:56 <peter1138> honza_, reset to the first commit, the one you want to keep, and then rebase.
23:44:39 <peter1138> Of course, you're making it harder for yourself by committing to master on your local repository, instead of using a branch.
23:55:05 <honza_> like that?
23:55:05 <honza_> git reset 5640f8b239cd13ce3c848a066ed8188fedc5ece
23:55:05 <honza_> git rebase origin/master
23:56:38 <honza_> if so, it does not seem to solve anything