IRC logs for #openttd on OFTC at 2025-02-06
            
01:23:01 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:59:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13474: Codechange: Use EnumBitSet for widget-related enums https://github.com/OpenTTD/OpenTTD/pull/13474
03:10:07 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #13459: [Bug]: Assertion after removing NewGRF with items saved in picker https://github.com/OpenTTD/OpenTTD/issues/13459
03:24:09 <ahyangyi> andythenorth: `def vehicle(self): return self.vehicle or self`
03:31:06 *** Wormnest has joined #openttd
03:31:56 *** Wormnest has quit IRC ()
03:56:34 *** D-HUND has joined #openttd
04:00:08 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:01:30 *** D-HUND is now known as debdog
04:45:37 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/6089ed80594a651bffc52c9be286e7ef2e34dd59
04:45:38 <DorpsGek> - Update: Translations from eints (by translators)
05:05:35 *** keikoz has joined #openttd
05:10:07 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13474: Codechange: Use EnumBitSet for widget-related enums https://github.com/OpenTTD/OpenTTD/pull/13474#pullrequestreview-2597670195
05:32:39 <andythenorth> gwyd4016: Doesn’t align with openttd 🙂
05:33:15 <andythenorth> Buy meni doesn’t have models, it has vehicles 🙂
06:19:05 <andythenorth> hmm
06:19:13 <andythenorth> maybe it has `Engines`
06:21:39 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:28:22 <gwyd4016> Perhaps it has trainsets?
06:28:30 <gwyd4016> I mean items do have model life
06:50:50 <andythenorth> the actual game has `Engines`, if I've read the buy menu file correctly
06:51:16 <andythenorth> I thought it had `GroundVehicleSpec` or something, but I misremembered that
06:53:19 <andythenorth> wonder what var 40 and 41 do with articulated vehicles
06:53:20 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles#Position_and_length_.2840.2C_41.29
06:53:36 <andythenorth> presumably they count each articulated part
06:59:41 * andythenorth ottd src
07:10:32 <andythenorth> Vehicle::Iterate eh
07:28:45 <andythenorth> trying to understand what nml does
07:28:45 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/NML:Vehicles#Variables_without_parameter
07:29:05 <andythenorth> `position_in_consist` `The position of the current vehicle-part from the start of the vehicle. The engine will get value 0, the first wagon (or second engine) gets value 1, etc.`
07:29:16 <andythenorth> so that does account for articulated parts?
07:29:19 <andythenorth> in the count?
07:31:02 <andythenorth> trying to understand `PositionHelper`
07:34:34 <andythenorth> so other train vars have `t -> Train`
07:34:37 <andythenorth> wonder what RVs do
07:34:43 *** keikoz has joined #openttd
07:36:58 <andythenorth> `GVSF_ARTICULATED_PART` eh
07:37:54 <andythenorth> `IsEngineCountable` looked useful, but isn't what I needed
07:38:45 <andythenorth> do does `Vehicle::Iterate()` just yield 'next in the chain'?
07:40:05 <andythenorth> hmm so everything is a Vehicle
07:40:24 <andythenorth> Vehicles can have a pointer or something to a following vehicle?
07:41:00 <andythenorth> that following vehicle is bool flagged with GVSF_ARTICULATED_PART
07:41:30 <andythenorth> is first vehicle flagged with GVSF_FRONT?
09:49:54 <xarick> hi
10:01:57 <andythenorth> hmm
10:05:00 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
10:05:46 *** mindlesstux has joined #openttd
10:15:35 <andythenorth> oh
10:15:53 <andythenorth> I could implement an equivalent of Next() in my python compile
10:16:47 <andythenorth> so instead of trying to store a list of `[<vehicle>, <vehicle>, <vehicle>]` in a non-existent structure, I just do `vehicle.Next()` until it returns None
10:17:15 <andythenorth> and to build the buy menu I walk all `<vehicle>` instances and drop any that are trailing parts
10:17:41 <andythenorth> I'd need something to get `vehicle.Front()`
10:18:00 <andythenorth> I guess I walk all the `<vehicles>` and just recurse the `Next()` chains backwards
10:20:50 <andythenorth> no I can store a reference to the front vehicle
10:20:59 <andythenorth> and then copy all properties into each vehicle
10:21:26 <andythenorth> ach, no the purchase menu doesn't do articulated
10:22:03 <andythenorth> ok, I build `purchase_foo` versions of every attribute and property
10:24:09 <andythenorth> hmm
10:24:45 <andythenorth> object context is hard to infer at compile time, when it's determined per-instance by run-time properties
10:24:59 <andythenorth> "OO problems" 😛
10:30:23 <LordAro> https://www.gnu.org/software/make/manual/html_node/load-Directive.html ooh.
10:32:29 <andythenorth> is there a pattern name for OO, where insted of having different objects, or subclasses, for behaviour
10:32:54 <andythenorth> instead you have one class, and most behaviour is conditional inside it, depending on run-time context?
10:33:37 <peter1138> Yes. Bad.
10:33:41 <andythenorth> so for e.g. book.page_count() you'd have "if hardback then 200 elif paperback then 300"
10:34:10 <andythenorth> and then if you want to ship on kindle, you modify all the methods and release
10:34:46 <peter1138> class hardback => book; class softback => book, class ebook => book;
10:36:10 <andythenorth> what about a combined edition?
10:36:15 <andythenorth> so 3 books in 1 book?
10:37:19 <Timberwolf> andythenorth: "god object" is the one I've usually heard
10:38:26 <andythenorth> OO problems
10:49:32 <peter1138> Fair.
10:49:48 <peter1138> So then you have a "Book", then you have an "Issue" of a book.
10:50:09 <peter1138> And the Issue contains the physical properties. The Book contains the words...
10:51:20 <andythenorth> I could stop having this problem if I just closed my eyes to the grf spec 😛
10:52:02 <andythenorth> trying to refactor Horse and Hog to clean up historical weird evolution
10:52:15 <andythenorth> and make them more conformant to OpenTTD, so they're not inventing their own terms
10:52:29 <andythenorth> or using game/grf spec terms incorrectly
10:54:05 *** reldred has joined #openttd
10:54:05 <reldred> you're not trying to hammer a square peg into a round hole are you
10:54:32 <andythenorth> very close to the metaphor I'd use
10:55:06 <peter1138> Bikeshedding, eh?
10:55:08 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1337013704868237352/61xK01UQjSL.png?ex=67a5e68b&is=67a4950b&hm=2d597cd65cf1bc4d32fd80c6f3110aaed400a8d5fc3432cdf5743f4dbca4cd36&
10:55:08 <andythenorth> I'm trying to put the star through the circle hole
10:55:16 <andythenorth> I'd sit and shape sort for hours
10:55:21 <andythenorth> days
10:55:23 <andythenorth> weeks
10:55:39 <peter1138> https://www.youtube.com/watch?v=cUbIkNUFs-4
10:55:58 <andythenorth> yeah that video I've seen, it's crack for my brain
10:56:11 <andythenorth> and that it's totally performed, not real
10:56:13 <andythenorth> is also crack
10:56:33 <peter1138> It's performed well.
10:57:51 <andythenorth> my brain is basically both the people in the video
10:57:55 <andythenorth> until one side wins
10:58:19 <andythenorth> usually the winning side puts everything in the square hole
10:58:32 <reldred> You’re the square peg, the round hole, and the guy with the hammer all at the same time
10:58:46 <andythenorth> nah, that's people in my family
10:58:47 <peter1138> andythenorth wants to be pegged?
10:58:56 <reldred> Lewd
10:59:03 <andythenorth> this is a channel about croquet now?
11:01:05 <peter1138> pogged
11:01:20 <peter1138> Isn't pog sone aussie term?
11:03:01 <reldred> Nah
11:03:34 <reldred> It’s a military term, usually pogue but I’ve seen it spelt pog.
11:04:09 <andythenorth> hmm did OpenTTD put everything in the square hole?
11:04:12 <andythenorth> I think it did 😛
11:05:39 <peter1138> Ah, I had a phase of being awake when Aussie Twitch streamers were live, and many of them seems to use "pog" or "poggers" or somesuch. Didn't see it much anywhere else.
11:05:41 <andythenorth> oh, probably fair to actually blame TTD?
11:05:48 <andythenorth> poggers is thing
11:05:57 <andythenorth> cooked and cold are thing my kids seem to have imported
11:06:03 <andythenorth> appear to be Aussie
11:06:10 <peter1138> andythenorth, I recommend blaming everything on Patchman, as they're not around to defend it.
11:06:39 <andythenorth> where did articulated vehicles come from?
11:06:43 <andythenorth> TTDP era?
11:07:35 <peter1138> Cooked is a very unlewd (at least, I think it is...) way of saying screwed or shafted or bu*****d... It's amazing.
11:07:49 <peter1138> TTDPatch invented the, yes.
11:08:20 <reldred> Cooked also implies brain damage, drug use.
11:08:35 <reldred> Or just being left in the sun too long
11:08:43 <reldred> You know these things are all variable.
11:08:52 <andythenorth> cold currently means cool
11:09:07 <andythenorth> varies
11:09:26 <reldred> peter1138: Wasn’t just Australian streamers
11:09:43 <andythenorth> it was pepe no?
11:09:49 <reldred> It was mostly a twitch thing
11:10:05 <andythenorth> I thought it was just a red pill thing
11:10:06 <reldred> But it did spread
11:10:13 <andythenorth> I default to 'probably just red pill'
11:12:10 <andythenorth> ok so TTDP had to do 'fake OO using boolean flags' I assume?
11:15:01 <peter1138> Nothing about NewGRF is OO, nor is it intended to be.
11:15:47 <andythenorth> square hole time
11:15:48 <peter1138> It's possible that NML tries to be OO, but that's nothing to do with the spec.
11:17:32 <andythenorth> the interface for authors isn't very OO
11:18:25 <peter1138> I didn't say it is, I don't know it well enough to say.
11:20:22 <andythenorth> ah, I'm not really stuck so much on the nml generator
11:20:28 <andythenorth> it's the docs
11:21:44 <peter1138> Bah, would be nice if I could automaticaly get the last enum value, although then things like Invalid = 0xFF would break.
11:21:49 <andythenorth> for vehicles, we're just running nfo act 0 / 3 / 2/ 1 in a specific vehicle, and we behave accordingly
11:21:50 <andythenorth> simple
11:22:20 <andythenorth> but in the docs I have to loop over all the vehicles that can be purchased by the player
11:22:33 <andythenorth> and there's no obvious name for what they are
11:22:37 <andythenorth> they're not 'vehicles'
11:22:53 <peter1138> Maybe add something like `End` to every enum and use that. But I'd rather not have End be a valid value of the enum. Hmm.
11:23:09 <johnfranklin> What is `OO`?
11:23:18 <peter1138> Object-oriented.
11:23:20 <andythenorth> object oriented
11:23:26 <andythenorth> what peter1138[d] said
11:23:42 <peter1138> Or "orientated" if you grew up not learning things properly in the 80s.
11:23:59 <andythenorth> hmm...the docs are a different domain, I can just ignore OpenTTD's implementation?
11:24:06 <andythenorth> that tends to cause concept drift though
11:24:33 <peter1138> But then it is orientation, not oriention.
11:26:11 <andythenorth> possibly the docs can just loop over 'models'
11:26:28 <andythenorth> implicitly 'vehicle_models', but that's a bit redundant maybe
11:28:59 <andythenorth> I keep thinking 'buyables' but that's horrible
11:29:14 <andythenorth> although I just found my printer has a 'printables' feature 😦
11:32:37 <DorpsGek> [OpenTTD/OpenTTD] ahyangyi commented on issue #13464: [Bug]: OpenTTD detecting incorrect font since openttd-20250120-master-g7da21379f0-windows-win64 https://github.com/OpenTTD/OpenTTD/issues/13464
11:35:40 <peter1138> Hmm, nearly half-way to replacing DECLARE_ENUM_AS_BIT_SET.
11:37:37 <andythenorth> yeah ok so vehicle grfs primarily compose vehicles
11:37:48 <andythenorth> and trains also being a vehicle in the game
11:38:00 <andythenorth> and articulated parts also being a vehicle in the game
11:38:11 <andythenorth> I will have to put through the square hole
11:39:38 <andythenorth> and what you get in the buy menu are vehicle models
11:54:24 <_glx_> In buy menu you only get heads of articulated vehicles because no callback
11:57:01 <andythenorth> It’s one of the practical reasons my compile nested vehicles as ‘consist’ and ‘units’
11:57:24 <andythenorth> Then purchase is handled by consist
12:24:34 <andythenorth> It’s kind of a quirky implementation detail eh 🙂
12:57:18 <andythenorth> Maybe nml should have abstracted articulated vehicles better 🙂
13:04:18 <andythenorth> Can’t think of anyone for grf to do it
13:32:55 *** bohaska has joined #openttd
13:32:55 <bohaska> how hard would it be to implement a sandbox feature where you can directly set the growth rate of a town?
13:33:32 *** HerzogDeXtEr has joined #openttd
13:41:58 <LordAro> probably not that hard
13:48:23 <andythenorth> GS
13:56:31 *** emperorjake has joined #openttd
13:56:31 <emperorjake> JGRPP already allows enabling/disabling growth for individual towns
14:04:31 <bohaska> yea, but it doesn't let you set it directly
14:05:01 <bohaska> like you find people doing model railroad who wait for the town to grow until doing what they need to do
14:06:56 <xarick> May I suggest some default settings changes ? 🙂
14:08:12 <xarick> 1. Scoring year: Never
14:08:33 <xarick> 2. Limit airport placement based on noise level: On
14:09:49 <xarick> 3. Company stations can serve industries with attached neutral stations: Off
14:10:49 <xarick> yeah, I guess that's it, the others are too personal
14:20:06 <xarick> this doesn't exist... @see \ref ScriptCalendarTime
14:20:12 <xarick> or I can't find it
14:41:27 <_glx_> It does, it's an anchor in scriptdate doc
14:41:51 *** belajalilija has joined #openttd
14:41:52 <belajalilija> Since we’re making demands
14:42:22 <belajalilija> Could i request an option to bring the town growth button over from scenario editor into the main game
14:43:51 <_glx_> <https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_date.hpp#L27>
14:48:47 <andythenorth> GS
14:49:12 <andythenorth> Shame GS never took off
15:00:25 <xarick> thx
15:01:46 <xarick> compiling open ttd takes so much time I get distracted and start watching youtube videos
15:02:00 <xarick> then i forget what I was doing when i go back to it
15:03:07 <peter1138> Oh, Order is full of bitstuffed members :(
15:10:42 <xarick> GetWagonAge doesn't work as intended
15:10:57 <Rubidium> peter1138: yes, it's a hot mess
15:11:24 <xarick> if I'm reading this correctly, v->age is only increased for primary vehicles
15:12:17 <xarick> need to actually test to make sure
15:13:42 <peter1138> * Get the current age of a second (or third, etc.) engine in a train vehicle.
15:13:47 <peter1138> It's probably misnamed.
15:14:26 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/vehicle.cpp#L1445>
15:14:53 <peter1138> Yes, wagons don't age, only engines.
15:15:19 <xarick> they used to
15:15:20 <peter1138> Wait, I'm wrong :D
15:15:25 <peter1138> They do all age.
15:15:33 <peter1138> The conditional is about retiring engines.
15:15:40 <talltyler> We’re not making demands. Those default setting changes are not supported by survey data. 🙂
15:15:54 <peter1138> talltyler, that's because nobody changes the defaults ;-)
15:16:23 <peter1138> xarick, you are not reading this correctly, basically.
15:16:57 <peter1138> Right, `order->SetType(x)` gets around the first annoyance...
15:17:13 <talltyler> Well, yes.
15:19:50 <peter1138> OrderNonStopFlags is not a "flags"...
15:22:33 <peter1138> Eh, it kinda is in some places. Hmm.
15:24:26 <peter1138> Sometimes we use `!=`, sometimes we use `&`. Fun.
15:24:35 <xarick> regression tests a train with 0 attached wagons... 😐
15:24:41 <xarick> lame
15:25:36 <xarick> oh nevermind, i found some more tests around wagons
15:29:15 *** Extrems has quit IRC (Quit: ZNC 1.7.5 - https://znc.in)
15:29:19 *** Extrems has joined #openttd
15:30:20 <talltyler> I’ve seen quite a few places where we misuse flags but it still works, by accident…
15:30:44 <talltyler> Depot flags have some issues with this, I think
15:34:30 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13475: Codechange: use EnumBitSet/enum classes for network-crypto related enums https://github.com/OpenTTD/OpenTTD/pull/13475
15:35:10 * Rubidium wonders what flags depots have
15:36:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337084509593534565/image.png?ex=67a6287c&is=67a4d6fc&hm=80b659e11b1cdaec23744f78b5b8e662ec0732d24973beddf194475ffe4aa232&
15:36:29 <xarick> oh, they age, i thought they wouldn't...
15:44:30 <LordAro> Rubidium: i hope you an peter1138 have a spreadsheet somewhere so you're not stepping on each others toes :p
15:44:37 <LordAro> +d
15:46:53 *** Wormnest has joined #openttd
15:49:49 <talltyler> Right, not flags for depots but for depot orders: `OrderDepotActionFlags` and `OrderDepotAction` (why are there two containing the same values? I never figured it out when working on depot unbunching 😛 )
15:51:33 <xarick> speaking of unbunch
15:52:12 <xarick> https://github.com/OpenTTD/OpenTTD/pull/12249
15:52:33 <xarick> i dealt with flags
15:52:43 <xarick> it's confusing indeed
16:01:15 <xarick> wagons age confirmed, because i fail to read code
16:04:47 <xarick> GetWagonEconomyAge mouthful name
16:07:56 <xarick> nobody really cares about wagon ages
16:08:07 <xarick> funny to see it supported in AIs
16:10:40 <xarick> unless they have proper breakdown decay support
16:12:04 <xarick> nerf trains
16:14:05 <peter1138> I have a few commits to PR, but didn't reach network-crypto yet.
16:14:48 <xarick> btw some AIs check station construction date to help determine the route is old enough to check profitability
16:15:13 <xarick> there is no economy_date_of_construction
16:17:35 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/base_station_base.h#L74>
16:17:55 <xarick> nobody thinks of the scripts!
16:17:57 <peter1138> `build_date` changes if you modify the station anyway.
16:18:48 <xarick> but the AIs probably don't change the station during the initial period
16:18:56 *** Flygon has quit IRC (Read error: Connection reset by peer)
16:21:50 <peter1138> Hmm
16:21:55 <peter1138> OrderUnloadFlag is fun.
16:22:04 <peter1138> A bit for Unload, and another bit for NoUnload.
16:22:18 <xarick> peter, plz consider my unbunch PR too
16:22:32 <xarick> since you're touching that part
16:26:29 *** nielsm has joined #openttd
16:26:53 <peter1138> No, it's inappropriate to make such changes at the same time as refactoring.
16:28:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337097561617596470/image.png?ex=67a634a4&is=67a4e324&hm=8ac290b2b147b7668255dafca944a48df6fd117e61f3b2556ce150967f710f7a&
16:28:21 <xarick> I was there first
16:28:41 <xarick> kek
16:32:11 <peter1138> CommandCost CmdModifyOrder(DoCommandFlag flags, VehicleID veh, VehicleOrderID sel_ord, ModifyOrderFlags mof, uint16_t data)
16:32:23 <peter1138> Well, that's... not great.
16:43:15 <peter1138> Rubidium, hmm, I have a patch to automatically mask the underlying storage to valid values.
16:44:17 <peter1138> I wonder if I make it automatically use `x::End` to do that, instead of requiring a separate limit.
16:45:24 <peter1138> +can
16:45:49 <peter1138> Although it might not be desirable to always mask.
16:46:37 <peter1138> (For now the mask defaults to all bits, so unless it's explicitly reduced it gets optimised away.)
16:51:11 <peter1138> `using IndustryControlFlags = EnumBitSet<IndustryControlFlag, uint8_t, IndustryControlFlag::End>;
16:51:14 <peter1138> `
16:59:45 <peter1138> Hmm, looking for a GS that uses Industry::SetControlFlags
17:05:15 <andythenorth> I have one for FIRS but I’m out
17:06:03 <andythenorth> It’s buildabke in the FIRS v5-release-track branch
17:15:10 <Rubidium> peter1138: you can https://godbolt.org/z/e3T85xMKz (comment line 34; that's just to check what it does when you don't have ::End and don't set a limit)
17:15:48 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476
17:20:07 <ahyangyi> ahyangyi: After using the one weird trick the compliation time goes back to about 100 seconds, nice.
17:27:40 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13473: Change: [Script] Make ScriptDate a real type https://github.com/OpenTTD/OpenTTD/pull/13473
17:31:06 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13473: Change: [Script] Make ScriptDate a real type https://github.com/OpenTTD/OpenTTD/pull/13473
17:34:56 <peter1138> Rubidium, yeah, this works. https://godbolt.org/z/c8Eq8E51W
17:35:12 <peter1138> Do I need to worry about constexpr performance...
17:36:53 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476#issuecomment-2640557081
17:37:13 <peter1138> (But also, what if "End" is a valid value)
17:38:32 <ahyangyi> peter1138: Make compilation faster? 😛
17:38:54 <peter1138> Easy, get a faster computer.
17:42:43 <peter1138> A quick scan of our enums suggests that End should be fine.
17:43:31 <peter1138> But whether it is wise to have such automatically functionality.
17:47:05 <johnfranklin> “The reason why you need to learn LaTeX is that your hundred-page long dissertation cannot be easily dealt with Microsoft Word” “Get a faster computer”
17:49:04 <wensimehrp> heh lateh is slow already
17:54:51 <wensimehrp> Remove all constexprs and you'll get faster compilation.
17:54:51 <wensimehrp> At a consequence of longer loading time and slower game speed.
17:54:51 <wensimehrp> Such
18:06:22 <andythenorth> peter1138: do you still need one?
18:28:02 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476#issuecomment-2640685334
18:30:42 <xarick> Do I sound like I'm contradicting myself?
18:37:41 <xarick> how do auto named saves look like when time is frozen
18:43:52 <andythenorth> how does the OO work for vehicles in src?
18:44:25 <andythenorth> is there some kind of VehicleSpec that's instantiated?
18:44:36 <andythenorth> oh, I could just look, silly me 😛
18:48:47 *** tokai|noir has joined #openttd
18:48:47 *** ChanServ sets mode: +v tokai|noir
18:55:39 *** tokai has quit IRC (Ping timeout: 480 seconds)
18:56:30 <peter1138> There's an Engine, which contains the common information, and inside that there's a union which contains the vehicle type (train, roadveh, etc) specific details. So it's not very OO.
19:00:15 <_glx_> it's as OO as C could be 🙂
19:03:47 <peter1138[d]> And there's no need for it to be OO.
19:06:58 <LordAro> is this naming thing still going?
19:11:28 <andythenorth> it's a curiosity rabbithole now
19:11:42 <andythenorth> not An Important Code Question
19:12:17 <LordAro> "now" implies that it was ever anything else :p
19:12:53 <andythenorth> this kind of union? https://en.cppreference.com/w/cpp/language/union
19:16:30 <andythenorth> engine_base.h is correct place?
19:29:47 <michi_cc> Isn't the new meta composition over inheritance anyway? 😎
19:36:37 <andythenorth> composition is the winning tactic in CSS
19:36:41 <andythenorth> but CSS is not programming 😛
19:41:11 <andythenorth> I just read what composition is in a python context (rather than Java)
19:42:02 <andythenorth> slightly confused that it even has a name as an approach 😛
19:42:09 <andythenorth> isn't it just 'programming'? 😛
19:43:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13474: Codechange: Use EnumBitSet for widget-related enums https://github.com/OpenTTD/OpenTTD/pull/13474
19:46:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13475: Codechange: use EnumBitSet/enum classes for network-crypto related enums https://github.com/OpenTTD/OpenTTD/pull/13475#pullrequestreview-2599727746
19:47:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13463: Codechange: change DestinationID into class with conversion helpers https://github.com/OpenTTD/OpenTTD/pull/13463#pullrequestreview-2599729856
19:47:38 *** XeryusTC has quit IRC (Ping timeout: 480 seconds)
19:48:18 *** Hazzard has quit IRC (Ping timeout: 480 seconds)
19:48:18 *** tneo has quit IRC (Ping timeout: 480 seconds)
19:48:21 *** planetmaker has quit IRC (Ping timeout: 480 seconds)
19:48:49 *** Hirundo has quit IRC (Ping timeout: 480 seconds)
19:49:19 *** Osai has quit IRC (Ping timeout: 480 seconds)
19:49:21 *** Ammler has quit IRC (Ping timeout: 480 seconds)
19:50:09 *** Webster has quit IRC (Ping timeout: 480 seconds)
19:50:21 *** V453000 has quit IRC (Ping timeout: 480 seconds)
19:51:18 *** fonsinchen has quit IRC (Ping timeout: 480 seconds)
19:51:19 *** Terkhen has quit IRC (Ping timeout: 480 seconds)
19:51:19 *** SmatZ has quit IRC (Ping timeout: 480 seconds)
19:51:21 *** Guest6616 has quit IRC (Ping timeout: 480 seconds)
19:51:24 *** avdg has quit IRC (Ping timeout: 480 seconds)
19:51:26 *** Yexo has quit IRC (Ping timeout: 480 seconds)
19:51:27 <andythenorth> going to use ModelDef and UnitDef in Horse
19:51:36 <andythenorth> hoping to get LineDef in somehow 😛
19:51:37 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
19:51:52 *** Smedles has joined #openttd
19:53:33 <andythenorth> maybe I just name all the internals after Doom WAD format
19:53:39 <andythenorth> spuriously
19:54:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13472: Codechange: put SourceType and SourceID into Source struct https://github.com/OpenTTD/OpenTTD/pull/13472#issuecomment-2640856783
19:55:37 <peter1138> Flats
19:57:04 <andythenorth> THINGS
19:57:07 <andythenorth> mobjs
20:03:16 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13475: Codechange: use EnumBitSet/enum classes for network-crypto related enums https://github.com/OpenTTD/OpenTTD/pull/13475
20:03:28 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13463: Codechange: change DestinationID into class with conversion helpers https://github.com/OpenTTD/OpenTTD/pull/13463
20:07:28 *** Compu has joined #openttd
20:08:12 *** Compu has quit IRC ()
20:12:03 <dihedral> openttdcoop went dark ... :-/
20:15:24 <_glx_> oh indeed, even the parts that used to be accessible
20:15:32 <peter1138> Happens.
20:15:49 <peter1138> andythenorth, gs which calls the industry control would be nice.
20:15:49 <dihedral> heart warming words, peter1138
20:15:59 <dihedral> :-P
20:15:59 <peter1138> Or I could try modifying the regression GS if I knew how...
20:16:08 <peter1138> I mean, it's not the first time is it.
20:16:18 <andythenorth> the FIRS one depends on FIRS 5 unreleased
20:16:23 <andythenorth> it has a grf check
20:16:36 <peter1138> Yes, it's unreleased so I don't have it.
20:16:49 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1337155060165120082/Archive.zip?ex=67a66a31&is=67a518b1&hm=5a7d7b6ad91e3fa6d6e939fc775bbc5c6920aabb7c9f81ae0ced1eb9801f78f9&
20:16:56 <andythenorth> needs Steeltown
20:17:01 <andythenorth> or you could just write a GS 🙂
20:18:07 <peter1138> __MACOSX :D
20:18:10 <peter1138> I could but.
20:18:15 <andythenorth> silly old macos
20:18:20 <andythenorth> anyway this runs at GS init
20:18:27 <andythenorth> GSIndustry.SetControlFlags(industry, VulcanIndustryControl.DEFAULT_CONTROL_FLAGS);
20:18:39 <peter1138> Yeah, That's probably ... Vulcan? Hmm
20:18:43 <andythenorth> ` foreach (industry, _ in industry_list) {
20:18:43 <andythenorth> // set all flags as of June 2023, unset them later per-industry for specific behaviour
20:18:43 <andythenorth> GSIndustry.SetControlFlags(industry, VulcanIndustryControl.DEFAULT_CONTROL_FLAGS);
20:18:43 <andythenorth> }
20:18:43 <andythenorth> `
20:19:06 <andythenorth> if you load it with the FIRS grf it should do it and you should see the log
20:20:03 <peter1138> I rebased, so waiting on game build anway.
20:20:18 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1337155936770588764/image.png?ex=67a66b02&is=67a51982&hm=ff197c7f7581d938d9be641c71d5c541c5c87028a2385345111329f5a7d1d0be&
20:20:25 <andythenorth> you might need to turn logging down
20:20:35 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1337156007402672169/image.png?ex=67a66b13&is=67a51993&hm=baef3dcb5e6763e9653c7f0e911368254c605a38435f10065819eca966d14b8a&
20:21:38 <Rubidium> :O peter has a regression GS. Nice!
20:23:00 <xarick> where
20:24:04 <xarick> that last merge is scary
20:24:16 <xarick> airports being either hangar or stations
20:24:25 <xarick> and having to pick one choice
20:28:06 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13402: Codechange: make pool item indices strongly typed https://github.com/OpenTTD/OpenTTD/pull/13402
20:31:50 <peter1138> Trying to validate if the mask is being applied.
20:32:24 <peter1138> It's definitely appled before the command is despatched, but I need it applied in the command as well.
20:32:59 <peter1138> Because it's not over the network there's no buffer serialisation happening to verify that too.
20:33:38 <peter1138> I wonder if a copy constructor should mask, but then there might be a lot of copying considering we don't pass by reference. Hmm.
20:34:56 <Rubidium> in theory it's already correct
20:35:19 <peter1138> Yes, unless you force it by passing a non-enum value.
20:36:22 <Rubidium> well... I wouldn't have gone on this side quest
20:37:01 <peter1138> Hah
20:38:50 <peter1138> Basically this the first place I've needed to validate the EnumBitSet contains valid values.
20:39:04 <peter1138> It comes from script land so it might not.
20:39:34 <peter1138> Not sure if the command can be issued remotely.
20:40:20 <Rubidium> then maybe an 'IsValid' on the enum bitset, and check that in the squirrel API and in the command?
20:40:24 <peter1138> But even so, EnumBitSet didn't need the functionality to test if only valid bits are set, yet.
20:40:25 <Rubidium> (or just in the command)
20:40:35 <peter1138> Rubidium, that is precisely what I am doing :-)
20:41:22 <Rubidium> well, you're talking about copy constructors. I'm talking about if (!enumMask.IsValid()) return CommandError();
20:41:50 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13416: Codechange: make some types used as ID in pools enums https://github.com/OpenTTD/OpenTTD/pull/13416
20:42:18 <peter1138> Oh, no I'd already decided that was a bad idea.
20:43:28 <peter1138> It's masked by the command caller already, so the fact that the command will now issue an error instead of silently masking again doesn't really matter.
20:44:47 <peter1138> One more rebuild.
20:47:38 *** Hazzard has joined #openttd
20:48:15 *** SmatZ has joined #openttd
20:48:15 *** Hirundo has joined #openttd
20:48:46 *** Yexo has joined #openttd
20:48:46 *** avdg has joined #openttd
20:49:15 <peter1138> See, back!
20:49:16 *** planetmaker has joined #openttd
20:49:28 <peter1138> `if (!ctlflags.IsValid()) return CMD_ERROR;`
20:49:37 *** planetmaker is now known as Guest8289
20:49:38 <peter1138> `cmpb $0x10, %cl`
20:49:46 *** tneo has joined #openttd
20:49:54 <peter1138> That's... not quite how I thought it would mask :-)
20:50:15 *** Osai has joined #openttd
20:50:31 *** ^Spike^ has joined #openttd
20:50:45 *** Ammler has joined #openttd
20:51:06 *** ^Spike^ is now known as Guest8291
20:51:16 *** V453000 has joined #openttd
20:51:16 *** Terkhen has joined #openttd
20:51:16 *** ChanServ sets mode: +o Terkhen
20:51:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13477: Codechange: Use EnumBitSet for IndustryControlFlags. https://github.com/OpenTTD/OpenTTD/pull/13477
20:51:46 *** XeryusTC has joined #openttd
20:52:16 *** fonsinchen has joined #openttd
20:53:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13478: Codechange: Use EnumBitSet for industry-related enum masks. https://github.com/OpenTTD/OpenTTD/pull/13478
20:54:16 *** Artea has quit IRC (Remote host closed the connection)
20:54:16 *** FLHerne has quit IRC (Quit: There's a real world out here!)
20:54:17 *** ialokin has quit IRC (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
20:54:19 *** FLHerne has joined #openttd
20:54:30 *** ialokin has joined #openttd
20:56:50 <peter1138> I hear M4s are quick, maybe I should get one.
20:56:51 *** Artea has joined #openttd
21:01:24 <andythenorth> who told you that?
21:08:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13285: Codechange: Remove global string parameters. https://github.com/OpenTTD/OpenTTD/pull/13285
21:09:49 <peter1138> Has the world ended yet?
21:16:42 <frosch123> Damn, my classmate from school is hitting all news sites with their rejection of rust stuff in the kernel
21:17:46 <frosch123> I assumed he peeked fame with sueing vmware
21:20:21 <LordAro> frosch123: dma guy?
21:21:21 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13478: Codechange: Use EnumBitSet for industry-related enum masks. https://github.com/OpenTTD/OpenTTD/pull/13478#pullrequestreview-2599990187
21:22:12 <frosch123> LordAro: Yes
21:22:54 <peter1138> Ooh
21:23:59 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13478: Codechange: Use EnumBitSet for industry-related enum masks. https://github.com/OpenTTD/OpenTTD/pull/13478#pullrequestreview-2600013674
21:24:29 <andythenorth> peter1138: does it end faster on M4?
21:24:55 <peter1138> Let's see how HasCargoClass is used.
21:25:27 <andythenorth> I think I read that last year, in the CargoClass pitchfork event
21:27:02 <peter1138> Basically ScriptCargo::HasCargoClass makes no mention of CargoClass being a mask.
21:27:34 <peter1138> Hmm, probably best not to subtly change the API just for lols.
21:28:49 <LordAro> frosch123: i kinda empathise
21:29:18 <peter1138> We're clearly of the same frame of mind, we've not accepted any Rust integration.
21:29:45 <LordAro> don't think anyone has asked to either :p
21:30:49 <peter1138> Probably too afriad.
21:31:50 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
21:32:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13478: Codechange: Use EnumBitSet for industry-related enum masks. https://github.com/OpenTTD/OpenTTD/pull/13478
21:34:53 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13478: Codechange: Use EnumBitSet for industry-related enum masks. https://github.com/OpenTTD/OpenTTD/pull/13478#pullrequestreview-2600033570
21:39:00 <andythenorth> we have a rust grf compiler 😛
21:39:33 <peter1138> Everytime I see Rust code it looks nothing like code, just... syntax.
21:40:27 <peter1138> I guess I've not actually gone out of my way to look at normal Rust :p
21:44:04 <peter1138> Hmm.
21:44:33 <andythenorth> looks like code to me 😛 https://doc.rust-lang.org/rust-by-example/custom_types/structs.html
21:44:53 <andythenorth> I assume the ; characters are optional 😛
21:45:13 <peter1138> println!
21:48:34 <andythenorth> I should refactor my refactor
21:48:44 <peter1138> https://doc.rust-lang.org/rust-by-example/types/inference.html < that's a... feature? :o
21:49:20 <frosch123> Same as c++ auto
21:49:29 <peter1138> Not exactly.
21:49:51 <peter1138> You always have to define what a vector contains.
21:50:14 <frosch123> Ah right
21:50:44 <frosch123> C++ only has CTAD
21:50:45 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #13285: Codechange: Remove global string parameters. https://github.com/OpenTTD/OpenTTD/pull/13285#pullrequestreview-2600080617
21:50:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13416: Codechange: make some types used as ID in pools enums https://github.com/OpenTTD/OpenTTD/pull/13416
21:50:55 <frosch123> Which has a bad reputation
21:51:56 <peter1138> So a pointer is a Box.
21:52:14 <frosch123> Box is unique_ptr
21:52:25 <andythenorth> maybe I should refactor Horse to rust
21:53:03 <peter1138> Yeah, some form of smart pointer. This rust-by-example page doesn't give much in the way of examples for them.
21:53:14 <frosch123> Anyway, I like rust a lot. Though I was surprised it made it into Linux instead of zig
21:54:41 <peter1138> Hmm, then there's Rc.
21:54:46 <peter1138> Very naming.
21:59:45 <frosch123> Recounting like shared_ptr, but single-threaded
22:00:53 <frosch123> Just don't look at macros. They are scary
22:03:19 <peter1138> Uh oh.
22:04:47 <andythenorth> _immediately contemplates nml generator using macros and println
22:09:58 <peter1138> That's basically how it already is.
22:13:29 <gwyd4016> Why generate nml when you can generate nfo
22:15:19 <peter1138> Why generate nfo when you generate binary data.
22:15:22 <peter1138> +can
22:19:58 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:21:51 <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #13289: Feature: Draw infinite water when all borders are water https://github.com/OpenTTD/OpenTTD/pull/13289#issuecomment-2641225841
22:23:46 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:26:05 <peter1138> Crap, we left it too long.
22:27:33 <xarick> how many of the [Scripts] going to be merged?
22:28:42 <xarick> I'd like to try unbunch on my ships
22:31:19 <andythenorth> Zorg!
22:31:28 <andythenorth> Naptime
22:42:35 <gwyd4016> LC-ZorgviaGitHub: Flat earth mentioned
22:44:05 <LordAro> it's been a while
22:46:28 <LordAro> definitely got a point about other water types
22:47:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13479: Codechange: Add GetString() method that accepts parameters directly instead of via SetDParam(). https://github.com/OpenTTD/OpenTTD/pull/13479
22:50:17 <talltyler> It’s been a while because I haven’t finished it 🙂
22:50:22 <talltyler> Not lack of reviews
22:53:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13480: Codechange: Pass preformatted string when updating sign positions. https://github.com/OpenTTD/OpenTTD/pull/13480
22:53:11 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #13289: Feature: Draw infinite water when all borders are water https://github.com/OpenTTD/OpenTTD/pull/13289
22:53:23 <peter1138> Ah, that's why Firefox was stalling.
22:53:44 <peter1138> I left a browser tab open in developer mode, and the page kept loading something in the background. After a few hours the persistent logs get a bit much for it.
22:53:54 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #13289: Feature: Draw infinite water when all borders are water https://github.com/OpenTTD/OpenTTD/pull/13289#issuecomment-2641303398
22:54:35 <talltyler> (No changes, just a rebase and fixing annotations)
22:55:07 <peter1138> The bit that's weird about that PR is we've gone from "all maps have water around the edge" to "you can optionally not have water" back to "all maps should have water around the edge" :)
22:55:56 <talltyler> Time is ~~fake~~ a loop, etc
22:56:00 <peter1138> How about we generate infinite procedural terrain but keep the map size limit ;-)
22:56:43 <peter1138> (j/k)
22:58:36 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13479: Codechange: Add GetString() method that accepts parameters directly instead of via SetDParam(). https://github.com/OpenTTD/OpenTTD/pull/13479#pullrequestreview-2600209882
23:00:24 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:03:11 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13480: Codechange: Pass preformatted string when updating sign positions. https://github.com/OpenTTD/OpenTTD/pull/13480#pullrequestreview-2600220135
23:05:00 <LordAro> peter1138: and yet
23:14:05 <peter1138> > Feeder stations to increase % transported; do real life companies do this?
23:14:06 <peter1138> lols
23:30:30 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13479: Codechange: Add GetString() method that accepts parameters directly instead of via SetDParam(). https://github.com/OpenTTD/OpenTTD/pull/13479
23:30:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13480: Codechange: Pass preformatted string when updating sign positions. https://github.com/OpenTTD/OpenTTD/pull/13480