IRC logs for #openttd on OFTC at 2023-12-29
            
00:46:26 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634#issuecomment-1871648968
00:48:37 <reldred> typical zorg
00:55:21 <_glx_> indeed
01:04:40 *** Flygon has joined #openttd
04:00:32 *** D-HUND has joined #openttd
04:04:06 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:07:01 *** Wormnest has quit IRC (Quit: Leaving)
04:45:15 *** keikoz has joined #openttd
07:30:57 *** tokai|noir has joined #openttd
07:30:57 *** ChanServ sets mode: +v tokai|noir
07:37:51 *** tokai has quit IRC (Ping timeout: 480 seconds)
07:43:02 <reldred> https://cdn.discordapp.com/attachments/1008473233844097104/1190198279762366595/image.png?ex=65a0ed86&is=658e7886&hm=35ad60cfd1af0854d7e09346eec601cc0ccffba095dbce01a1ae14303338ef96&
07:43:02 <reldred> _glx_: I'm having some extremely smoothbrained moments right now, I wiped vscode and reinstalled clean, only installed cmake and cmake tools extension, did a fresh clone of openttd, and this is what it looks like:
07:59:22 <DorpsGek> [OpenTTD/OpenTTD] fmang commented on pull request #10849: Add: Ctrl+click Rename on VehicleView to rename the group https://github.com/OpenTTD/OpenTTD/pull/10849#issuecomment-1871821647
08:10:54 <andythenorth> reldred: High on my list for โ€œletโ€™s crowdfund this person some therapyโ€
08:18:46 <emperorjake> I see NewCC got a mention. Believe me, if I could have changed the names of the colours, I would have. The original version even came with a patch but it wasn't worth the effort
08:19:51 <emperorjake> and I've been thinking of attempting a rewrite of NewCC with individually selectable colours by parameter, but if this gets merged I'll be spared the trouble
08:20:47 <reldred> _glx_: Okay so, I figured out finally how to get vcpkg integrated, but no idea why my list of kits looks different than yours
08:23:26 <DorpsGek> [OpenTTD/OpenTTD] ldpl commented on pull request #11602: Feature: Convert 32bpp-only sprites to 8bpp for 8bpp blitters. https://github.com/OpenTTD/OpenTTD/pull/11602#issuecomment-1871833795
08:32:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634
08:34:06 <peter1138[d]> But now, cycling.
08:34:13 <andythenorth> and weather
08:34:22 <reldred> nyoom
08:34:37 <reldred> I need to get out on my bmx, start learning how to bloody ride again
08:34:39 <andythenorth> probably more weather than cycling, looking at my outdoors
08:36:51 *** luk3Z[m] has quit IRC (Quit: Client limit exceeded: 20000)
08:44:51 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11625: Codechange: Store and pass Colours in Colours type. https://github.com/OpenTTD/OpenTTD/pull/11625#issuecomment-1871845324
08:45:48 <reldred> peter1138[d]: that's not cycling
08:52:53 <locosage> hm, apparently helipad is action5 "gui" range
08:52:57 <locosage> fun
08:56:28 <locosage> also, what's the point of action5 when actionA works for new sprites too?
08:57:25 <locosage> I guess it came first judging by the number
08:57:41 <locosage> So better question would be can I just ignore action5 and use actionA instead?
09:02:37 <locosage> it's much simpler to just use sprite number than trying to navigate those partially undocumented action5 ranges
09:15:06 <_jgr_> Action A is only sensible to use for TTD-era sprite IDs which never change, or GRM
09:16:11 <locosage> so you mean extra sprite ids can change?
09:16:36 <locosage> why does actionA even allow to replace them then?
09:17:36 <Rubidium> see it rather that it doesn't specifically disallow to replace them
09:19:14 <Rubidium> but look at the specs, and you'll see that there are quite a few action5s with a number of sprites that has changed through the versions. Each change to num-sprites will likely have renumbered a number of other sprites
09:19:37 <_jgr_> There are GRFs which use action A with whatever number they got from the sprite aligner window, and these break whenever a new release comes out
09:20:35 <locosage> I'm not surprised, it's not even mentioned in spec that it can break
09:23:17 <Rubidium> though, did they follow the method on how to get the sprite number in the specification?
09:24:45 <locosage> what method?
09:27:13 <Rubidium> looking up the sprite number in trg1.pcx
09:27:32 <Rubidium> any action 5 sprite number is not in there
09:28:22 <locosage> well, it's worded more like a suggestion
09:28:40 <locosage> "you can find"
09:28:46 <locosage> you can also find them in sprite aligner :p
09:31:51 <Rubidium> but is the sprite aligner mentioned in the specification?
09:34:18 <Rubidium> ah well, I hope the specifications are better now ;)
09:46:15 <truebrain> brrr, NetworkContent has some weird code ๐Ÿ˜› Some functions .. "grew a bit" ๐Ÿ˜„
09:48:36 <truebrain> the easy way to make it thread-safe is by copying the download in a temporary buffer, and put that on the queue .. but that adds yet-another-copy
09:48:43 <xarick> I keep stumbling on the special handling of aircraft and non-leading train engines, wagons or articulated engines, can't do the shift to vehicle_lists as often as I hoped
09:48:59 <truebrain> a better way would be to move the "write to disk" part in the callback, and do the GUI communication via a queue
09:49:04 <truebrain> but boy .. that code .. is something special ๐Ÿ˜„
10:00:31 <jfs> Remember that the standard library also has promise/future classes, which are quite useful for job queue kinds of things
10:00:33 <locosage> Rubidium: yeah, looks better now
10:00:48 <locosage> though I think actionA should just ignore sprites over the base range
10:01:00 <locosage> better to break grf in development than on next release
10:01:22 <jfs> The one thing that promise/future does not really support is partial results
10:03:05 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #11638: Fix: race-condition when creating new HTTP requests from different threads https://github.com/OpenTTD/OpenTTD/pull/11638
10:04:30 <truebrain> had to double-check if Windows is actually creating a new thread for downloads, but it actually does
10:05:39 <truebrain> now the question .. am I going to untangle the network-content stuff, or am I going to just fix the other race-conditions .. hmmmmmmmm
10:05:47 <truebrain> untangling can introduce unrelated bugs
10:05:58 <truebrain> but working around it just causes more memory overhead for no actual good reason
10:06:21 <xarick> Can I do this? https://gist.github.com/SamuXarick/985d263aaec57e21e1c184848a58a46e
10:06:21 <xarick> It changes the rules a little bit... I think that check in engine preview accounts for engines that are attached as wagons where the main front vehicle is not a wagon itself. But with this change, those wagon leading vehicles won't be accounted for.
10:07:00 <xarick> meaning that, engines that are attached to those wagons, are skipped
10:07:08 <xarick> is that okay?
10:07:33 <truebrain> for WinHttp we already create a buffer and free it, for every chunk .. so WinHttp already isn't zero-copy .. bit weird, but okay
10:15:44 <xarick> too many compromises for my liking...
10:54:06 <DorpsGek> [OpenTTD/OpenTTD] zephyris commented on pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634#issuecomment-1871947384
10:59:46 <truebrain> okay, 3 mutexes later, and it is working ๐Ÿ˜› Let's see if this can be done a tiny bit less ... mutexy ๐Ÿ˜„
11:00:18 <reldred> god I don't even know what a mutex is, I only just learnt tonight how to chain ternary operators ๐Ÿ˜›
11:00:31 <truebrain> you learnt something bad, I see ๐Ÿ˜›
11:00:46 <reldred> Admittedly it was just for NML ๐Ÿ˜›
11:04:05 <andythenorth> chaining ternary is evil ๐Ÿ˜›
11:04:07 <andythenorth> especially in nml
11:07:08 *** nielsm has joined #openttd
11:09:13 <jfs> truebrain: atomic int for progress reporting and a future for delivering the final result? I haven't looked at your current code
11:09:31 <truebrain> you do understand that you are now just blabbing random words, right? ๐Ÿ˜„
11:10:07 <xarick> can I still use codechange if I'm changing the rules a little bit?
11:10:10 <truebrain> I do appreciate you want to help; but that is not a problem I am solving ๐Ÿ™‚ The complexity of HTTP handling is more .. complex ๐Ÿ™‚
11:10:22 <xarick> codechange vs change?
11:11:50 <xarick> okay, I better start to be explicit. Describe in the commit message what I compromised...
11:14:00 <reldred> andythenorth: too bad I dun did it ๐Ÿ˜›
11:14:48 <truebrain> lolz, I now have Windows acting lovely weird when I cancel downloads .. works fine on Linux, but boy, on Windows it does something funky ๐Ÿ˜›
11:16:45 <truebrain> ah, there we go .. yeah, that was a bit silly of me ๐Ÿ™‚ Not actually failing the connection ๐Ÿ˜›
11:19:39 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10548: Feature: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548
11:24:31 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1190254016920289281/image.png?ex=65a1216f&is=658eac6f&hm=150d45e160ccaa51e536e9094cdd982bb4a3129bfe29426906ba765ad8553fe1&
11:24:31 <_zephyris> Aww, I was hoping that using the unicode private range entries for train/lorry/bus/etc. would give nice icons in savegame names...
11:25:29 <jfs> that might be an OS limitation, not sure
11:26:01 <jfs> on the other hand, the filename is definitely not composed of question marks...
11:27:37 <truebrain> _zephyris: Pushing the boundaries! ๐Ÿ˜„
11:30:24 <truebrain> ```==58794== Conditional jump or move depends on uninitialised value(s)
11:30:24 <truebrain> ==58794== at 0x11CC50D: NPFShipCheckReverse(Ship const*, Trackdir*) (npf.cpp:1234)```
11:31:15 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #11639: Fix: race-conditions in GUI updates when downloading HTTP files https://github.com/OpenTTD/OpenTTD/pull/11639
11:35:17 <xarick> Is this good english enough?
11:35:17 <xarick> > Change: Iterate group vehicle lists for DisasterTick_Ufo and DisasterTick_Big_Ufo
11:35:17 <xarick> >
11:35:17 <xarick> > As a compromise, the result of this change differs from the original. The iteration order changed from lowest to highest vehicle index to lowest to highest company index plus the order at which each vehicle was added to each list regardless of their index.
11:36:44 <xarick> so the resulting picked vehicle that the ufo will destroye will be another
11:36:49 <xarick> ๐Ÿ™‚
11:40:40 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on pull request #10548: Feature: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548#pullrequestreview-1798843732
11:41:18 <Rubidium> _zephyris: I think it's the fact that StrMakeValid under normal circumstances does not allow control codes, which are (also) in the private unicode range. Potentially adding `, SVS_ALLOW_CONTROL_CODE` to the StrMakeValid call in fios.cpp:328 will make it appear
11:42:43 <Rubidium> xarick: that commit message makes all my desync-spidey senses tickle enormously
11:43:22 <xarick> heheh
11:43:35 <xarick> well, it's what I think it does
11:44:14 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11638: Fix: race-condition when creating new HTTP requests from different threads https://github.com/OpenTTD/OpenTTD/pull/11638#pullrequestreview-1798852318
11:44:37 <xarick> std::vector, adding and removing from a list
11:44:44 <_glx_> reldred: My list is different because I already had CMakePresets.json
11:44:54 <xarick> https://github.com/OpenTTD/OpenTTD/pull/10548/commits/53649b85424227d8df3007d1d471bb8084171617#diff-ae1ac999a1e7179a11ab40228821e0c769578eac36619e2a2639dae4444db7dfR152-R161
11:45:13 <xarick> my goodness, these embeds in discord are sometimes lame
11:45:28 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11638: Fix: race-condition when creating new HTTP requests from different threads https://github.com/OpenTTD/OpenTTD/pull/11638
11:46:37 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11639: Fix: race-conditions in GUI updates when downloading HTTP files https://github.com/OpenTTD/OpenTTD/pull/11639
11:46:46 <reldred> _glx_: All good. I got it to build in the end. Just as a sidenote, how do I do the old 'make install' that throws everything into an output folder?
11:47:16 <truebrain> `Build` -> `Install OpenTTD` ? ๐Ÿ˜„
11:54:56 <jfs> ugh all those raw buffers in the network code makes me uncomfortable
11:55:11 <jfs> why do we still not have a ByteBuffer class or similar?
11:56:02 <jfs> which can then be wrapped in a std::unique_ptr, or even just itself have unique_ptr semantics (in that it can only be moved and not copied, except perhaps via an explicit copy constructor which creates a new buffer)
11:57:51 <Rubidium> because nobody put the effort in to change it?
12:04:12 <xarick> hmm nielsm, looks like you found a bug... I'm bad at logic
12:06:21 <xarick> oh, wait....
12:07:00 <xarick> these neutral stations can't ask for a list of road vehicles nor trains
12:07:38 <xarick> unless somehow some bad function can pass that
12:08:39 <xarick> oil rigs are only expected to ask for a list of aircraft and ships
12:11:08 <xarick> if (vli.vtype != VEH_AIRCRAFT && vli.vtype != VEH_SHIP) when this is true, it is garanteed that the station owner is from a real company, and not neutral
12:11:19 <xarick> yep, it's correct after all
12:12:27 <xarick> maybe i should add an assert somewhere there?
12:15:19 <jfs> but what if at some point neutral stations with other transport types are added to the game? then someone has to remember to adjust that part of the code
12:15:42 <jfs> isn't it simpler to just check "if the station is neutral owner then always check vehicles from all companies"
12:15:44 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11639: Fix: race-conditions in GUI updates when downloading HTTP files https://github.com/OpenTTD/OpenTTD/pull/11639#pullrequestreview-1798869802
12:18:23 <xarick> I see
12:19:02 <xarick> I was looking for performance.... getting a list of vehicles going to a station is very much core for an AI
12:19:27 <xarick> let me think what I can do
12:19:27 <truebrain> lol @ codeQL .. you are not wrong, but .. really? ๐Ÿ˜„
12:20:00 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11639: Fix: race-conditions in GUI updates when downloading HTTP files https://github.com/OpenTTD/OpenTTD/pull/11639
12:20:36 <jfs> xarick: the case of of neutral stations is rare though so it's unlikely to be the one tipping the scales
12:21:22 <xarick> oh but this is in the gui part... my bad
12:21:29 <xarick> it's not in the script part
12:21:32 <xarick> lol
12:24:59 <xarick> can asserts return true?
12:25:06 <xarick> they have a return?
12:25:59 <xarick> if (vli.vtype != VEH_AIRCRAFT && vli.vtype != VEH_SHIP && assert(vli.company != OWNER_NONE) && vli.company != c->index) continue; it doesn't work ๐Ÿ˜ฆ
12:26:13 <truebrain> how to tell you don't know what an `assert` does without telling you don't know ๐Ÿ™‚
12:26:47 <xarick> ๐Ÿ™‚
12:28:15 <xarick> I don't understand yet how these purple functions work
12:30:28 <xarick> if (vli.vtype != VEH_AIRCRAFT && vli.vtype != VEH_SHIP) assert(vli.company != OWNER_NONE);
12:30:33 <Rubidium> xarick: why did you make me remember the old station algorithm implementation?
12:31:24 <xarick> on a build with disabled asserts, is the condition still tested?
12:32:12 <xarick> what will the compiler do here?
12:33:23 <Rubidium> xarick: https://en.cppreference.com/w/cpp/error/assert
12:34:17 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634#issuecomment-1872038277
12:35:08 <truebrain> hmm .. we can't make a dynamic list of widgets, can we? All custom draw if you want that, if I remember correctly ..
12:36:24 <truebrain> `Reason: Floating point exception`
12:36:26 <truebrain> lovely!
12:36:39 <truebrain> didn't know we did floating points in windows ๐Ÿ™‚
12:37:24 <truebrain> `num_rows = r.Height() / row_height;`
12:37:32 <truebrain> I guess division by zero ๐Ÿ˜„
12:37:40 <truebrain> yup!
12:40:08 <peter1138[d]> locosage: Yes, it's not that it allows them, it just doesn't specifically disallow them. Yet.
12:40:31 <peter1138[d]> Yes, you can create a dynamic list of widgets.
12:40:50 <truebrain> all examples I found have a fixed length on first opening
12:40:53 <truebrain> you have an example?
12:41:10 <peter1138[d]> Nope, there's no code that does it ๐Ÿ˜‰
12:41:19 <truebrain> ....... you are of no use to me! ๐Ÿ˜› ๐Ÿ˜›
12:41:39 <peter1138[d]> What's the intention?
12:41:44 <truebrain> for these social plugins
12:41:50 <truebrain> I want to show in the Options menu which are loaded
12:41:54 <truebrain> and what state they are in
12:42:08 <truebrain> and possibly in the future a dropdown for each
12:42:09 <andythenorth> peter1138[d]: Flat Socials
12:42:13 <truebrain> with some settings
12:42:22 <peter1138[d]> Okay, so for everything else that is downloadable like that we just list in a WWT_MATRIX.
12:42:35 <truebrain> yeah, but a WWT_MATRIX means I need to do all the stuff myself ๐Ÿ˜›
12:42:39 <peter1138[d]> Yes.
12:42:50 <truebrain> and especially as I want a dropdown on each line .. I was not looking forward to that ๐Ÿ˜›
12:43:15 <peter1138[d]> You might be able to use NWID_MATRIX.
12:43:35 <peter1138[d]> Normally we just have a single panel inside them, but maybe a container with more widgets inside that would work.
12:44:11 <peter1138[d]> Hmm, probably not actually, dropdowns need widget IDs and anything inside a NWID_MATRIX doesn't have one.
12:44:31 <peter1138[d]> Okay, so there are several places where we dynamically create widgets.
12:44:55 <peter1138[d]> You could use that, and then if you need to add/remove them just reinitialize the window.
12:45:01 <truebrain> yeah, but all "on-open", right? So I have to rebuild the window when it changes?
12:45:05 <truebrain> yeah, okay
12:45:52 <peter1138[d]> But I don't see a particular reason why you couldn't add to a container dynamically to be honest. But nothing does that currently.
12:46:13 <truebrain> I will fiddle a bit, see what I can come up with
12:46:17 <truebrain> just so you can laugh and make it better ๐Ÿ˜›
12:47:14 <peter1138[d]> I know how much you love UI code ๐Ÿ™‚
12:47:44 <truebrain> it has gotten a lot better lately
12:47:48 <truebrain> still a drag to recompile every change
12:49:59 <truebrain> owh, I found a bit of an example of what I am sort-of after: NewGRFDisplay
12:52:02 <peter1138[d]> There's some for creating company buttons.
12:52:11 <peter1138[d]> The NewGRF one is a full-on custom widget.
12:52:27 <truebrain> yeah, but it tells me how to embed a widget-list ๐Ÿ™‚
12:52:38 <peter1138[d]> Hmm, did I actually PR my changes to widgets?
12:52:47 <peter1138[d]> If it's a still a linked list, I didn't.
12:53:21 <peter1138[d]> I have a changeset that changes it to `std::vector<std::unique_ptr<>>`, which would make dynamic layouts a lot easier
12:53:46 <truebrain> `NWidgetFunction` returns `NWidgetBase *`
12:53:56 <truebrain> or accepts
12:53:58 <truebrain> what-ever ๐Ÿ˜›
12:54:10 <peter1138[d]> ๐Ÿ™‚
12:54:13 <truebrain> so I was just looking how to chain those ๐Ÿ™‚
12:54:38 <peter1138[d]> Hmm, object::colour is actually 2CC merged into a byte.
12:55:22 <peter1138[d]> Huh.
12:55:50 <peter1138[d]> Objects can have 2CC. Companies can have 2CC. But company-owned objects only get 1CC.
12:55:53 <peter1138[d]> Well
12:56:36 <truebrain> yippie, I can make N frames now .. okay ... now to set properties on them ...
12:58:23 <peter1138[d]> Oh maybe that's only conversion.
12:59:34 <truebrain> hmm ... can I also make the index dynamic ... hmmm
13:00:12 <peter1138[d]> Only on init setup currently.
13:00:30 <peter1138[d]> I also have a patch that simplifies how that is set up.
13:00:38 <truebrain> hurry up with those patches already ๐Ÿ˜›
13:07:00 <peter1138[d]> Typical peter-"I have a patch for that"-1138.
13:07:13 <truebrain> https://gist.github.com/TrueBrain/ab0e22c2ad96accd635be3333579ebc0
13:07:13 <truebrain> Is this okay?
13:07:42 <truebrain> the `SetDParamStr` mostly, is a bit .. well .. it is something ๐Ÿ˜›
13:07:44 <_glx_> Isn't it "I have a branch" now?
13:08:49 <truebrain> I can use `SetStringParameters` btw to make it a bit nicer; but that is just "making it nicer"
13:08:51 <peter1138[d]> truebrain: as a proof-of-concept, probably. Of course a container already has a (linked-list lol) list of widgets.
13:09:15 <truebrain> the only thing is that I never actually draw the vertical, but .. I guess it doesn't draw anything anyway ๐Ÿ˜›
13:09:48 <peter1138[d]> Tbh making custom widgets is probably better than shoving it all in the window handler like we normally do
13:12:13 <peter1138[d]> Ok, let's find it.
13:12:35 <truebrain> hmm, `SetStringParameters` is always called on the Window itself .. which makes sense
13:12:47 <peter1138[d]> It's called by the leaf widget, yes.
13:12:49 <truebrain> but that makes for weird code, parts of it in the Window, parts in the Widget ..
13:13:02 <truebrain> can I delegate it to a widget back .. hmm ..
13:15:50 <truebrain> I want to get the pointer of the NWidgetFunction from the Window .. is that possible? ๐Ÿ˜„
13:16:13 <truebrain> (sorry for all the weird questions, and me wanting something that is not "common" ๐Ÿ˜› )
13:17:03 <peter1138[d]> The NWidgetFunction is in the WindowDesc, not the Window.
13:17:21 <truebrain> yeah, but it is somewhere in the chain in the Window widgets ๐Ÿ˜›
13:17:29 <truebrain> but I guess that is a bit to weird to find it like that
13:17:30 <peter1138[d]> That's not the function itself.
13:17:42 <truebrain> no, I want a pointer to the instance
13:17:44 <peter1138[d]> The widgets contain the result of the function.
13:18:05 <peter1138[d]> If you want to get instance that was made, then it's this->GetWidget<Whatever>(index)
13:18:21 <truebrain> the issue is ... NWidgetFunction doesn't accept an index ๐Ÿ˜›
13:18:47 <truebrain> wait, I can assign one ofc
13:18:48 <truebrain> duh
13:18:56 <peter1138[d]> You assign it, yes ๐Ÿ™‚
13:19:13 <truebrain> hmm .. how do I do that .. hmm
13:19:15 <peter1138[d]> Oof, must be in my wsl patches. Been a while.
13:20:32 <truebrain> `NWidgetVertical` has no `SetIndex` .. awh
13:21:46 <truebrain> on leafs only, I guess?
13:21:51 *** D-HUND is now known as debdog
13:23:00 <peter1138[d]> You can look at at the network content window does it.
13:23:24 <peter1138[d]> (Or was it the server list... can't remember)
13:23:33 <peter1138[d]> One of them has a custom widget with an index.
13:23:43 <truebrain> that will be a fun ... search ๐Ÿ˜›
13:24:36 <truebrain> I do not know what I am looking for, nor where exactly to find it, so I can't find anything that seems related ๐Ÿ˜ฆ
13:24:43 <peter1138[d]> Oh
13:24:46 <peter1138[d]> Never mind
13:24:51 <peter1138[d]> Search for nested_array
13:24:58 <peter1138[d]> widget.cpp has a lot
13:25:11 <peter1138[d]> w->nested_array[this->index] = this;
13:25:28 <peter1138[d]> just set "this->index" to be whatever you want.
13:25:40 <peter1138[d]> WID_something preferably ๐Ÿ™‚
13:25:54 <peter1138[d]> No need to actually have an index member.
13:26:09 <peter1138[d]> Of
13:26:46 <_glx_> possibly not reusing existing index ๐Ÿ˜‰
13:26:50 <truebrain> okay, so next challenge is to have a Window pointer available at some point for me to do that ๐Ÿ˜„
13:27:05 <truebrain> `SetupSmallestSize` is used for that
13:27:05 <truebrain> k
13:29:55 <truebrain> shockingly, that seems to work ๐Ÿ™‚
13:31:29 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1190285969283354676/image.png?ex=65a13f31&is=658eca31&hm=4b9334af9650702987559f291553f3dd3e7044b39ebf5d269352916bb55cd195&
13:31:29 <_glx_> reldred
13:31:48 <truebrain> next challenge .. `SetStringParameters` is also called in `SetupSmallestSize` ... which has a lot of code in `NWidgetVertical`, so I can't do the trick I was doing there .. hmmmm
13:33:13 <peter1138[d]> Okay, a few merge conflicts, let's see if I got it right.
13:33:36 <truebrain> I could do a bitmask on the index, to know which iteration I have, but that seems like a bad solution ...
13:33:43 <truebrain> is there somewhere else I can hide information ... hmm
13:34:32 <peter1138[d]> It's your own widget, can't you just keep it in there?
13:34:46 <truebrain> my widget repeats other widgets N times
13:35:01 <truebrain> my widget is a NWidgetVertical, so things get stacked nicely below each other
13:35:18 <truebrain> but NWidgetVertical::SetupSmallestSize is a complicated function .. and I need to track its iteration over the children to do what I want ..
13:35:28 <peter1138[d]> Ah :/
13:35:53 <peter1138[d]> Your children need unique indexes for that to work properly.
13:36:03 <truebrain> exactly; was hoping to avoid that ๐Ÿ™‚
13:36:21 <truebrain> I guess I can make `SetupSmallestSize` work on dummy data ...
13:38:12 <truebrain> yeah, that will work fine .. just to calculate size, so that is not an issue
13:40:53 <peter1138[d]> Nice, the 'new' widget tree unit-test caught a run-time error with this changeset.
13:41:17 <peter1138[d]> Accessing a variable after it's been std::move'd
13:41:21 <andythenorth> tests ftw ๐Ÿ˜„
13:42:00 <peter1138[d]> Compile time asserts are better.
13:42:51 <andythenorth> when can we drag trains between depots?
13:42:55 <andythenorth> 'never'
13:43:17 <_jgr_> You just need to build some rails connecting them ๐Ÿ™‚
13:43:21 <peter1138[d]> Teleportation eh?
13:45:14 <peter1138[d]> Oof, I hit 180bpm on one hill today. I guess I am still alive after all ๐Ÿ™‚
13:45:48 <peter1138[d]> Heh, because this uses std::unique_ptr, it also solves the issue that JGR solved the other day ๐Ÿ™‚
13:47:06 <xarick> this check is still wrong...
13:47:10 <xarick> dang
13:49:03 <peter1138[d]> Airports?
13:49:27 <xarick> no, the check nielsm pointed out
13:49:49 <xarick> it's just me being unable to understand logic
13:49:59 <xarick> && and || and == and !=
13:54:01 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190291638656962610/image.png?ex=65a14479&is=658ecf79&hm=d1e942e0fdd008af366f204ae59b4463b49055ec2694a05d74103f556eb37d08&
13:54:01 <truebrain> ignore the `English (UK)` part, but ... it is doing something ๐Ÿ˜„
13:54:41 <xarick> `if (!(vli.company == c->index || (vli.company == OWNER_NONE && (vli.vtype == VEH_AIRCRAFT || vli.vtype == VEH_SHIP)))) continue;`
13:54:41 <xarick> I think this is what I want. Now I need to make it "readable"
13:55:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11640: Codechange: Remove deferred nested_array initialization path. https://github.com/OpenTTD/OpenTTD/pull/11640
13:56:32 <xarick> gonna ask bing chat, I can't think right when it's about logic
13:56:45 <truebrain> peter1138[d]: does `FillNestedArray` need to have `NWidgetBase **array`? ๐Ÿ˜„
13:58:14 <peter1138[d]> Soon, nope ๐Ÿ˜‰
13:58:29 <truebrain> so the thing was actually initialized twice .. that is so weird ..
13:58:34 <truebrain> I assume you tested this for all types? ๐Ÿ˜›
13:58:51 <peter1138[d]> Not twice, there were just two ways to do it.
13:59:15 <peter1138[d]> I think I remember reading once that it was "faster" one way, but I didn't see anything in the code for that comment, so...
13:59:18 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #11640: Codechange: Remove deferred nested_array initialization path. https://github.com/OpenTTD/OpenTTD/pull/11640#pullrequestreview-1799013116
13:59:31 <peter1138[d]> And honestly, initializing windows is not performance critical ๐Ÿ™‚
14:00:16 <truebrain> no, no it is not ๐Ÿ™‚
14:01:37 <truebrain> lol, I will be adding two (!) custom widgets! Owh my!
14:01:50 <peter1138[d]> Nice.
14:05:13 <locosage> where are all the runway sprites used? all airports seem to just use 2646
14:05:49 <locosage> out of 2645-2648
14:06:15 <locosage> also opengfx2 has rotated runway sprites for some reason...
14:08:25 <locosage> oh, city airport uses the whole range...
14:08:54 <peter1138[d]> sr
14:08:59 <truebrain> owh meh, when I use two widgets, I do have to use a global to communicate which iteration the first is .... ugh .....
14:09:20 <peter1138[d]> Hmm
14:09:37 <peter1138[d]> Is one a child of the other?
14:09:38 <talltyler> truebrain: New tab! Does the survey opt-in belong in the same category, perhaps?
14:09:42 <truebrain> or do I? Hmm .. no, I do not ... waiiittttt
14:09:51 <truebrain> talltyler: I do not think so
14:10:20 <peter1138[d]> Nope.
14:10:32 <peter1138[d]> It's not a social-presence thing.
14:10:48 <truebrain> meh; no, I do need a global for construction .. hmm ...
14:10:56 <truebrain> what I was trying to do, and maybe I just shouldn't
14:11:03 <truebrain> was group the plugins together per social platform
14:11:08 <truebrain> so the Steam, Discord, etc
14:11:15 <truebrain> and below that the N plugins that are available for that type
14:11:18 <truebrain> there should be only one
14:11:20 <truebrain> but .. well .. you know
14:11:29 <truebrain> but maybe I should just stick with a single list
14:12:02 <peter1138[d]> Why would there be multiple plugins for a type?
14:12:08 <truebrain> because people are stupid?
14:12:12 <truebrain> just as a general rule ๐Ÿ˜›
14:12:21 <truebrain> and they will put 2 steam plugins in that folder
14:12:22 <peter1138[d]> Well ๐Ÿ™‚
14:12:29 <truebrain> the second is denied, as there is already one loaded
14:12:32 <truebrain> but you know ....... ๐Ÿ˜„
14:13:16 <_glx_> hmm just hide the denied, like GS/AI
14:13:27 <peter1138[d]> Yeah
14:13:43 <truebrain> I do not want to hide them; I want to show that they aren't being loaded
14:13:47 <truebrain> I just wanted to gruup them ..
14:13:55 <peter1138[d]> Okay, I need to think on a better name than "nested_array"
14:13:55 <truebrain> I am pushing this UI stuff ๐Ÿ˜›
14:14:03 <truebrain> mapped_widgets ?
14:14:16 <truebrain> that at least is how I translated it internally ๐Ÿ˜›
14:14:19 <peter1138[d]> It is indexed widgets.
14:14:22 <peter1138[d]> mapped.. hmm.
14:14:29 <truebrain> it is the map from index to widget
14:14:33 <peter1138[d]> Oddly enough, this change uses std::map ๐Ÿ™‚
14:15:18 <peter1138[d]> But, because iteration, I still refer to it as nested_array hehe.
14:15:33 <peter1138[d]> (iteration in development, not iterators)
14:15:35 <truebrain> index_widget_map ?
14:15:38 <truebrain> widget_index_map? ๐Ÿ˜›
14:15:50 <truebrain> index_lookup
14:16:58 <peter1138[d]> Yeah, avoiding the type name in the variable name is always good ๐Ÿ™‚
14:17:27 <truebrain> okay .. now to make a single row of information ... let's see ...
14:19:01 <peter1138[d]> Hmm, is it a widget index or a widget id...
14:19:15 <_glx_> it's an ID
14:19:22 <peter1138[d]> But we call it widget->index ๐Ÿ™‚
14:19:47 <truebrain> id is short for index ๐Ÿ˜› (or identifier ๐Ÿ˜„ )
14:19:48 <_glx_> yeah like VehicleID and friends
14:19:55 <truebrain> InDex ๐Ÿ˜›
14:20:10 <peter1138[d]> id is "identifier" normally ๐Ÿ˜‰
14:20:15 <truebrain> I know ๐Ÿ™‚
14:20:48 <_glx_> it's a unique identifier which happens to be the index in an array
14:22:13 <peter1138[d]> There's no array ๐Ÿ˜‰
14:22:14 <truebrain> calling it ID might help people understand it is not just a random number ๐Ÿ˜›
14:23:26 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11640: Codechange: Remove deferred nested_array initialization path. https://github.com/OpenTTD/OpenTTD/pull/11640#pullrequestreview-1799028276
14:23:39 <truebrain> lol @ CodeQL .. you are cute
14:23:56 <_glx_> all the `WID_` can be understood as WIDGET or WidgetID ๐Ÿ™‚
14:25:03 <peter1138[d]> Oh no ๐Ÿ˜ฆ
14:25:13 <peter1138[d]> I didn't randomly add comments to an existing function!
14:25:24 <truebrain> so ignore and merge! ๐Ÿ™‚
14:26:24 <truebrain> hmm ... all my labels are "..." ... guess they are too small ๐Ÿ˜›
14:27:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11640: Codechange: Remove deferred nested_array initialization path. https://github.com/OpenTTD/OpenTTD/pull/11640
14:28:09 <truebrain> ah, no, simply forgot to forward the right `SetStringParameters` .. "oops" ๐Ÿ™‚
14:29:16 <merni> peter, any chance you could PR that patch which line-breaks the station name in the buy station window? :
14:31:50 <truebrain> hmm .. I expected that after 11640 I had to move my assign-line to `FillNestedArray` .. but that is never called on my widget
14:32:28 <truebrain> because .... I was too quick with `git fetch` after I saw the merge
14:32:32 <truebrain> ffs ๐Ÿ˜› What a day ...
14:34:00 <peter1138[d]> merni: One stale forgotten changeset at a time ๐Ÿ˜‰
14:35:52 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190302170822746112/image.png?ex=65a14e48&is=658ed948&hm=2526b20df40a0ad857c7a202889ede84275b9b5dd2bf7a7a824584e579a6f933&
14:35:57 <truebrain> at least I have the information correct now ๐Ÿ˜›
14:36:12 <truebrain> now to make it pretty !
14:36:29 <peter1138[d]> Oh that's suddenly different ๐Ÿ™‚
14:37:26 <truebrain> hmmm ... `SetDParamStr` takes a pointer .. so I need to keep the memory alive .. hmm ...
14:38:38 <peter1138[d]> Is this for setting size, or drawing it?
14:38:43 <_glx_> hmm one steam says discord
14:39:15 <peter1138[d]> One thing I did that simplified dropdowns is to just store strings instead of dealing with storing parameters etc.
14:39:21 <truebrain> peter1138[d]: drawing; going to put it in a WWT_FRAME .. owh, wait, I can use the string system for that
14:39:46 <truebrain> _glx_: sharp eye ... let me find out why ...
14:39:49 <peter1138[d]> Hmm, but probably that works because no drop down list lives past language changes.
14:41:44 <truebrain> hmmm ... this is far from working how I expected it to work ๐Ÿ˜›
14:43:32 <xarick> `if ((vli.company != c->index && (vli.company != OWNER_NONE || (vli.vtype != VEH_AIRCRAFT && vli.vtype != VEH_SHIP)))) continue;` I just realized nielsm is too smart
14:44:28 <xarick> this can be simply put liek this: `if (vli.company != c->index && vli.company != OWNER_NONE) continue;`
14:45:40 <truebrain> hmmm .. Draw() is called in a different way than I expected ... meh
14:48:28 <xarick> if it is a neutral station, it is garanteed to never be of train and road veh, because those stations don't (yet) exist, thus making the vtype checks redundant
14:50:22 <xarick> but once they exist (eventually), the checks would be erroneous. At that time it would be okay to have all companies iterate over those veh types
14:50:39 <xarick> damn brilliance
14:50:58 <jfs> you could otherwise check what facilities the station has and only iterate over the vehicle types appropriate for those facilities
14:51:55 <jfs> although, of course, that would mean that if you have lorries going to a station and demolish the last loading bay for them then although they still have the station in their orders, they would not show in the list
14:52:35 <xarick> neutral station signs poof imediately, the station is gone instantly, doesn't linger
14:54:15 <xarick> I focused too much on vtype... ๐Ÿ˜ฆ
14:54:19 <xarick> that was my wrongdoing
14:55:00 <truebrain> lol .. I just spend 10 minutes to find out I was overwriting strings when searching for the longest string
14:55:04 <truebrain> that ... is not helpful
14:55:46 <truebrain> I did a `string &longest`, as I wanted a reference
14:55:54 <truebrain> but ... I should have used a `string *longest` ๐Ÿ˜›
14:55:56 <truebrain> lalala
14:59:59 <peter1138[d]> Hmm, normally we just store the longest length, not the longest string.
15:00:29 <truebrain> I didn't want to store it either .. I just suck at programming ๐Ÿ˜„
15:00:51 <truebrain> I intended to find the string that was longest, but I just assigned it to the first entry in the list ๐Ÿ˜›
15:01:17 <peter1138[d]> Dimension dim; dim = maxdim(dim, GetStringBoundingBox(xxx));
15:01:47 <peter1138[d]> (But if you want multi-line strings that doesn't work)
15:02:05 <truebrain> that "xxx" I was fetching ๐Ÿ˜›
15:02:28 <peter1138[d]> Programming is hard.
15:02:47 <peter1138[d]> We should just use some kind of blueprint system that lets us link boxes together.
15:03:37 <jfs> xarick: your general weakness when programming seems to be that you focus strongly on single, specific cases, and possibly over-optimize for those. it can be a strength sometimes, but one of the common traits of experienced programmers is considering the larger picture of how the parts of the program interact and which parts can be written in general ways that handle the largest number of cases
15:03:37 <jfs> without specialization.
15:03:37 <jfs> my best advice for you would be to try, when you think of a solution to something, to also spend some more time to think about how that solution can perhaps be modified to work for more cases, or ideally every case, instead of using narrow conditions for when to do things.
15:04:32 <jfs> (I hope you can take this as genuine advise, I am not trying to be mean and I apologize if it comes off like that)
15:04:46 <peter1138[d]> 215km to go to reach next target. 100% sure I will not reach that in 2 days.
15:05:29 <peter1138[d]> 16 files changed, 137 insertions(+), 199 deletions(-)
15:05:33 <peter1138[d]> Hmm, less is more.
15:10:50 <truebrain> okay ... string-system question ... I have a string `STR_JUST_STRING`, where the first param is normally something like "success", "failed", etc. There is on, which contains a parameter again .. so it is `{RAW_STRING} not running` .. how do I address that `RAW_STRING` .. is that `{1:RAW_STRING}`, and then `SetDParam` to 1?
15:11:26 <truebrain> no, that crashes the game ๐Ÿ˜›
15:12:51 <xarick> my mental gymnastics failed to see this could be much more simple. If only I had tried to start from the station owner... but I focused on vtype because that was the main thing these cached lists are about, groups are per vehicle type. I didn't even consider trying the other way around
15:13:45 <Rubidium> you probably need STR_JUST_STRING1, and when you want a raw string SetDParam(0, STR_JUST_RAW_STRING); SetDParamStr(1, myRawString)
15:13:51 <xarick> sorry about that
15:15:03 <truebrain> Rubidium: Thank you! Would not have tried that iteration, but works as advertised ๐Ÿ˜„
15:18:16 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190312839102083112/image.png?ex=65a15837&is=658ee337&hm=3b3f126f82564eb32d2e2d6df88dfdd2a9909f7abcee8b12a7dbbb110356b5f7&
15:18:23 <peter1138[d]> Ooo
15:18:27 <truebrain> now for some dropdowns .. but it is getting there ๐Ÿ™‚
15:19:39 <peter1138[d]> Do you base off NWidgetVertical? Needs some SetPIP() space to separate the frames ๐Ÿ™‚
15:19:50 <truebrain> yeah, was just looking for that ..
15:19:53 <truebrain> not sure why it isn't working ๐Ÿ˜„
15:20:04 <xarick> ugh social stuff
15:20:12 <xarick> im anti social
15:20:34 <truebrain> no need to be a dick and proof that fact by being a dick to someone else their work?
15:20:48 <peter1138[d]> It needs to be in your function rather than the widget desc array.
15:21:04 <truebrain> peter1138[d]: hmm, yeah, that is why it isn't working ๐Ÿ˜„
15:21:50 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190313736494395402/image.png?ex=65a1590d&is=658ee40d&hm=a20b91ad86949607fc8f96549d2c9db6a8540ed9424bace9c2164bf98bf9f5db&
15:21:50 <truebrain> w00p
15:21:53 <xarick> I thought OpenTTD was supposed to be clean of those features
15:21:53 <peter1138[d]> \o/
15:22:35 <peter1138[d]> Unclean! Unclean!
15:22:54 <truebrain> next we remove Multiplayer ... way too social
15:23:59 *** Wormnest has joined #openttd
15:24:54 <truebrain> right ... tonight we try out if a dropdown also works in this method ... will be fun if it does ๐Ÿ˜„
15:25:33 <xarick> once steam, or discord, etc... become less relevant, these integrated features... remain ๐Ÿ˜ฆ
15:26:41 <_jgr_> If not steam/discord it'd be something else, the idea of being "social" isn't going to go out of fashion any time soon
15:26:58 <peter1138[d]> IRC Presence ๐Ÿ™‚
15:27:08 <truebrain> "social" ๐Ÿ˜›
15:27:11 <andythenorth> oops
15:27:12 <peter1138[d]> tt-forums presence.
15:27:17 <andythenorth> forgot to use .copy()
15:30:22 <xarick> just hoping it doesn't become integral part of the game, or at least allow versions without it. I consider these kind of features as "bloat"
15:30:36 <peter1138[d]> Do you understand the concept of plugins?
15:30:49 <xarick> ah, ok, then that's ok
15:31:12 <merni> Maybe you ought to read the very detailed PR description before assuming things :p
15:32:31 *** truyul1943[m] has quit IRC (Quit: Client limit exceeded: 20000)
15:34:06 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11641: Codechange: Replace C-style nested array Widget lookup https://github.com/OpenTTD/OpenTTD/pull/11641
15:34:08 <peter1138[d]> Wow.
15:34:11 <andythenorth> so much fear in the world eh
15:34:15 <andythenorth> moar lolz
15:34:15 <peter1138[d]> My enter key strikes agian.
15:34:53 <talltyler> Uncleanliness is how plagues spread ๐Ÿ˜‰
15:35:15 <Rubidium> peter1138[d]: regarding the IRC presence, that really requires jukebox integration ;) https://weblogs.openttd.org/openttd/2023/12/26.html#115920-222
15:37:59 <peter1138[d]> ๐Ÿ™‚
15:38:22 <peter1138[d]> Slaps with a large trout integration.
15:39:01 <talltyler> How many plugins can one load? Does it need a scrollbar?
15:39:13 <talltyler> (If that many plugins even exist at any point)
15:39:17 <peter1138[d]> Heh
15:39:20 <talltyler> (But future-proofing etc)
15:39:25 <peter1138[d]> I still have *that* patch somewhere...
15:39:35 <Eddi|zuHause> 640k plugins ought to be enough for anyone :p
15:39:45 <merni> Who needs future-proofing, just extend the window to be as long as necessary!
15:40:12 <peter1138[d]> It did used to be too big ๐Ÿ˜„
15:40:15 <talltyler> Thatโ€™s what all windows do by default ๐Ÿ˜‰
15:40:48 <talltyler> Yes, the current Options menu in 13.4 is too tall for my monitor on 2x scale. But now thatโ€™s fixed with tabs ๐Ÿ˜„
15:41:41 <peter1138[d]> I get confused when I go back to 13.4 ๐Ÿ™‚
15:42:32 <talltyler> I never see 13.4 because I donโ€™t play OpenTTD ๐Ÿ˜›
15:42:43 <peter1138[d]> Hahah
15:43:07 <talltyler> (Partially true, I mostly play JGRPP with friends and havenโ€™t touched single-player OpenTTD in months)
15:43:20 <peter1138[d]> Traitor!
15:43:26 <talltyler> I know ๐Ÿ˜ฆ
15:44:00 <talltyler> Blame kale91 for setting up such nice servers ๐Ÿ˜‰
15:44:39 *** kale91 has joined #openttd
15:44:39 <kale91> You can blame me for this
15:44:42 <kale91> I can take it
15:47:24 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10548: Feature: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548
15:49:29 <merni> Is this really a "feature" and not a codechange?
15:49:37 <peter1138[d]> Nope ๐Ÿ™‚
15:52:46 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #10548: Feature: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548#pullrequestreview-1799081614
15:54:40 <xarick> feature seemed to be the appropriate word
15:54:49 <merni> Feature has to be visible to the user, iirc
15:55:02 <merni> *player
15:55:06 <merni> this is not boring software!
15:56:28 <xarick> GroupStatistics gain a new member. It's not exactly a code change, something is being added to it
15:56:50 <merni> addition/deletion is also a change
15:57:40 <merni> Quoth CODINGSTYLE.md:
15:57:40 <merni> > Codechange, Cleanup: Changes without intentional change of behaviour from user-point-of-view.
15:58:53 <xarick> ok, codechange then
16:03:34 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799088049
16:08:34 <truebrain> Unused static function
16:08:34 <truebrain> Lol
16:09:40 <_glx_> nice more deletion in the diff
16:10:09 <truebrain> CodeQL is so smart ๐Ÿ™‚
16:10:54 <peter1138[d]> Hmm
16:11:58 <peter1138[d]> Why is it unused/unreachable...
16:15:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799094388
16:25:37 <peter1138[d]> CodeQL is just lying ๐Ÿ˜ฎ
16:26:33 <xarick> Codechange feels wrong, maybe Add?
16:27:31 <xarick> from user-point-of-view... well does time matter?
16:27:39 <xarick> taking less time to do the same stuff
16:32:56 <LordAro> if users cannot interact with it, it's a codechange
16:33:22 <LordAro> "Make OTTD 5 billion percent faster" would still be a Codechange
16:33:41 <LordAro> well, really significant stuff is probably a codechange
16:33:43 <LordAro> er
16:33:53 <LordAro> could be a feature*
16:34:07 <xarick> https://github.com/OpenTTD/OpenTTD/blob/master/CODINGSTYLE.md?plain=1#L421-L428
16:34:27 <xarick> I'm inclined to use Add
16:35:03 <merni> Might be worth seeing how Add has been used in other places
16:35:23 <merni> > "Feature" for user-point-of-view stuff, "Add" for other.
16:35:23 <merni> seems to be somewhat confusing
16:35:52 <_jgr_> A very modest cache is not not really or feature or something worth mentioning in a changelog
16:36:19 <peter1138[d]> It's his life's work and you're calling it modest! ๐Ÿ˜„
16:38:06 <xarick> I'm going to change to Add
16:38:31 <jfs> "Change" could also be relevant, since this might affect the ordering of vehicles/processing in some instances
16:38:36 <jfs> but it'
16:39:13 <jfs> but it doesn't really "add" something, it does not create new APIs for Squirrel scripts
16:39:29 <peter1138[d]> Yeah, I'd go with Change.
16:39:48 <peter1138[d]> Codechange is more restructuring without much in the way of side-effects.
16:40:10 <peter1138[d]> (in my interpretation :))
16:43:38 <_glx_> I see it the same, codechange is implementation detail without effect on gameplay
16:56:45 *** kstar892[m] has quit IRC (Quit: Client limit exceeded: 20000)
17:06:11 <xarick> "Change" is a safe-bet
17:08:21 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1190340546225508372/image.png?ex=65a17205&is=658efd05&hm=55fb91dc4ca05e6d0bf70d74f36344ffbd77b32b2d53e3ca1422ce5c19f0b848&
17:08:21 <andythenorth> such Variants
17:09:16 <peter1138[d]> Ctrl click company colour variations
17:09:46 <peter1138[d]> Shift click to estimate your variants
17:10:14 <emperorjake> moar units
17:18:22 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:20:48 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10548: Change: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548
17:23:17 <xarick> back to yesterday's problem... the const removal
17:23:49 <xarick> or switching to VehicleID which doesn't use const
17:25:22 <xarick> yeh... I dunno
17:25:54 <xarick> better rerun these TICC/TOCC tests again now that I know how to disable asserts
17:39:48 <peter1138[d]> Beer o'clock?
17:44:00 <andythenorth> nearly
17:47:19 <DorpsGek> [OpenTTD/survey-web] JGRennison opened pull request #9: Add: Survey pubkey for JGRPP https://github.com/OpenTTD/survey-web/pull/9
18:00:41 *** gelignite has joined #openttd
18:02:16 <DorpsGek> [OpenTTD/survey-web] TrueBrain approved pull request #9: Add: Survey pubkey for JGRPP https://github.com/OpenTTD/survey-web/pull/9#pullrequestreview-1799145676
18:05:30 <DorpsGek> [OpenTTD/survey-web] TrueBrain merged pull request #9: Add: Survey pubkey for JGRPP https://github.com/OpenTTD/survey-web/pull/9
18:07:09 <truebrain> _jgr_: deployed to production!
18:07:28 <_jgr_> Thanks ๐Ÿ™‚
18:07:32 <truebrain> let me know when you build a binary with the key in it, and when you are expecting surveys to arrive on the backend; I will check if they actually do ๐Ÿ™‚
18:08:15 <truebrain> also the cherry-on-top for me, to show the instructions were clear enough ๐Ÿ˜›
18:12:40 <truebrain> the create-survey-key just 404d .. hmm
18:13:00 <truebrain> owh, your action shows why ๐Ÿ˜›
18:16:51 <truebrain> w00p, 200; nice ๐Ÿ™‚
18:17:43 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799151624
18:20:13 <_jgr_> The instructions seemed to imply that the private key needed to be base64 encoded again before it was pasted into the github actions secret, but it just needed the PEM file pasting as is
18:20:36 <truebrain> ah; yeah ... mind updating the docs to be more clear there?
18:20:46 <_jgr_> Sure
18:21:31 <xarick> ` for (const VehicleID vehicle_id : stats.vehicle_list) {
18:21:31 <xarick> Train *t = Train::From(Vehicle::Get(vehicle_id));`
18:21:31 <xarick> using VehicleID didn't make it much better
18:27:13 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799156281
18:27:55 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799156560
18:28:15 <DorpsGek> [OpenTTD/survey-web] JGRennison opened pull request #10: Readme: Adjust documentation of SURVEY_SIGNING_KEY GitHub actions secret https://github.com/OpenTTD/survey-web/pull/10
18:28:43 <DorpsGek> [OpenTTD/survey-web] TrueBrain approved pull request #10: Readme: Adjust documentation of SURVEY_SIGNING_KEY GitHub actions secret https://github.com/OpenTTD/survey-web/pull/10#pullrequestreview-1799156876
18:28:46 <truebrain> _jgr_: no, the docs were just plain wrong ๐Ÿ˜„
18:29:27 <DorpsGek> [OpenTTD/survey-web] TrueBrain merged pull request #10: Fix: Adjust documentation of SURVEY_SIGNING_KEY GitHub actions secret https://github.com/OpenTTD/survey-web/pull/10
18:29:29 <truebrain> tnx ๐Ÿ™‚
18:32:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799158394
18:33:10 <truebrain> peter1138[d]: mostly why I ask, is that you give the WidgetLookup as a reference to the function to update .. so why that? Why not updated `widget_lookup` directly?
18:33:18 <truebrain> (it was already like that, which I already didn't really understand ๐Ÿ˜„ )
18:33:51 <truebrain> basically, why `FillWidgetLookup(WidgetLookup &widget_lookup)` and not `FillWidgetLookup()`
18:34:19 <truebrain> or `FillWidgetLookup(Window &w)` , if it is on widgets ๐Ÿ˜›
18:35:29 <peter1138[d]> Yeah, FillWidgetLookup is on NWidgetBase, and widget_lookup is on Window.
18:36:26 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641#pullrequestreview-1799160000
18:36:35 <truebrain> I could understand it more if that variable was private, but okay; was already weird, so what-ever ๐Ÿ˜›
18:37:01 <peter1138[d]> I can change it to take Window *
18:37:19 <truebrain> was more wondering if there was a fundamental reason; but I guess there is not ๐Ÿ˜›
18:37:30 <truebrain> so the argument is "small scoped information" vs "just give the whole object"
18:37:36 <truebrain> I can't be arshed ๐Ÿ˜›
18:37:40 <peter1138[d]> No, it's just that's how it already was, so...
18:39:04 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/a8e587632a454c7e48fcf5ae13a4f6f82ac9f0f3
18:39:05 <DorpsGek> - Update: Translations from eints (by translators)
18:40:43 <_glx_> oh the doxygen stuff not being near the function feels so weird
18:40:51 <truebrain> yeah, it is
18:41:17 <peter1138[d]> Yup
18:41:21 <truebrain> okay, my dropdowns really do need an unique id it seems .. can't do the same tricks I did with drawing ๐Ÿ˜›
18:42:26 <truebrain> I want a `userdata` in the widget! ๐Ÿ˜„
18:42:46 <peter1138[d]> Add it ๐Ÿ™‚
18:42:54 <truebrain> bit weird, to add it for one window ๐Ÿ™‚
18:43:30 <peter1138[d]> Lots of things could be nicer if they were widget members instead of done via Window events.
18:43:49 <truebrain> from what I can tell, it is not far from making that possible
18:44:07 <truebrain> mostly what I noticed that instead of `w->`, you want "first widget in tree that handles this"
18:44:24 <truebrain> basically, delegates ๐Ÿ˜„
18:45:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11641: Codechange: Replace C-style nested array with std::map for widget lookup. https://github.com/OpenTTD/OpenTTD/pull/11641
18:45:59 <peter1138[d]> Merged before I get sidetracked and rewrite a ton of other stuff :p
18:46:06 <truebrain> smart ๐Ÿ˜„
18:46:39 <truebrain> lol @ OnClick of GameOptionsWindow ... if there was a click and it is not in one of these other widgets? It MUST be a dropdown then ๐Ÿ˜›
18:46:54 <peter1138[d]> Yes, that's very weird ๐Ÿ™‚
18:47:00 <truebrain> especially as it is far from true ๐Ÿ˜›
18:47:01 <peter1138[d]> There's not even that many dropdowns in that window.
18:47:34 <peter1138[d]> I think originally it was just dropdowns and a button.
18:50:14 <truebrain> okay, on OnClick I really can't tell which of the plugin-dropdowns is being clicked
18:50:33 <truebrain> I guess I could use `pt` to find that .. but that is getting a bit meh
18:50:52 <truebrain> so I need to hide some information somewhere ๐Ÿ˜„
18:52:09 <peter1138[d]> You should be able to set up automatic widget ids quite easily now.
18:52:12 <truebrain> should we add an assert or something that if you register the same ID twice in the lookup, you notice?
18:52:28 <peter1138[d]> Hmm, could do.
18:52:37 <truebrain> peter1138[d]: hmm, smart idea. I can do that, I think
18:57:38 <_glx_> oh nice, we used to get the biggest index but never actually used it ?
18:58:15 <peter1138[d]> We did use it.
18:58:34 <peter1138[d]> To allocate an array with CallocT.
18:59:33 <truebrain> ` SQGSWindow.DefSQConst(engine, ScriptWindow:://, "//");`
18:59:37 <truebrain> wth did it generate there ... lol
18:59:51 <peter1138[d]> Uh...
19:00:01 <truebrain> script doesn't ignore comments in that list ๐Ÿ™‚
19:00:31 <truebrain> it does ignore `/* */` comments
19:00:33 <truebrain> so there is that
19:02:39 <truebrain> okay, prepared the code for the widget-index to be dynamic for dropdowns, but now how do I rewrite the dropdown index .. hmm
19:04:11 <xarick> how do I terminate a rebase with conflicts and accept it as it stands without rolling back to the state before the rebase began?
19:04:55 <peter1138[d]> One way is to create a new branch at the current state.
19:05:17 <peter1138[d]> Then you can abort and you still have it as a branch. There's probably other ways.
19:06:17 <jfs> if you have the rebase in progress then you `git add` the files that are marked as conflicts (whether you have resolved them or not) and then `git rebase --continue`
19:06:53 <jfs> of course it might conflict further if you have more commits after the first one that made conflicts, and you'd have to do the same for every following instance
19:11:58 <truebrain> hmm ... okay, I can't figure out a clean way to reassign WIDs ๐Ÿ˜›
19:12:12 <truebrain> I tried to do it in the `FillWidgetLookup`, which kinda works, but it doesn't update its own reference
19:12:28 <truebrain> which is a bit problemetic .. but I do have the pointer
19:12:31 <truebrain> so maybe I should just cast it
19:14:53 <truebrain> ```reinterpret_cast<NWidgetLeaf *>(widget_lookup[WID_GO_SOCIAL_PLUGIN_DROPDOWN])->index = WID_GO_SOCIAL_PLUGIN_DROPDOWN + index;
19:14:53 <truebrain> widget_lookup[WID_GO_SOCIAL_PLUGIN_DROPDOWN + index] = widget_lookup[WID_GO_SOCIAL_PLUGIN_DROPDOWN];```
19:15:04 <truebrain> that weirdly enough just works ๐Ÿ˜›
19:15:49 <peter1138[d]> Mapping multiple IDs to the same widget instance?
19:16:17 <truebrain> the definition uses the same ID; this moves them to different IDs ๐Ÿ™‚
19:16:32 <peter1138[d]> Hmm, the first line looks odd, but...
19:16:39 <truebrain> open for better suggestions ๐Ÿ™‚
19:18:00 <peter1138[d]> You are looking it up by index... and then change its index.
19:19:02 <peter1138[d]> `this->GetWidget<NwidgetLeaf>(WID_GO_SOCIAL_PLUGIN_DROPDOWN)->index = ...`, but I guess you are not in the context of the Window here.
19:19:26 <truebrain> nope ๐Ÿ™‚
19:19:59 <truebrain> you didn't want to give me a `Window *` ๐Ÿ˜›
19:20:26 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11642: Codechange: Replace mishmash of types for widget index with plain int. https://github.com/OpenTTD/OpenTTD/pull/11642
19:20:38 <peter1138[d]> I did I could change it ๐Ÿ™‚
19:20:56 <peter1138[d]> Whew
19:21:08 <truebrain> hmm .. I am now starting to doubt if dropdowns here is actually a good idea ..
19:21:17 <truebrain> I wanted to use it, so you could disable integrations ingame too
19:21:22 <truebrain> but .. not sure that actually makes sense
19:21:34 <truebrain> in the future, we might want to use it to limit what a plugin receive .. generic information or specific
19:21:41 <truebrain> but there too ... not sure it actually makes sense ๐Ÿ˜›
19:21:49 <truebrain> if you install the plugin .. you kinda want to use it
19:21:54 <truebrain> otherwise ... don't install it?
19:21:56 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #11642: Codechange: Replace mishmash of types for widget index with plain int. https://github.com/OpenTTD/OpenTTD/pull/11642#issuecomment-1872293669
19:22:39 <truebrain> maybe start small and simple ... and just don't allow toggles .. hmm, I guess
19:30:12 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190376240939536494/image.png?ex=65a19343&is=658f1e43&hm=b4e21adcd6a6a936b3ba0eb6e99157ecd8412701f07a8df8ac2212a5cdb3e51c&
19:30:12 <truebrain> sufficient? or does it need more?
19:30:40 <truebrain> changed the text to `no plugins to add with social platforms installed`
19:31:28 <peter1138[d]> Looks fine to me.
19:31:33 <truebrain> cheers
19:31:44 <peter1138[d]> But... "how do you install one"?
19:31:47 <jfs> yes
19:31:58 <truebrain> some day via BaNaNaS
19:32:02 <truebrain> that day is just not today
19:32:05 <truebrain> or tomorrow ๐Ÿ˜›
19:32:16 <jfs> mention it in the readme file and say it's fine for now
19:32:54 <truebrain> yeah, need to figure out where the plugins show up on the website too
19:34:22 <truebrain> jfs: I am thinking of naming it `social_integration` instead of social presence
19:34:30 <truebrain> do you have any feel for one way or the other?
19:34:45 <jfs> nah it's probably a better name tbh
19:35:57 *** Wolf01 has joined #openttd
19:43:44 *** rau117 has joined #openttd
19:43:44 <rau117> truebrain: Hmm... A separate button for something that may not be installed? Maybe re-arrange the buttons in a 2x2 grid, in case the translation turns out to be too long
19:45:32 <andythenorth> https://www.tt-forums.net/viewtopic.php?p=1266387#p1266387 shoukd I post my Nuke a City gamescript? ๐Ÿ™‚
19:46:02 <brickblock19280> sure
19:46:19 <rau117> rau117: In addition to โ€œno social pluginsโ€, write where players can get them, or just make this button inactive
19:46:20 <peter1138[d]> 2x2 for a row of tabs seems a bad idea.
19:48:34 <rau117> https://cdn.discordapp.com/attachments/1008473233844097104/1190380864878682162/image.png?ex=65a19792&is=658f2292&hm=f92ef08b5c2ee6be2e87f5661e5376eb82d04836c72999c46706b777b146c3a5&
19:48:34 <rau117> although the tab-buttons themselves will not be such a big problem in French... The settings window itself can be disgustingly long (=
19:48:57 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190380959804162058/image.png?ex=65a197a9&is=658f22a9&hm=32ae315f4a59e94550cbbccbd99817c6511832172874026d63a4e48f7bc0eff5&
19:49:11 <truebrain> hiding those `()` in that case is annoyingly difficult ๐Ÿ˜›
19:51:09 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1190381514358276227/image.png?ex=65a1982d&is=658f232d&hm=2cdb03ed3899f6221a4b3e2bd1700a2edb592e3501036c27e8e69d68f73d45bb&
19:51:10 <truebrain> magic!
19:51:17 <truebrain> lol @ those orange dots constantly ๐Ÿ˜›
19:56:39 <peter1138[d]> You clicked ๐Ÿ™‚
19:57:22 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11628: Feature: Social Presence to integrate with Steam, Discord, GOG, etc https://github.com/OpenTTD/OpenTTD/pull/11628
19:57:31 <truebrain> tnx for the help today peter1138[d] ; I think it is a good first step ๐Ÿ™‚
19:59:40 <andythenorth> Such modern features ๐Ÿ™‚
20:02:33 <peter1138[d]> Such?
20:02:55 <peter1138[d]> More cheese?
20:05:00 <Eddi|zuHause> what's the overlap between modern features and BAD FEATURES?
20:05:14 <truebrain> _jgr_: so I saw a survey coming in that was significantly bigger than normal .. it is one from JGRPP ๐Ÿ˜› Mostly bigger because of a lot of NewGRFs ๐Ÿ˜„ But it is marked as "verified", so signing etc works ๐Ÿ™‚ One minor thing, the version is `jgrpp-0.56.1-He62c7f60`; I guess that is because this was not an official release?
20:06:16 <Eddi|zuHause> why H? wasn't that letter previously used to distinguish different versioning systems?
20:06:27 <_jgr_> I built the most recent commit, rather than the last release
20:06:46 <truebrain> well, the last commit has yet another hash ๐Ÿ˜›
20:07:09 <truebrain> there is no commit `e62c7f60` in your repo ๐Ÿ˜’
20:07:58 <truebrain> the Release build also says it should be `jgrpp-0.56.1` .. so now I am not even sure what that postfix is exactly ๐Ÿ˜„
20:08:48 <_jgr_> The H suffix is for when the version script doesn't have access to the git info for some reason, but the source doesn't match the release version info
20:09:19 <_jgr_> Probably because of the delete VCS part of the release workflow
20:09:35 <_jgr_> The actual releases won't have this
20:09:47 <truebrain> okay; just so you know, for surveys you create a key for `jgrpp-0.56.1`, but as you don't send that as version, it thinks someone is being a bit nasty ๐Ÿ˜›
20:09:54 <truebrain> good; all I wanted to know ๐Ÿ™‚
20:10:19 <truebrain> `"linkgraph.distribution_per_cargo[61]": "128",`
20:10:20 <truebrain> lol
20:10:51 <truebrain> results look sane; at least my initial parser understands it
20:11:26 <LordAro> truebrain: nice (re socials)
20:11:58 <truebrain> almost done, it seems ... need to add them to the crashlog, so we know they were there when crashing, and need to make a GOG plugin .. other than that, I think, this is about all we need
20:12:28 <truebrain> maybe a `reload all plugins` button .. might be useful, I guess
20:13:04 <LordAro> i guess there's nothing we can do about plugins infinite looping (or just being slow) or just plain crashing?
20:13:26 <truebrain> nope
20:14:38 <LordAro> we'd need coroutine stuff, i guess
20:14:51 <truebrain> I did consider doing this in WASM for the sandboxing
20:15:05 <truebrain> but it didn't actually solve anything ๐Ÿ˜› As we integrate with a SteamSDK, which might also crash / loop
20:15:15 <LordAro> ha
20:15:53 *** Eddi|zuHause2 has joined #openttd
20:16:21 <LordAro> should probably test crashlog when crashing within plugin, as well as them just being mentioned
20:16:41 <truebrain> I wouldn't know why it wouldn't produce a crashlog, but will test ๐Ÿ™‚
20:16:52 <truebrain> I do need to publish the symbols on our symbol server, so we can trace them ๐Ÿ˜›
20:17:08 <LordAro> :)
20:19:12 <_glx_> intel and amd drivers can trigger crashlog ๐Ÿ˜‰
20:19:46 *** Eddi|zuHause has quit IRC (Ping timeout: 480 seconds)
20:19:56 <_glx_> I don't see why it would different for plugins
20:20:36 <truebrain> doesnt hurt to test ๐Ÿ™‚
20:22:49 *** Eddi|zuHause2 is now known as Eddi|zuHause
20:23:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11642: Codechange: Replace mishmash of types for widget index with plain int. https://github.com/OpenTTD/OpenTTD/pull/11642
20:23:12 <Eddi|zuHause> weird, that's at least the second time in a few weeks that internet disappeared for a few minutes
20:23:55 <peter1138[d]> I stole it.
20:24:51 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642#issuecomment-1872321561
20:26:06 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11628: Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc https://github.com/OpenTTD/OpenTTD/pull/11628#pullrequestreview-1799206085
20:26:20 <truebrain> long switch case, lolz
20:26:30 <truebrain> not wrong, but also ... how we do UIs ๐Ÿ˜›
20:39:08 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on pull request #11628: Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc https://github.com/OpenTTD/OpenTTD/pull/11628#pullrequestreview-1799206802
20:48:09 <xarick> when you have 3 vehicles, what variable do you use for the 3rd?
20:48:14 <xarick> v, u and ?
20:48:21 <peter1138[d]> w ๐Ÿ˜‰
20:48:29 <jfs> Then you have too many
20:48:44 <jfs> And should refractor
20:48:48 <peter1138[d]> Yes
20:49:11 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:49:11 <peter1138[d]> My environment always complains about these single letter variable names ๐Ÿ™‚
20:49:14 <xarick> it's the disaster big ufo code that requires me for a 3rd
20:49:41 <xarick> v2 is a bad name
20:50:08 <jfs> Then use a descriptive name instead
20:50:30 <xarick> I would, but it's so temporary
20:51:03 <jfs> Like ufo_vehicle, shadow_vehicle, target_vehicle
20:51:45 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642#pullrequestreview-1799213846
20:51:59 <peter1138[d]> ๐Ÿ˜„
20:52:09 <jfs> Variable names are for readability, just because they have a short life time doesn't mean they must have a short name
20:53:07 <xarick> v = the ufo vehicle, u = the RoadVehicle to destroy, derived from w, which is a Vehicle
20:53:45 <peter1138[d]> Vehicle *ufo
20:53:49 <peter1138[d]> Vehicle *target
20:53:51 <peter1138[d]> *shrug*
20:54:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642#issuecomment-1872332974
20:54:47 <xarick> renaming u to target means I need to rename all other instances of u in that function for consistency
20:56:49 <jfs> That could be a neat standalone Codechange commit
20:58:12 <xarick> hmm, i do a new PR for it, or just a new commit in the same PR?
21:01:24 <peter1138[d]> New PR, because your PRs tend to go.. off-piste.
21:02:04 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642
21:03:52 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10548: Change: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548
21:07:16 <andythenorth> Itโ€™s important to use single letter variable names, for performance reasons
21:08:38 <andythenorth> * in some js implementations in 2000
21:09:51 *** virtualrandomnumber has joined #openttd
21:10:05 *** virtualrandomnumber has quit IRC ()
21:15:36 <peter1138[d]> Heh
21:15:45 <peter1138[d]> BBC BASIC too.
21:21:48 <andythenorth> literally more bytes to move?
21:28:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642
21:28:46 <peter1138[d]> Hm.
21:32:25 <LordAro> peter1138[d]: aren't rabbit holes great?
21:32:32 <peter1138[d]> Very much.
21:38:44 <xarick> ops, i removed a const where i shouldn't
21:40:26 <Eddi|zuHause> we need to bring back "DEFINT A-Z" :p
21:41:08 <Eddi|zuHause> don't tell me i mistyped a name, just make a new variable instead
21:42:04 <peter1138> ON ERROR RESUME NEXT
21:43:57 <andythenorth> try: foo except: pass
21:44:16 <andythenorth> hmm Horse `Sprites complete for 803 consists; incomplete for 10 consists; 98%`
21:44:31 <peter1138[d]> Solution: Add more consists.
21:44:59 <andythenorth> always
21:55:37 <xarick> I have a problem with the const removal
21:56:54 <xarick> `stats.vehicle_list.push_back(const_cast<Vehicle *>(v));` is this okay? If it's not, I gotta remove the const from `/* static */ void GroupStatistics::CountVehicle(const Vehicle *v, int delta)` and everywhere this propragates
21:59:05 <xarick> and I'm kind of worried it would also means losing performance
22:04:02 <peter1138[d]> Check annotations, hmm.
22:04:29 <peter1138[d]> const vs non-const does not affect performance.
22:06:28 <peter1138[d]> Ah of course, different enums :/
22:09:24 <Eddi|zuHause> const is a compiler constraint, has nothing to do with performance
22:09:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642
22:11:15 <peter1138[d]> 137 files :/
22:13:20 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:20:42 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11628: Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc https://github.com/OpenTTD/OpenTTD/pull/11628#pullrequestreview-1799239326
22:21:43 <jfs> Eddi|zuHause: It might allow the compiler to do more optimizations in some cases, though.
22:21:53 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #11643: [Bug]: Survey preview window has unrendered gap in window layout https://github.com/OpenTTD/OpenTTD/issues/11643
22:23:17 <truebrain> That gap was not there last I touched ... ๐Ÿ˜›
22:24:07 <peter1138[d]> Hmm, is that the textfile window....
22:28:28 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #11644: [Bug]: Buffer over-read/off-by-one error in StrMakeValid(string_view) https://github.com/OpenTTD/OpenTTD/issues/11644
22:30:27 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:36:40 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10548: Change: Groups cache vehicle lists https://github.com/OpenTTD/OpenTTD/pull/10548
23:00:53 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642#pullrequestreview-1799250364
23:02:47 *** Wormnest has joined #openttd
23:13:06 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #11645: Fix #11644: Off by one error/buffer over-read in StrMakeValid https://github.com/OpenTTD/OpenTTD/pull/11645
23:16:00 <peter1138[d]> #11643 seems to be another victim of removing ReInitAllWindows() from LoadStringWIdthTable()
23:16:05 *** gelignite has quit IRC (Quit: Stay safe!)
23:18:54 <peter1138[d]> Yeah, the call CheckForMissingGlyphs() in TextfileWindow::LoadText() did way more than just check for missing glyphs ๐Ÿ˜‰
23:29:14 <Eddi|zuHause> jfs: yes, but that's worrying about performance on the wrong level.
23:32:48 <truebrain> peter1138[d]: Haha, I remember it did. It amazed me how much things broke when I removed that function
23:45:16 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #11646: [Bug]: GetLogPrefix function static state is not thread-safe https://github.com/OpenTTD/OpenTTD/issues/11646
23:47:09 <xarick> can I check if an item is in a std::vector with if (vehicle_list[item] != nullptr) or some equivalent to nullptr?
23:51:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11647: Fix #11643: Empty area at top of survey preview. https://github.com/OpenTTD/OpenTTD/pull/11647
23:54:09 <peter1138[d]> So, bug hidden by side-effects of other functions... fun.
23:55:26 <_glx_> no if you try to access non existing index it's an error
23:55:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11642: Codechange: Replace mishmash of types for widget index with WidgetID. https://github.com/OpenTTD/OpenTTD/pull/11642
23:57:03 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
23:58:02 <_glx_> actually "Accessing a nonexistent element through this operator is undefined behavior"
23:58:16 <_glx_> worse than an error
23:59:45 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)