IRC logs for #openttd on OFTC at 2025-06-06
β΄ go to previous day
00:02:26 *** k-man has quit IRC (Quit: WeeChat 4.6.3)
01:39:05 *** Wormnest has joined #openttd
02:27:14 *** Wormnest has quit IRC (Quit: Leaving)
02:47:01 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:02:00 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:02:03 *** WormnestAndroid has joined #openttd
03:02:06 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:02:22 *** WormnestAndroid has joined #openttd
03:19:04 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:36:10 *** D-HUND is now known as debdog
03:47:52 *** ipravd1 has joined #openttd
04:09:16 *** WormnestAndroid has quit IRC (Remote host closed the connection)
04:09:20 *** WormnestAndroid has joined #openttd
04:29:54 *** ipravd1 has quit IRC (Quit: ipravd1)
05:30:43 *** Flygon has quit IRC (Read error: Connection reset by peer)
07:37:45 <mnhebi> Seems you got a Cyberman going through your codebase
07:38:09 <mnhebi> When will we get "You will be upgraded"
07:52:29 <peter1138[d]> I do have a branch that uses a std::vector for basesets.
08:01:18 <pickpacket> andythenorth: no. Not now. Give it a few hours
08:01:46 <LordAro> pickpacket: he does present a compelling argument though
08:01:51 <pickpacket> peter1138[d]: at nine?
08:01:59 <pickpacket> brunch works, I guess
08:02:04 <peter1138[d]> Time is but an illusion.
08:02:09 <pickpacket> LordAro: yes. That he does
08:09:32 <LordAro> peter1138[d]: lunchtime doubly so
08:15:02 <pickpacket> I'm probably breaking my GS sooo much right now
08:15:34 <pickpacket> version control ftw
08:16:18 <LordAro> `diskid/DISK-WD-WCC4N0DL3481 FAULTED 41 258 125 too many errors` oh that's why my NAS is making clicking noises
08:37:29 <peter1138[d]> I'm wondering if an NVMe mini NAS is the way to go to replace storage.
08:38:21 <peter1138[d]> Something like a Beelink ME Mini.
08:40:01 <peter1138[d]> Although I'm not sure on the longevity of SSD vs HDD.
08:40:13 <mnhebi> LordAro: Meanwhile I have over 10 year old HDD still going strong...
08:41:05 <mnhebi> Been filled to the last more times than I can count.
09:01:42 <LordAro> my general findings are that SSDs fail completely without warning, whereas HDDs /tend/ to gradually degrade
09:01:58 <LordAro> beyond that they're probably more or less equivalent
09:02:24 <LordAro> mnhebi: this one isn't much less than 10 years old, tbf
09:02:43 <LordAro> yeah, 2015/6, ish, iirc
09:08:36 <xarick> vehicle-details-tooltip still there
09:28:39 <pickpacket> nevermind the lack of a semicolon after the return statement. I just missed that when copying
09:28:51 <pickpacket> it's there in the actual script
09:29:57 <peter1138[d]> LordAro: Yeah, which makes HDDS more suitable for archival-type long term storage.
09:30:03 <pickpacket> but there shouldn't be a semicolon after that line in the table, of course...
09:31:26 <peter1138[d]> Since getting a trackball, I have rediscovered the "joys" of cleaning your balls.
09:39:27 <pickpacket> "I have rediscovered the 'joys' of cleaning your balls." -- peter1138[d], 2025-06-06
09:41:35 <LordAro> pickpacket: what are you expecting that to do?
09:42:24 *** keikoz has quit IRC (Ping timeout: 480 seconds)
09:42:32 <mnhebi> LordAro: I use hwinfo to check the health rating, my few years old Windows drive is still over 90% iirc
09:42:47 <pickpacket> LordAro: that's just a snippet. There's a lot more around it in the actual script
09:43:00 <LordAro> pickpacket: i know, but what are you expecting that snippet to do
09:43:11 <LordAro> why is there an assignment inside a {}
09:43:28 <LordAro> that somehow you're trying to return?
09:43:51 <andythenorth> it's a table constructor?
09:44:00 <LordAro> mnhebi: "health ratings" are almost completely meaningless
09:44:34 <LordAro> oh, i'm not sure i remember tables in squirrel
09:44:41 <LordAro> semicolon at the end is mildly suspect
09:45:02 <LordAro> these sort of constructs usually use ','
09:45:32 <andythenorth> LordAro: you're not missing much π
09:45:49 <andythenorth> also I might be wrong, it might not be intended to return a table, might just be syntax error
09:47:03 <pickpacket> andythenorth: it's intended to return a table
09:47:35 <andythenorth> is it just a failed table constructor?
09:47:49 <andythenorth> I can't remember if squirrel throws IDENTIFIER error for that
09:47:59 <andythenorth> tables are notoriously difficult to construct in squirrel
09:49:19 <pickpacket> andythenorth: removing the semicolon for the slot assignment worked
09:50:33 <andythenorth> the syntax is quite unstable as a user
09:50:51 <andythenorth> obvs the language has rules, but they're not easy to conform to
09:52:44 <pickpacket> *most* of the time I have no trouble with it
09:52:53 <pickpacket> it's easier than bash syntax
09:53:16 <xarick> am i allowed to mix apache 2.0 with openttd?
10:02:26 <xarick> oh, right... i blame glx :|!
10:15:12 <pickpacket> xarick: mix a web server with the game? What exactly would that do? π€
10:16:03 <LordAro> pickpacket: lol, that was my thought too
10:16:30 <LordAro> xarick: you must stop with the "i blame"
10:16:52 <LordAro> it is at best unhelpful, but it is just the completely wrong attitude
10:16:53 <_glx_> I blame the person failing at rebase π
10:21:47 <pickpacket> alright. I need to test how my script handles one company buying another, but they just never go bankrupt! I have a company that's been in the red for seven full months and nothing's happened...
10:25:34 <pickpacket> this is somewhat annoying π’
10:31:00 <pickpacket> more than a year now...
10:33:43 <xarick> How do I CopyList with btree
10:35:04 *** WormnestAndroid has quit IRC (Remote host closed the connection)
10:36:19 <xarick> this->buckets becomes this->values
10:36:35 <xarick> but I don't know if I need to copy more stuff
10:36:54 <_glx_> Analyse what's the code doing?
10:37:18 *** WormnestAndroid has joined #openttd
11:14:15 <xarick> bool values_inited; ///< Whether the 'values' field has been initialised
11:14:27 <xarick> I have no idea this needs to be copied
11:20:18 <peter1138[d]> Has it be initialised?
11:33:14 <xarick> this->initialized is always false for the clone list
11:33:55 <xarick> okay, I think this is sufficient
11:37:02 <_glx_> I secretly use SwapList as reference when doing CopyList
12:00:05 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
12:06:48 <xarick> the amazing test script
12:13:22 <xarick> hmm how would i test iterator matching
12:13:33 <xarick> between original and cloned list
12:17:09 <xarick> I don't think this test is doing what I think
12:38:43 <xarick> why is AddOrSetItem exactly equal to AddItem
12:39:51 <xarick> ah no, there's a tiny small difference
13:06:46 <pickpacket> I have autosave turned off. When I start a multiplayer session the save function in my GS is called when a client connects. Is that intended?
13:13:08 <andythenorth> The map needs transmitted to the client?
13:16:18 <pickpacket> ah! That makes sense
13:16:32 <peter1138[d]> It's intended, and the savegame sent to a client is a regular savegame.
13:17:03 <peter1138[d]> It could perhaps be special-cased to not call a GS save, as clients don't run the GS.
13:17:59 <peter1138[d]> Makes me wonder what the implications are for saving a multiplayer game and running it single player.
13:18:38 <xarick> oh, i guess that's the reason it was closed
13:19:31 <xarick> but this is the save that is transmited
13:19:47 <xarick> it's not file saveable to disk
13:22:55 <pickpacket> peter1138[d]: I guess storybook data needs to be transmitted too?
13:32:08 <peter1138[d]> That definitely does.
13:32:26 <peter1138[d]> But that's part of the savegame, not saved by GS.
13:33:27 <peter1138[d]> "Why was it closed?"
13:34:50 <peter1138[d]> Anyway, the temporary network save is a valid save that could be loaded manually. Could.
13:35:29 <peter1138[d]> For GS data, it's "more valid" than a save made from a multiplayer client.
13:37:41 <peter1138[d]> LordAro, what's with this weather? I should've got a turbo trainer...
13:38:43 <pickpacket> my script... it's working... something must be wrong
13:38:47 <_glx_> client won't start GS or AI in the end, so it doesn't hurt to have the data in the save
13:41:12 *** WormnestAndroid has quit IRC (Remote host closed the connection)
13:41:29 *** WormnestAndroid has joined #openttd
13:44:34 <peter1138[d]> Let me guess, I didn't make a PR of my unique_ptr changes there...
13:44:43 <peter1138[d]> So many side-quests.
13:55:53 <peter1138[d]> It might not compile, I had to rebase it.
14:05:49 <xarick> I got one more thing to do
14:06:05 <xarick> ScriptVehicleList to deal with free wagons
14:06:28 <xarick> but unsure where to check for train changes
14:12:54 <xarick> hmm i mean from a performance perspective
14:14:00 <xarick> group vehicle list can't cache free wagons, so my idea was to keep track of freewagons somewhere else
14:14:28 <xarick> cache freewagons separately
14:16:23 <xarick> ScriptVehicleList it's the holy grail
14:27:12 <xarick> testing coronas again. I'm now using the safe btree map set added to mix. In a year there's already differences
14:56:39 *** Wormnest has joined #openttd
15:05:38 <xarick> I have a feeling my AddItemUnchecked was faster
15:16:00 *** gelignite has joined #openttd
15:53:54 *** keikoz has quit IRC (Ping timeout: 480 seconds)
15:54:18 <xarick> AddItemUnchecked is slower, just tested, it needed 3 years to make a difference
15:58:48 <andythenorth> positive reddit outcomes though
15:59:46 <LordAro> andythenorth: "sub industry too similar to primary"
16:00:24 <LordAro> industry window could highlight the industry, like town area etc
16:00:58 <andythenorth> in case nobody was aware π
16:03:40 <LordAro> andythenorth: "that's nice"
16:04:04 <peter1138[d]> What does it do?
16:05:28 <andythenorth> something about badgers
16:07:06 <andythenorth> hmm should I post to reddit
16:13:50 <peter1138[d]> Heh, carefully didn't pay attention to the comments.
16:17:12 <andythenorth> 14312 needs a reviewer eh π
16:19:59 <talltyler> Have you tested it? Does it do what you want?
16:21:39 <talltyler> Seems logical to me but I havenβt reviewed enough GRF spec code to know if it works. And Iβm concerned that allowing authors to do badge electrification could introduce combinatorial complexity to the railtype quagmire π
16:23:17 <peter1138[d]> I don't know what "allowing authors to do badge electrification" means.
16:24:35 <talltyler> Me neither, that's the problem π
16:24:36 <peter1138[d]> I think all the ways authors can shoot themselves in the foot with railtypes are already possible. This just makes it a bit easier to shoot themselves in the foot, maybe?
16:25:28 <talltyler> I am not accusing anyone of anything, I'm just uncomfortable touching anything related to railtypes, since I do not understand how they work. π
16:25:38 <peter1138[d]> Me neither, it's valid to be concerned π
16:35:30 <_glx_> I think authors also don't understand how they work
16:36:40 <peter1138[d]> Hmm, wonder if michi_cc updated that page.
16:55:58 *** alpapilus has joined #openttd
16:55:58 <alpapilus> andythenorth: Can you add like some useless pavement between those platforms?
17:02:01 <andythenorth> alpapilus: more like this one?
17:05:11 *** keikoz has quit IRC (Ping timeout: 480 seconds)
17:11:42 <andythenorth> I do agree that caution in extending grf spec is wise
17:11:47 <andythenorth> but badges are in
17:12:17 <andythenorth> and making queryable seems to be a natural affordance
17:14:30 <xarick> are any of these warnings easy to fix? should I just ignore?
17:14:58 <LordAro> 3rdparty code is "not your problem" (within reason)
18:04:09 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
18:12:40 *** gelignite has joined #openttd
18:35:10 <michi_cc> peter1138[d]: Still slacking for a few days more π
18:52:34 <peter1138[d]> `NWidgetResizeBase` bugs me.
18:53:41 <peter1138[d]> It 'gatekeeps' `SetFill()`, `SetResize()` etc, when in fact all widgets have the members as they're part of `NWidgetCore`
18:54:09 <peter1138[d]> `NWidgetBase`, rather.
18:59:10 <peter1138[d]> Hmm, well, vertical/horizontal containers overwrite it anyway, so that's a bit...
19:04:57 *** theBrycJohnson has joined #openttd
19:05:14 <theBrycJohnson> this looks cool
19:05:17 <xarick> /* There are 14 different cases:
19:06:37 <theBrycJohnson> very fantastic.
19:11:05 <xarick> there are 14 different headaches
19:17:14 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:17:38 *** theBrycJohnson has quit IRC (Quit: Page closed)
19:18:39 *** WormnestAndroid has joined #openttd
19:24:08 <xarick> i can't move an engine from pos 2 to pos 0Β»
19:24:22 <xarick> with the gui, is that intended?
19:24:52 *** WormnestAndroid has quit IRC (Remote host closed the connection)
19:24:59 *** WormnestAndroid has joined #openttd
19:25:50 <xarick> I can't also move a train from another train into the front of freewagon
19:27:35 <xarick> would it make it 28 different headaches?
19:33:12 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
19:33:35 *** WormnestAndroid has joined #openttd
19:41:41 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
19:45:14 *** WormnestAndroid has joined #openttd
19:51:07 <peter1138[d]> Guess what I already have a branch for...
19:53:34 *** m3henry has joined #openttd
19:53:52 <peter1138[d]> Thanks for reminding me I had these branches sitting around.
19:54:05 <peter1138[d]> Apologies for getting the in the way.
19:54:17 <m3henry> Okay, I'll pause doing this until you've got them all up
19:54:49 <m3henry> Felt like hitting some low fruit for a change.
19:55:47 <peter1138[d]> I feel like my script info one may have been a bit experimental, and unfinished.
19:56:29 <peter1138[d]> So mainly I'm pushing this so that it can be seen. I might have missed things, or you might have missed things, so more eyes are good.
19:57:51 <peter1138[d]> It's definitely testing code. `info_vector` is a terrible variable name.
19:59:22 <peter1138[d]> I moved ownership to a vector because that's a better container for ownership than a std::map.
20:00:22 <peter1138[d]> Also in some places we conditionally use `info_list` or `info_single_list`, which means they have to be the same type. And they can't both own the data.
20:00:28 <peter1138[d]> I should put this in the PR π
20:08:00 <peter1138[d]> I *think* that's the only two I had left over.
20:17:16 *** gelignite has quit IRC (Read error: Connection reset by peer)
20:17:24 *** gelignite has joined #openttd
20:23:51 <m3henry> > I moved ownership to a vector because that's a better container for ownership than a std::map.
20:23:53 <m3henry> I'd disagree, but in this case it reduces the amount of codechange required as a result of the chanage.
20:24:38 <peter1138[d]> Well, it crashes anyway π
20:28:56 <peter1138[d]> `this->info_list = this->show_all ? AI::GetInfoList() : AI::GetUniqueInfoList();`
20:29:05 <peter1138[d]> This line in the UI means they have to be the same data type.
20:29:12 <peter1138[d]> They can't both own the data.
20:29:31 <peter1138[d]> I suppose it could be shared_ptr instead.
20:30:18 <peter1138[d]> Heh, dumb mistake π
20:30:58 <andythenorth> ha forced perspective on window resize π
20:40:55 <peter1138[d]> I've also got some more for the other pointers in ScriptInstance.
20:48:52 <peter1138[d]> Ah, I remember now. There was an order-of-operations problem.
21:00:37 <peter1138[d]> Hmm, maybe that member just shouldn't be a unique_ptr.
21:07:59 *** Tirili has quit IRC (Ping timeout: 480 seconds)
21:26:00 <peter1138[d]> What's the correct way to handle pointer dependencies... Hmm.
21:39:09 <peter1138[d]> The head to sell.
21:39:33 <xarick> how is a Train deleted
21:39:51 <xarick> visual studio doesn't follow
21:40:14 <peter1138[d]> By calling delete on it.
21:44:46 <xarick> void Vehicle::PreDestructor()?
21:47:32 <m3henry> I usually find predestroy, preinit, postinit type methods to be massive red flags.
21:50:55 <xarick> free wagons really aren't easy to track down
21:51:27 <xarick> I'm probably doing something wrong
21:52:20 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:57:53 <xarick> Train *v = new Train();
21:57:53 <xarick> Does this comes up bundled with a v->index?
21:58:06 <xarick> or is index set at some other place
22:01:17 *** tokai|noir has joined #openttd
22:01:17 *** ChanServ sets mode: +v tokai|noir
22:01:49 *** m3henry has quit IRC (Quit: m3henry)
22:01:59 <peter1138[d]> The pool allocation handles the index.
22:08:04 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:12:52 <xarick> unsure I handled all cases of free wagons being generated, eliminated, but I got something going on
22:13:46 <xarick> oh, needs saveload support
22:14:07 <xarick> actually, just needs to sync after load
22:15:34 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:32:45 <xarick> where should the [[fallthrough] be placed
22:39:58 <xarick> company merging needs handling
22:40:13 <xarick> pff... this is so annoying
22:40:32 <xarick> feels like I'm reinventing the wheel
22:40:42 <peter1138[d]> Yes. There already exists a list of vehicles.
22:40:45 <peter1138[d]> It's the pool :p
22:58:41 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:59:35 *** WormnestAndroid has joined #openttd
23:08:26 <_glx_> peter1138[d]: but it's slow to iterate the pull repeatedly π
23:09:56 <_glx_> now lists can be cloned, so it should be possible to get all vehicles, then clone+filter as needed
23:10:12 <_glx_> might be faster than recreating lists
23:10:49 <peter1138[d]> Well, not if they're cloning a full list of vehicles π
23:11:26 <_glx_> still faster than repeated AddItem on list creation
23:12:55 <_glx_> but clearly a weird algorithm if you need to constantly create and destroy vehicle lists
23:17:08 <jfkuayue> Given a GRF with its version the total number of git commits. Why didnβt the GRF generated by GitHub Actions show the right version, but always βversion 1β?
23:17:50 <_glx_> ah no, GA don't get the full history
23:17:54 <peter1138[d]> Shallow clone of only the most current commit. Commits = 1.
23:18:06 <jfkuayue> I donβt know, the GitHub action was done by wensimehrp
23:19:01 <jfkuayue> He has the full responsibility for the corrupted version number.
23:19:22 <wensimehrp> cirno knows nothing
23:19:34 <_glx_> not the ideal way to decide version number anyway
23:19:48 <wensimehrp> it's for the in-game version thingy
23:19:52 <_glx_> at least when using git
23:20:11 <wensimehrp> I'm thinking of adding a hook
23:22:23 <_glx_> use `fetch-depth: 0` in actions/checkout
23:22:57 <peter1138[d]> It will take longer though, especially if you have lots of changes and/or larger files.
23:32:16 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
23:33:03 *** WormnestAndroid has joined #openttd
continue to next day β΅