⏴ go to previous day02:32:11 *** Wormnest has quit IRC (Quit: Leaving)02:34:51 *** Flygon has joined #openttd02:38:39 *** akimoto has quit IRC (Remote host closed the connection)03:55:27 *** D-HUND has joined #openttd03: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 #openttd05:07:15 *** keikoz has joined #openttd07:08:14 *** nielsm has joined #openttd07:40:53 *** Wolf01 has joined #openttd09:16:40 *** gelignite has joined #openttd09:54:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/1386509: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> hi10:13:23 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/1386510:16:03 <peter1138> More unifying. Hmm.10:17:53 <xarick> why not give those numbers actual names10:18:33 <reldred> the number three will now be called Dorothy10:18:53 <reldred> this will revolutionize mathematics10:18:58 <reldred> no i will not elaborate10: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 neither10:55:10 *** keikoz has quit IRC ()11:04:03 <geizeskrank> second: automatically build two tracks on two tiles side by side11:04:57 <_glx_> Newgrf can't do that11:07:00 <geizeskrank> Oh .. sad .. I thought as like as stations that are build with multiple tracks11:14:02 <peter1138[d]> Well11:26:35 <LordAro> you can definitely have stations with multiple tracks11:29:00 <geizeskrank> I meant like stations but want normal double tracks11: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 tracks11: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 GS12:11:35 *** gelignite has quit IRC (Read error: Connection reset by peer)12:13:23 <frosch123> Hmm, eints did not run last night12:15:12 <frosch123> Hmm, it did run, but did not commit anything12:16:51 <_glx_> Maybe there was no pending changes12:17:34 <frosch123> Silly me, my PR changing English.txt is not merged yet12:17:46 <frosch123> I confused them12: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/1387512:31:39 <xarick> someone's making an AI?... oh it's a GS12:36:54 <peter1138> Oof12: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 again12: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> Dorothy13:02:57 *** Speedy` has joined #openttd13:11:51 <pickpacket> _glx_: I can't even find a definition of GSText in the code13:12:36 <michi_cc> It's called ScriptText in code13:12:46 <pickpacket> ah!13:12:57 <pickpacket> Why is it lost in the docs? 🤔13:14:03 <_glx_> Usually it's lost because doxygen filter fails13: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 numbers13:29:00 <frosch123> Just like in the specs13:29:39 <frosch123> No-one would be able to tell act 7/9 apart, if they had some name13:29:55 <frosch123> The difference is just too arbitrary13:33:29 <frosch123> If you need an enum, just name the members `Action0` etc13: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 file13: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> weird14:26:12 <LordAro> templates14:26:19 <LordAro> false positive, iirc14: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't14: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 out15:00:09 <_glx_> it's because `new (index) PoolItem()` or something like that15: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 #openttd15: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/1387115: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-270861985215: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/1387615: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/1387615:33:55 *** akimoto has joined #openttd15:36:47 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353392038527373454/image.png?ex=67e17c0e&is=67e02a8e&hm=2a9c24d36eac01c490ed79d0d3e898d970e150f684e19d33adcce5253e283a41&15:36:56 <_glx_> indeed filtering failed15:46:17 <peter1138> Hmm, failing at trying to namespace thigns :(15:46:49 <andythenorth> just call them CABBAGE15: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-270862693715: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/1387415: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/1384915:57:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/1387715: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/1387016: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/1386216: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-270863433016: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-270863436716: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/1387116:34:26 *** gelignite has joined #openttd16:35:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/1387716:40:41 <frosch123> I have no idea why #13871 fails on windows. Valgrind is happy16: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 MSVC16: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 yet16:45:18 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)16:45:22 *** WormnestAndroid has joined #openttd16:45:56 <andythenorth> hmm pitchforks16:46:17 <DorpsGek> [OpenTTD/OpenTTD] bjornwarmedal opened pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/1387816:46:24 <andythenorth> for grf dev it would be convenient to have 'engines never expire' in sandbox menu16:46:27 <andythenorth> ctrl-alt-c16: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 reasonable16: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/1387116: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 fails16:59:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13865: Codechange: Split NewGRF loader into separate files. https://github.com/OpenTTD/OpenTTD/pull/1386517:00:01 *** kuka_lie has joined #openttd17: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-270865040017: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-270866601717: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/1387617: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 poofed17:45:52 * peter1138 ponders17: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-270867059017: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/1387917:54:22 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/13877#pullrequestreview-270867090817: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-270867113517: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/1388018:01:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13877: Codechange: Use EnumBitSet for SpriteFlags. https://github.com/OpenTTD/OpenTTD/pull/1387718:06:53 <andythenorth> hmm Badgers18:07:01 <_glx_> ok confirmed the cause for GSText doc fail, but I still don't see why18: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 stuff18: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 variant18:16:42 <Rubidium> I think the rest of the potential issues ought to be trivial to fix/figure out18: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 on18: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/1387118: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/1386218: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-270868161118: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/1387918:35:03 <xarick> Dang it, I don't like it when I click reload ai it ignores all the parameters i changed18: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/1388118:42:21 *** tokai has joined #openttd18:42:21 *** ChanServ sets mode: +v tokai18: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/1387618:49:08 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)18:49:25 <_glx_> ok actually it used to work with pure luck18: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-270868768418:51:31 <DorpsGek> [OpenTTD/OpenTTD] bjornwarmedal updated pull request #13878: Change: [script] Add vehicle owner to crash event https://github.com/OpenTTD/OpenTTD/pull/1387818: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 more19:42:57 *** Wormnest_ has joined #openttd19: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/1388119: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-270871312119: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-270871578119: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-270871726519: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-270872115419: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 type20:07:18 <xarick> okay, I see the problem20:08:16 <xarick> AI::Stop should pass a copy of the config from the company to the settings_game20:08:45 <xarick> but still....20:21:38 <xarick> hmm...20:22:34 <xarick> config being stored in the company is the problem20:23:45 <xarick> maybe ReloadAI needs more specialization20:24:08 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman opened pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/9820:24:48 <xarick> StopAI removes the config from the company, which is the config I made changes to the parameters20: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-274640573520: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 StopAI20:26:08 <xarick> this sucks20:26:13 <xarick> didn't use to do this20:26:39 <xarick> how do I fix this20:28:21 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman updated pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/9820:31:26 <_glx_> it's explicitely done that way, changing parameters in running AI doesn't affect original parameters for the slot20: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 clean20:33:21 <xarick> well, ... I am looking for restoring this functionality20:33:28 <xarick> or a workaround20: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 ai20:37:23 <xarick> that doesn't need to copy over anything20:50:56 <_glx_> ok even `EncodedString GetEncodedText();` is not matched, very weird20:52:01 *** WormnestAndroid has quit IRC (Remote host closed the connection)20:52:02 *** WormnestAndroid has joined #openttd20: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 invisible21:04:38 <_glx_> I hate debugging awk21: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 in21:07:00 <_glx_> and I don't understand what it actually does21:08:36 <DorpsGek> [OpenTTD/OpenGFX] matthijskooijman updated pull request #98: Script-Fu: Support GIMP3 in addition to GIMP2 https://github.com/OpenTTD/OpenGFX/pull/9821:12:53 <_glx_> hmm I think I see, it assumes function body starts on next line21:14:15 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1353476967051034714/image.png?ex=67e1cb27&is=67e079a7&hm=e7f12689ad825e499afd9750c82587f701d954672a919ec4ae597ef407299b59&21:14:19 <_glx_> seems to confirm21: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-270881310721: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 that21:49:06 <xarick> I seriously doubt it, it's just that nobody else reported21:53:01 <xarick> need to test this further21:53:27 <xarick> what will the restart command do21:59:09 *** keikoz has joined #openttd22:05:43 <xarick> grr... it's not working anymore22:08:12 <xarick> why can't I do something so simple22: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/1388022: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/1366122:24:10 *** keikoz has quit IRC (Ping timeout: 480 seconds)22:24:27 <xarick> I don't understand what I'm doing wrong22: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/1388222:25:25 <xarick> `AIConfig *config = GetGameSettings().ai_config[company]; ` GetGameSettings() is doing something22:25:33 <xarick> the change doesn't persist22:27:56 <xarick> Container::reference operator[] ?22:28:20 <xarick> ConvertibleThroughBase22:28:24 <xarick> what does this do?22:30:28 <_glx_> ConvertibleThrougBase is a wrapper around StrongType22: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 how22:32:48 <xarick> config = new AIConfig(c->ai_config.get()); this does a copy22: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 place22:36:07 <peter1138> Have you tried learning what pointers are?22:36:38 <xarick> hmm i guess I didn't22:39:45 <_glx_> maybe take a look at AIConfig::GetConfig()22:47:46 <_glx_> also be careful to not leak memory22:53:01 <xarick> ah, I think I did it22:53:20 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353501900393283624/image.png?ex=67e1e25f&is=67e090df&hm=4528cea4db502647378233ee99336ee6c880554eb520615d27244d588f02c088&22:53:20 <xarick> double pointer22:53:48 <xarick> I did it, but I didn't understand it22:53:54 <xarick> as long as it works, fine22: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 it23:01:41 <xarick> okay23:04:04 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1353504603844509748/image.png?ex=67e1e4e4&is=67e09364&hm=f5c04420795d5b93ca224220ca17590333462cb4e7a843e4a8a44d20f972bbf1&23:06:10 <xarick> nop, asserted23:06:57 <_glx_> it doesn't become nullptr magically23:07:14 <_glx_> but it's deleted23:08:15 <_glx_> cleaner way would be to use unique_ptr23:08:38 <_glx_> instead of new/delete23:11:26 <xarick> can't do it23:12:32 <_glx_> yeah it would be a big change all over the code23: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 it23:13:37 <_glx_> since you put a new one immediately23: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 :l23: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/13883continue to next day ⏵