IRC logs for #openttd on OFTC at 2025-03-23
            
02:32:11 *** Wormnest has quit IRC (Quit: Leaving)
02:34:51 *** Flygon has joined #openttd
02:38:39 *** akimoto has quit IRC (Remote host closed the connection)
03:55:27 *** D-HUND has joined #openttd
03:57:17 *** geizeskrank has quit IRC (Ping timeout: 480 seconds)
03:58:58 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:00:47 *** geizeskrank has joined #openttd
05:07:15 *** keikoz has joined #openttd
07:08:14 *** nielsm has joined #openttd
07:40:53 *** Wolf01 has joined #openttd
09:16:40 *** gelignite has joined #openttd
09:54:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865
09:56:51 <peter1138> Shuffling bits around for now.
09:57:46 <peter1138> How do I get VS Code to not find references in a file that no longer exists?
10:01:31 <peter1138> Hmm, GRF overrides only seem to be used by Action D. So that's something to move.
10:02:07 <peter1138> Oh, but GetnewEngine uses it too. Hmm.
10:02:59 <peter1138> Uh, not D, Act 0 feat 8.
10:05:08 <xarick> hi
10:13:23 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865
10:16:03 <peter1138> More unifying. Hmm.
10:17:53 <xarick> why not give those numbers actual names
10:18:33 <reldred> the number three will now be called Dorothy
10:18:53 <reldred> this will revolutionize mathematics
10:18:58 <reldred> no i will not elaborate
10:43:28 <geizeskrank> hi.. is there a newgrf that can build double rail tracks?
10:47:26 <emperorjake> geizeskrank: Are you thinking of two tracks on one tile? or automatically build an adjacent track? NewGRFs can do neither
10:55:10 *** keikoz has quit IRC ()
11:04:03 <geizeskrank> second: automatically build two tracks on two tiles side by side
11:04:57 <_glx_> Newgrf can't do that
11:07:00 <geizeskrank> Oh .. sad .. I thought as like as stations that are build with multiple tracks
11:14:02 <peter1138[d]> Well
11:26:35 <LordAro> you can definitely have stations with multiple tracks
11:29:00 <geizeskrank> I meant like stations but want normal double tracks
11:29:16 <geizeskrank> sry for bad english ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯
11:35:55 <LordAro> it's not clear what a newgrf (or any other modification) has to do with the ability to make double tracks
11:36:40 <andythenorth> that's because we have the world's weirdest modding system 🙂
11:42:55 <geizeskrank> I'm sure a decade ago I've seen a patch or something like that for double tracks =)
11:44:25 <andythenorth> should be a GS
12:11:35 *** gelignite has quit IRC (Read error: Connection reset by peer)
12:13:23 <frosch123> Hmm, eints did not run last night
12:15:12 <frosch123> Hmm, it did run, but did not commit anything
12:16:51 <_glx_> Maybe there was no pending changes
12:17:34 <frosch123> Silly me, my PR changing English.txt is not merged yet
12:17:46 <frosch123> I confused them
12:25:42 <DorpsGek> [OpenTTD/OpenTTD] TheDude-gh opened issue #13875: [Bug]: OpenTTD GameScript API Docs completely miss description of GSText. https://github.com/OpenTTD/OpenTTD/issues/13875
12:31:39 <xarick> someone's making an AI?... oh it's a GS
12:36:54 <peter1138> Oof
12:37:29 <peter1138> Right, do I need to make an enum for Action names?
12:38:20 <peter1138> Let's see what the specs call them.
12:38:22 <peter1138> "Action 0"
12:38:23 <peter1138> Oh.
12:44:03 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1353348570400686160/image.png?ex=67e15393&is=67e00213&hm=74d1f8c2bed4384ce7321661b14c96e3f6657b927ce8b1c000c61fab1f3327d5&
12:44:03 <peter1138[d]> Perfect.
12:47:36 <_glx_> Ah so we lost GSText doc again
12:52:25 <peter1138> :(
12:59:21 <_glx_> I like `GrfActions::Proprerties`
12:59:21 *** Speedy` has quit IRC (Read error: Connection reset by peer)
12:59:51 <xarick> Dorothy
13:02:57 *** Speedy` has joined #openttd
13:11:51 <pickpacket> _glx_: I can't even find a definition of GSText in the code
13:12:36 <michi_cc> It's called ScriptText in code
13:12:46 <pickpacket> ah!
13:12:57 <pickpacket> Why is it lost in the docs? 🤔
13:13:26 <_glx_> https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_text.hpp
13:14:03 <_glx_> Usually it's lost because doxygen filter fails
13:19:49 <peter1138> I'm not sure naming them helps much.
13:21:53 <peter1138> What do you name Act7/9...
13:22:22 <michi_cc> SkipStuff, SkipStuffHarder 🙂
13:28:33 <frosch123> I would keep the numbers
13:29:00 <frosch123> Just like in the specs
13:29:39 <frosch123> No-one would be able to tell act 7/9 apart, if they had some name
13:29:55 <frosch123> The difference is just too arbitrary
13:33:29 <frosch123> If you need an enum, just name the members `Action0` etc
13:38:39 <peter1138> As my instinct was to not name them, having an enum to name them with no names seems a bit pointless :)
13:49:58 <pickpacket> _glx_: are those doxygen filter fails consistent and preventable? 🤔
13:52:06 <_glx_> Once the cause is found yes, not the first time it happens, often it's because a small change in header unhandled by the filter, and the the filter outputs a blank file
13:53:12 <_glx_> And if it's not blank it has mismatched {}
13:56:24 <pickpacket> this must have failed for quite some time, because it's never existed while I've learned GS 😂
13:57:40 <pickpacket> I've never seen it in the docs, so I thought "this._score_board_page_elements.append(GSStoryPage.NewElement(this._score_board_page, GSStoryPage.SPET_TEXT, 0, textLine));" was the only way to add text 😂
14:09:21 <pickpacket> I get *a lot* of these warnings when compiling the latest master: "src/saveload/../core/pool_type.hpp:56:66: warning: ‘*(const PoolID<short unsigned int, SubsidyIDTag, 256, 65535>*)*_9374.PoolID<short unsigned int, SubsidyIDTag, 256, 65535>::value’ may be used uninitialized [-Wmaybe-uninitialized]"
14:09:43 <pickpacket> like... *a lot*
14:10:04 <pickpacket> always the same line, though.
14:10:12 <pickpacket> weird
14:26:12 <LordAro> templates
14:26:19 <LordAro> false positive, iirc
14:52:19 <pickpacket> I don't like false warnings :(
14:52:37 <pickpacket> also: I've forgotten how to generate a new regression.txt 🤪
14:53:26 <pickpacket> oh, wait! No I haven't
14:57:12 <pickpacket> or have I... I thought I should copy ./build/ai/regression/result.txt to ./regression/regression/result.txt after a normal build, but when I do there are no changes in it despite changes in the script api. Is that normal?
14:57:49 <Rubidium> well, there's sort of false-ish. Technically it's not uninitialized, but we're doing something weird/tricky that might catch people out
15:00:09 <_glx_> it's because `new (index) PoolItem()` or something like that
15:08:16 <peter1138> It's because we're a bit naughty.
15:08:43 <peter1138> We're initalising it in the allocator, before the constructor is called, so from the compiler's point of view, the constructor has not initialised it.
15:20:54 *** Wormnest has joined #openttd
15:28:05 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13871: Codechange: Pass unformatted strings from GetStringPtr as std::string_view https://github.com/OpenTTD/OpenTTD/pull/13871
15:31:38 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13870: Codechange: Pass GRF name as std::string to UpdateNewGRFScanStatus https://github.com/OpenTTD/OpenTTD/pull/13870#pullrequestreview-2708619852
15:32:05 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876
15:33:06 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876
15:33:55 *** akimoto has joined #openttd
15:36:47 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353392038527373454/image.png?ex=67e17c0e&is=67e02a8e&hm=2a9c24d36eac01c490ed79d0d3e898d970e150f684e19d33adcce5253e283a41&
15:36:56 <_glx_> indeed filtering failed
15:46:17 <peter1138> Hmm, failing at trying to namespace thigns :(
15:46:49 <andythenorth> just call them CABBAGE
15:47:05 <peter1138> Namespace things != name things.
15:54:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865#pullrequestreview-2708626937
15:55:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13874: Fix #13849: Settings in old saves could be overridden by defaults. https://github.com/OpenTTD/OpenTTD/pull/13874
15:56:01 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #13849: [Bug]: Old settings are erased when loading (some?) savegames/scenarios https://github.com/OpenTTD/OpenTTD/issues/13849
15:57:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/13877
15:58:47 <DorpsGek> [OpenTTD/OpenTTD] frosch123 merged pull request #13870: Codechange: Pass GRF name as std::string to UpdateNewGRFScanStatus https://github.com/OpenTTD/OpenTTD/pull/13870
16:21:32 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13862: Codechange: Use std::string_view in GetStringPtr and FormatString https://github.com/OpenTTD/OpenTTD/pull/13862
16:25:29 <DorpsGek> [OpenTTD/OpenTTD] frosch123 commented on pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865#pullrequestreview-2708634330
16:25:42 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865#pullrequestreview-2708634367
16:26:01 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13871: Codechange: Pass unformatted strings from GetStringPtr as std::string_view https://github.com/OpenTTD/OpenTTD/pull/13871
16:34:26 *** gelignite has joined #openttd
16:35:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/13877
16:40:41 <frosch123> I have no idea why #13871 fails on windows. Valgrind is happy
16:42:32 <peter1138> for (const char *p = &*str.begin(), *end = &*str.end(); p < end; /* nothing */) {
16:42:38 <peter1138> We had another issue like that before.
16:42:47 <_glx_> dereferencing end ?
16:43:32 <_glx_> I need to check locally to find the crash reason (CI only reports 2 minute timeout)
16:44:23 <_jgr_> std::string_view::iterator is not a const char * on MSVC
16:44:38 <peter1138> Yeah, trying to find my comment about it elsewhere :)
16:44:41 <_glx_> I think <https://github.com/OpenTTD/OpenTTD/commit/4ffbf977709a7a00aed4c34a6939f16e5bd01ee3> is the cause for GSText doc fail, but don't know why yet
16:45:18 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
16:45:22 *** WormnestAndroid has joined #openttd
16:45:56 <andythenorth> hmm pitchforks
16:46:17 <DorpsGek> [OpenTTD/OpenTTD] bjornwarmedal opened pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/13878
16:46:24 <andythenorth> for grf dev it would be convenient to have 'engines never expire' in sandbox menu
16:46:27 <andythenorth> ctrl-alt-c
16:46:38 <andythenorth> configurable sandbox menu? 😛
16:47:26 <peter1138> EncodedString::ReplaceParam() had the same thing.
16:47:40 <peter1138> So I did strings.cpp:159-161 instead.
16:47:46 <frosch123> Thanks, sounds reasonable
16:53:15 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13871: Codechange: Pass unformatted strings from GetStringPtr as std::string_view https://github.com/OpenTTD/OpenTTD/pull/13871
16:55:33 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353411863940960337/image.png?ex=67e18e85&is=67e03d05&hm=79e02555086848bc8291f55891a84e968805a904e4d880364eba1705cf84e182&
16:55:40 <_glx_> that's why regression fails
16:59:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/13865
17:00:01 *** kuka_lie has joined #openttd
17:12:15 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/13878#pullrequestreview-2708650400
17:27:07 <xarick> what if the company poofs?
17:37:32 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/13878#pullrequestreview-2708666017
17:38:09 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876
17:41:15 <Rubidium> xarick: exactly the same as we the company poofs when you just read the event, and you hit the ops limit for the tick and that tick the company gets poofed
17:45:52 * peter1138 ponders
17:52:55 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13871: Codechange: Pass unformatted strings from GetStringPtr as std::string_view https://github.com/OpenTTD/OpenTTD/pull/13871#pullrequestreview-2708670590
17:53:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13879: Codechange: Make use of emplace_back's return value. https://github.com/OpenTTD/OpenTTD/pull/13879
17:54:22 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/13877#pullrequestreview-2708670908
17:55:24 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13879: Codechange: Make use of emplace_back's return value. https://github.com/OpenTTD/OpenTTD/pull/13879#pullrequestreview-2708671135
17:59:59 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13880: Codechange: Use .fill() to clear an array instead of assigning a new array. https://github.com/OpenTTD/OpenTTD/pull/13880
18:01:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/13877
18:06:53 <andythenorth> hmm Badgers
18:07:01 <_glx_> ok confirmed the cause for GSText doc fail, but I still don't see why
18:07:38 <_glx_> oh it's probably the "override;"
18:08:16 <peter1138> Probably my EncodedString changes.
18:11:54 <_glx_> I think it's just the "override;", it used to be "override { ... }"
18:12:07 <_glx_> so the script fails to see stuff
18:13:03 <peter1138> Parsing C++ is hard ;)
18:13:36 <peter1138> Hmm, can Source become a variant now that the IDs are strong types...
18:14:36 <peter1138> No saveload support for variants though.
18:15:38 <Rubidium> saveload is as far as I know the biggest blocker to making it a variant
18:16:42 <Rubidium> I think the rest of the potential issues ought to be trivial to fix/figure out
18:18:52 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353432828951662662/image.png?ex=67e1a20b&is=67e0508b&hm=8fe67ed37ab48b416dcbc1f517ea8a4ffb279c0d7bbd9919ccfb4fcf1e3ae77a&
18:18:52 <_glx_> my guess is on
18:23:34 <DorpsGek> [OpenTTD/OpenTTD] frosch123 merged pull request #13871: Codechange: Pass unformatted strings from GetStringPtr as std::string_view https://github.com/OpenTTD/OpenTTD/pull/13871
18:24:52 <pickpacket> _glx_: Can I fix the doxygen filtering? How does one do that? :)
18:25:05 <_glx_> I'm doing it 🙂
18:26:02 <peter1138> Maybe we need a doxygen unit-test.
18:26:25 <_glx_> we need to replace awk 🙂
18:28:03 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13862: Codechange: Use std::string_view in FormatString, and validate string bounds while parsing https://github.com/OpenTTD/OpenTTD/pull/13862
18:28:10 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13880: Codechange: Use .fill() to clear an array instead of assigning a new array. https://github.com/OpenTTD/OpenTTD/pull/13880#pullrequestreview-2708681611
18:32:13 <peter1138> Yeah, saveload is a bit too... raw.
18:34:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13879: Codechange: Make use of emplace_back's return value. https://github.com/OpenTTD/OpenTTD/pull/13879
18:35:03 <xarick> Dang it, I don't like it when I click reload ai it ignores all the parameters i changed
18:35:58 <pickpacket> _glx_: ❤️
18:42:10 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #13881: Fix: [NewGRF] Display an error, if NewGRF reference out-of-bounds string parameters in gender/plural choices. https://github.com/OpenTTD/OpenTTD/pull/13881
18:42:21 *** tokai has joined #openttd
18:42:21 *** ChanServ sets mode: +v tokai
18:44:47 <DorpsGek> [OpenTTD/OpenTTD] frosch123 updated pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876
18:49:08 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
18:49:25 <_glx_> ok actually it used to work with pure luck
18:49:36 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13881: Fix: [NewGRF] Display an error, if NewGRF reference out-of-bounds string parameters in gender/plural choices. https://github.com/OpenTTD/OpenTTD/pull/13881#pullrequestreview-2708687684
18:51:31 <DorpsGek> [OpenTTD/OpenTTD] bjornwarmedal updated pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/13878
18:56:49 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353442380975439912/image.png?ex=67e1aaf1&is=67e05971&hm=31225e9bb53e18d341748225c90146f9cb894a1a619fcddff0ecfb7e85285293&
18:56:49 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353442381432885290/image.png?ex=67e1aaf1&is=67e05971&hm=3c8dbec6d308c854c7b47ddd45d5b3167458e5e2e1c3124e86dedc5ff0482e16&
18:56:49 <_glx_> just printing what's matching `/^.*\(.*\).*$/`
18:57:42 <_glx_> so clearly it's `override` but there's more
19:42:57 *** Wormnest_ has joined #openttd
19:43:15 <DorpsGek> [OpenTTD/OpenTTD] frosch123 merged pull request #13881: Fix: [NewGRF] Display an error, if NewGRF reference out-of-bounds string parameters in gender/plural choices. https://github.com/OpenTTD/OpenTTD/pull/13881
19:43:24 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876#pullrequestreview-2708713121
19:46:39 <DorpsGek> [OpenTTD/OpenTTD] frosch123 commented on pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876#pullrequestreview-2708715781
19:47:59 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:48:50 <DorpsGek> [OpenTTD/OpenTTD] frosch123 commented on pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876#pullrequestreview-2708717265
19:58:03 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13876: Codechange: Encode case/gender/plural choice lists without null termination, only length prefix https://github.com/OpenTTD/OpenTTD/pull/13876#pullrequestreview-2708721154
19:59:07 <xarick> + script_config 0x00000230a04b5990 {...} ScriptConfig * {AIConfig}
19:59:07 <xarick> c->ai_config.reset(); what does this do?
20:01:29 <Rubidium> look up the type and then the documentation of said type
20:07:18 <xarick> okay, I see the problem
20:08:16 <xarick> AI::Stop should pass a copy of the config from the company to the settings_game
20:08:45 <xarick> but still....
20:21:38 <xarick> hmm...
20:22:34 <xarick> config being stored in the company is the problem
20:23:45 <xarick> maybe ReloadAI needs more specialization
20:24:08 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman opened pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/98
20:24:48 <xarick> StopAI removes the config from the company, which is the config I made changes to the parameters
20:25:18 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman commented on pull request #96: Script-Fu: update to GIMP3-compatible implementation https://github.com/OpenTTD/OpenGFX/pull/96#issuecomment-2746405735
20:25:57 <xarick> when StartAI tries to get the config, it pulls a new config copy from _settings_game... whatever changes I had are simply discarded on StopAI
20:26:08 <xarick> this sucks
20:26:13 <xarick> didn't use to do this
20:26:39 <xarick> how do I fix this
20:28:21 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman updated pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/98
20:31:26 <_glx_> it's explicitely done that way, changing parameters in running AI doesn't affect original parameters for the slot
20:31:58 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
20:32:08 <_glx_> it used to be a mess, now it's clean
20:33:21 <xarick> well, ... I am looking for restoring this functionality
20:33:28 <xarick> or a workaround
20:36:20 <xarick> need to copy the settings over to _settings_game on StopAI, but i'd need to also detect I am restarting the AI 😦
20:37:13 <xarick> exception is random ai
20:37:23 <xarick> that doesn't need to copy over anything
20:50:56 <_glx_> ok even `EncodedString GetEncodedText();` is not matched, very weird
20:52:01 *** WormnestAndroid has quit IRC (Remote host closed the connection)
20:52:02 *** WormnestAndroid has joined #openttd
20:55:18 <peter1138> Matched for what though? That's not meant to be exposed to the API.
21:01:31 <_glx_> oh actually the problem comes from `RawText(const std::string &text) : text(text) {}`
21:02:08 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353473916831531088/image.png?ex=67e1c850&is=67e076d0&hm=ad8abcc09efa87779ca2af0735e6d869f37f913dd8150fa05abd4ced01fdcc93&
21:02:53 <_glx_> it "works" for old code by luck, but skip_function_body is wrong until the next `}`
21:03:48 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353474336853463091/image.png?ex=67e1c8b4&is=67e07734&hm=c50c319cd47e6e0e37353e4160fcba997f9d26cdb54d4f369a21020add611d8d&
21:04:21 <_glx_> but in new code the function is invisible
21:04:38 <_glx_> I hate debugging awk
21:06:45 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353475077336989797/image.png?ex=67e1c964&is=67e077e4&hm=1df862cfb20a4b0d501ebe52d7ac796da221c6d13fd69547c086c726b811215f&
21:06:45 <_glx_> so it's somewhere in
21:07:00 <_glx_> and I don't understand what it actually does
21:08:36 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman updated pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/98
21:12:53 <_glx_> hmm I think I see, it assumes function body starts on next line
21:14:15 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353476967051034714/image.png?ex=67e1cb27&is=67e079a7&hm=e7f12689ad825e499afd9750c82587f701d954672a919ec4ae597ef407299b59&
21:14:19 <_glx_> seems to confirm
21:29:01 *** kuka_lie has quit IRC (Quit: Lost terminal)
21:36:39 <DorpsGek> [OpenTTD/OpenGFX] jayaddison commented on pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/98#pullrequestreview-2708813107
21:43:02 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:47:49 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353485412282142770/image.png?ex=67e1d304&is=67e08184&hm=8edbbd7ebe42de0b29e38ce6c1f2058a33fcc0eb55c5665253023b93b48e8005&
21:47:49 <xarick> PR?
21:47:53 <_glx_> ok doxygen filter seem to expect constructors are written like in <https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_event_types.hpp>
21:48:23 <_glx_> xarick: no you are the only one wanting that
21:49:06 <xarick> I seriously doubt it, it's just that nobody else reported
21:53:01 <xarick> need to test this further
21:53:27 <xarick> what will the restart command do
21:59:09 *** keikoz has joined #openttd
22:05:43 <xarick> grr... it's not working anymore
22:08:12 <xarick> why can't I do something so simple
22:09:49 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13880: Codechange: Use .fill() to clear an array instead of assigning a new array. https://github.com/OpenTTD/OpenTTD/pull/13880
22:13:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13661: Add: Variable to test for a badge on a nearby tile. https://github.com/OpenTTD/OpenTTD/pull/13661
22:24:10 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:24:27 <xarick> I don't understand what I'm doing wrong
22:24:50 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #13882: Fix #13875: [Script] be less strict about empty constructor format for doxygen https://github.com/OpenTTD/OpenTTD/pull/13882
22:25:25 <xarick> `AIConfig *config = GetGameSettings().ai_config[company]; ` GetGameSettings() is doing something
22:25:33 <xarick> the change doesn't persist
22:27:56 <xarick> Container::reference operator[] ?
22:28:20 <xarick> ConvertibleThroughBase
22:28:24 <xarick> what does this do?
22:30:28 <_glx_> ConvertibleThrougBase is a wrapper around StrongType
22:31:26 <xarick> `ReferenceThroughBaseContainer<std::array<class AIConfig *, MAX_COMPANIES>> ai_config; ///< settings per company`
22:31:52 <_glx_> magic 🙂
22:32:20 <xarick> it's ruining my code some how
22:32:48 <xarick> config = new AIConfig(c->ai_config.get()); this does a copy
22:32:48 *** gelignite has quit IRC (Quit: Stay safe!)
22:32:50 <peter1138> It's just a container wrapper that does .base() automatically if the index is ConvertibleThroughBase.
22:33:30 <xarick> but then it's not changing anything, feels like... it copied to some ghost "config" variable and not the real place
22:36:07 <peter1138> Have you tried learning what pointers are?
22:36:38 <xarick> hmm i guess I didn't
22:39:45 <_glx_> maybe take a look at AIConfig::GetConfig()
22:47:46 <_glx_> also be careful to not leak memory
22:53:01 <xarick> ah, I think I did it
22:53:20 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353501900393283624/image.png?ex=67e1e25f&is=67e090df&hm=4528cea4db502647378233ee99336ee6c880554eb520615d27244d588f02c088&
22:53:20 <xarick> double pointer
22:53:48 <xarick> I did it, but I didn't understand it
22:53:54 <xarick> as long as it works, fine
22:58:34 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:59:01 <xarick> i need to nullptr it first?
22:59:07 <xarick> is it leaking memory?
22:59:36 <xarick> *config = nullptr; ?
23:00:43 <_glx_> no you need to delete it
23:01:41 <xarick> okay
23:04:04 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353504603844509748/image.png?ex=67e1e4e4&is=67e09364&hm=f5c04420795d5b93ca224220ca17590333462cb4e7a843e4a8a44d20f972bbf1&
23:06:10 <xarick> nop, asserted
23:06:57 <_glx_> it doesn't become nullptr magically
23:07:14 <_glx_> but it's deleted
23:08:15 <_glx_> cleaner way would be to use unique_ptr
23:08:38 <_glx_> instead of new/delete
23:11:26 <xarick> can't do it
23:12:32 <_glx_> yeah it would be a big change all over the code
23:13:06 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353506877698474128/image.png?ex=67e1e702&is=67e09582&hm=424a51a66a40d0279ba19114033c1e5b571764f9d3fd113a76fbeaeae0182503&
23:13:16 <xarick> oh, not ==, i mean =
23:13:22 <_glx_> no need to nullptr it
23:13:37 <_glx_> since you put a new one immediately
23:15:03 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353507364044673135/image.png?ex=67e1e776&is=67e095f6&hm=f56bfaa9fe70f13eacbd19a4df3c4e9158685ea1df9464bf1fda5ae2d6e8b423&
23:15:03 <xarick> just this is sufficient?
23:15:11 <xarick> I wanna go to bed :l
23:26:25 *** akimoto has quit IRC (Remote host closed the connection)
23:57:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13883: Codechange: Use std::swap() instead of Swap() https://github.com/OpenTTD/OpenTTD/pull/13883