IRC logs for #openttd on OFTC at 2025-02-08
            
00:53:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13492: Codechange: remove synthesized operators https://github.com/OpenTTD/OpenTTD/pull/13492#pullrequestreview-2603160810
00:55:09 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13472: Codechange: put SourceType and SourceID into Source struct https://github.com/OpenTTD/OpenTTD/pull/13472#pullrequestreview-2603161355
01:20:06 *** gelignite has quit IRC (Quit: Stay safe!)
01:29:47 *** Flygon has joined #openttd
03:00:05 *** herms has quit IRC (Quit: bye)
03:03:56 *** herms has joined #openttd
03:07:10 *** Wormnest has quit IRC (Quit: Leaving)
03:54:22 *** godbed has joined #openttd
03:54:31 *** godbed_ has joined #openttd
03:57:54 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:57:54 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:06:27 *** godbed_ is now known as debdog
04:41:13 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/95bfd68341e8f05dcba7827e89a7804f2714a2e6
04:41:14 <DorpsGek> - Update: Translations from eints (by translators)
05:07:40 *** debdog has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:13:16 *** keikoz has joined #openttd
05:22:41 *** godbed is now known as debdog
05:37:28 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13472: Codechange: put SourceType and SourceID into Source struct https://github.com/OpenTTD/OpenTTD/pull/13472
05:37:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13492: Codechange: remove synthesized operators https://github.com/OpenTTD/OpenTTD/pull/13492
05:44:54 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13491: Codechange: Use EnumBitSet for CargoClasses. https://github.com/OpenTTD/OpenTTD/pull/13491#pullrequestreview-2603312671
05:57:35 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/13212658039
06:01:04 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/13212658039
06:01:56 <Rubidium> nice... if CDN upload fails to upload one file, you can't rerun it because it'll fail on the files that already exist
06:18:22 *** keikoz has quit IRC ()
06:20:34 *** keikoz has joined #openttd
08:06:58 <peter1138> Yup.
08:08:34 *** nielsm has joined #openttd
08:16:24 <peter1138> Hurrah, coffee is coming.
08:21:31 <truebrain> \o/
08:24:05 <andythenorth> is my coffee coming too?
08:27:02 <kuhnovic> Why am I drinking tea?
08:28:48 <Rubidium> because you don't like coffee?
08:29:13 <kuhnovic> But I do. A lot.
08:34:15 <peter1138> Because tea is good as well.
08:34:31 <peter1138> I appear to have chickened out of doing the outside thing.
08:34:34 <Rubidium> peter1138: you're not working on making CompanyMask an EnumBitSet, right? I'm thinking of converting that to EnumBitSet now, and later try to make EnumBitSet work with PoolID (specifically CompanyID). Potentially by just defining `to_underlying` for CompanyID.
08:36:13 <peter1138> I haven't touched CompanyMask. Company is a bit weird :)
08:36:58 <peter1138> But also, I'm not sure things that are full Enums should become EnumBitSets.
08:37:01 <peter1138> ...
08:37:03 <peter1138> *aren't
08:37:18 <peter1138> Such typos resulting in opposite meaning.
08:43:23 <Rubidium> good point, some superclassing will probably solve that ;)
08:43:52 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13440: Codechange: add conversion helpers to VehicleListIdentifier https://github.com/OpenTTD/OpenTTD/pull/13440#pullrequestreview-2603395627
08:46:43 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13491: Codechange: Use EnumBitSet for CargoClasses. https://github.com/OpenTTD/OpenTTD/pull/13491
09:09:05 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13440: Codechange: add conversion helpers to VehicleListIdentifier https://github.com/OpenTTD/OpenTTD/pull/13440
09:14:13 *** Wolf01 has joined #openttd
09:14:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361#pullrequestreview-2603400342
09:15:01 <andythenorth> time to make coffee πŸ˜›
09:15:02 <andythenorth> oof
09:15:35 <peter1138> I made one for you but it was intercepted.
09:15:57 <peter1138> I probably need food.
09:23:59 <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
09:31:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073
09:34:22 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361#pullrequestreview-2603403194
09:41:39 <andythenorth> is scrambled eggs food?
09:44:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361#pullrequestreview-2603404713
09:44:45 <andythenorth> I ated the egss
09:49:10 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361#pullrequestreview-2603405453
09:56:04 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361
09:57:36 <Rubidium> owh... having to rebase it to master to make it pass the commit checker
09:58:08 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13361: Codechange: use std::string as backing for textbuf https://github.com/OpenTTD/OpenTTD/pull/13361
10:02:37 <xarick> hi
10:03:46 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
10:04:34 *** mindlesstux has joined #openttd
10:14:30 <peter1138> Bacnoms
10:21:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337730078204887062/image.png?ex=67a881b8&is=67a73038&hm=0f764519f5b55bc8509834aebb82b6acdeb0f5a868890f5ff2c1e28d881de203&
10:21:44 <xarick> omg, what is the point of this
10:23:05 <xarick> https://github.com/smurfix/openttd-no-op/blob/main/main.nut
10:23:21 <xarick> why is this allowed
10:24:25 <peter1138> > 1,335,645 Commits.
10:24:34 <peter1138> We're a bit behind "some other" projects.
10:24:58 <peter1138> It's an AI that does nothing.
10:25:04 <peter1138> Is that a problem?
10:25:57 <xarick> there was already 3 Idle AIs
10:27:16 <peter1138> Now you can run one of each and compare how well they behave.
10:29:48 <xarick> ok... fine
10:30:14 <xarick> it would be more exciting to get another competing ai though
10:32:10 <xarick> i can't imagine how openttd would be like if it was a popular game
10:32:40 <xarick> content download would be a very very bad place
10:34:22 <peter1138> As opposed to just a very bad place? :)
10:36:17 <xarick> it would be miserable to get through the mess just to find something remotely good
10:45:31 <Rubidium> if it were really popular, there likely would be more people scratching the itch of improving that part... making it potentially less miserable
10:49:56 <xarick> peter, weren't there more cargo classes introduced recently?
10:50:30 <xarick> script_cargo.hpp is missing the new ones
10:51:21 <andythenorth> I thought they had to be backed out?
10:52:09 <peter1138> We haven't backed it out, but we haven't added them to the script API yet either.
10:52:38 <andythenorth> did it break grfs?
10:52:43 <andythenorth> maybe we had a ticket πŸ˜›
10:52:44 <peter1138> Some, yes.
10:53:10 <peter1138> https://github.com/OpenTTD/OpenTTD/issues/13283
11:20:50 <andythenorth> I mean...who even made that grf?
11:20:52 <andythenorth> don't they maintain it
11:24:05 *** tokai has quit IRC (Quit: c('~' )o)
11:26:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13493: Codechange: make Company mask a BitSet https://github.com/OpenTTD/OpenTTD/pull/13493
11:29:48 <peter1138> Yeah, I did think about adding empty .Any() and .None().
11:32:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13493: Codechange: make Company mask a BitSet https://github.com/OpenTTD/OpenTTD/pull/13493#pullrequestreview-2603545430
11:36:29 <peter1138> RailTypes and RoadTypes also fall into this category.
11:37:51 <peter1138> And CargoTypes. I have plans for that which also involve a custom BitSet but they're a bit more experimental.
11:42:34 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13493: Codechange: make Company mask a BitSet https://github.com/OpenTTD/OpenTTD/pull/13493
11:43:55 <xarick> im getting warnings while building?
11:45:06 <peter1138> Exciting.
11:45:26 <xarick> might be a me problem
11:45:48 <peter1138> Probably, but: saying you have warnings does not help anyone.
11:46:33 <peter1138> You must be aware by now that we run everything through a CI/CD that alerts us to general warnings which we have to fix.
11:46:35 <xarick> nop, i didn't touch this part
11:46:35 <xarick> > 11:43:28:277 In file included from E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\out\build\x64-Clang-Release\CMakeFiles\openttd_lib.dir\cmake_pch.hxx:5:
11:46:35 <xarick> > 11:43:28:277 In file included from E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\src\stdafx.h:64:
11:46:35 <xarick> > 11:43:28:277 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\memory(3302,9): warning : delete called on non-final 'StreamingVoiceContext' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
11:46:35 <xarick> > 11:43:28:277 3302 | delete _Ptr;
11:46:36 <xarick> > 11:43:28:277 | ^
11:46:36 <xarick> > 11:43:28:277 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\memory(3412,13): note: in instantiation of member function 'std::default_delete<StreamingVoiceContext>::operator()' requested here
11:46:38 <xarick> > 11:43:28:278 3412 | _Mypair._Get_first()(_Mypair._Myval2);
11:46:38 <xarick> > 11:43:28:278 | ^
11:46:40 <xarick> > 11:43:29:123 E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\src\sound\xaudio2_s.cpp(110,47): note: in instantiation of member function 'std::unique_ptr<StreamingVoiceContext>::~unique_ptr' requested here
11:46:40 <xarick> > 11:43:29:123 110 | static std::unique_ptr<StreamingVoiceContext> _voice_context;
11:46:42 <xarick> > 11:43:29:123 | ^
11:46:42 <xarick> > 11:43:29:123 1 warning generated.
11:46:57 <xarick> derp, i'll post in a gist
11:47:33 <xarick> <https://gist.github.com/SamuXarick/1cb0292c19d63afc7cffed0653c0582a>
11:48:07 <peter1138> Nice.
11:48:16 <peter1138> Inheriting from API classes is probably not a good idea.
11:48:50 <peter1138> But they call it an interface, which suggests it's designed to be.
11:51:00 <_glx_> Too recent VS maybe
11:51:21 <xarick> oh i built with clang
11:51:27 <xarick> forgot to mention
11:51:54 <xarick> clang, release
11:52:21 <_glx_> Should not matter
11:53:19 <peter1138> Add `~StreamingVoiceContext() {}` to xaudio2_s.cpp:59
11:53:37 <peter1138> Not sure if it'll do anything of course.
11:53:56 <_glx_> Anyway this might be a recent change about malloc/free
11:54:12 <peter1138> The example at https://learn.microsoft.com/en-us/windows/win32/xaudio2/how-to--use-source-voice-callbacks has a destructor specified like that.
11:54:18 <peter1138> Yes, it's because of malloc/free to unique_ptr.
11:54:59 <peter1138> Hopefully xarick will be able to read and add that line to see if it fixes i.t
11:55:32 <xarick> ^_
11:55:46 <peter1138> Hopefully I'll be able to write "it".
11:59:59 <xarick> building with ~StreamingVoiceContext() {}, 3 minutes
12:02:11 <xarick> nop, still a warning
12:02:21 <xarick> let me check if it says something different
12:02:46 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13494: Codechange: introduce ReferenceThroughBaseContainer https://github.com/OpenTTD/OpenTTD/pull/13494
12:03:59 <peter1138> (Also, what's all the STDMETHOD_() for...)
12:04:20 <peter1138> Yeah, checking if it's the same warning would be useful :p
12:05:10 <xarick> <https://gist.github.com/SamuXarick/589ead214f94099fde8e0d537d6ee52f#file-gistfile1-txt-L637-L650>
12:05:25 *** virtualrandomnumber has joined #openttd
12:05:45 *** virtualrandomnumber has quit IRC ()
12:06:17 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337756389577195560/image.png?ex=67a89a39&is=67a748b9&hm=27aece1c3a34fec040dda0214c4cb398b469d8106f4370c16a82f5610703adc9&
12:06:17 <xarick> did I place it in the right location
12:07:22 <xarick> building release with clang takes more time than msvc
12:07:31 <peter1138> Anywhere in the class is good enough.
12:07:34 <xarick> about 4 minutes 😦
12:07:47 <xarick> send me a 16 core cpu plz
12:07:49 <peter1138> So build with MVSC then?
12:07:58 <xarick> ok, let me try
12:08:15 <LordAro> could be something only clang picks up
12:08:20 <LordAro> xaudio won't get compiled with clang normally
12:13:10 <xarick> no warnings with msvc
12:13:54 <peter1138> With or without that addition?
12:14:17 <xarick> without the addition
12:16:06 <peter1138> Okay, using the `STDMETHOD_` stuff is a coding mistake, that's intended for defining an interface.
12:16:14 <peter1138> (That won't affect this issue though)
12:18:12 <xarick> no warning with msvc either with the addition
12:18:17 <xarick> so it's clang
12:18:23 <xarick> only clang
12:19:24 <peter1138> If the base class doesn't have a virtual destructor, clang is correct.
12:19:40 <peter1138> But also, if the base class doesn't have a virtual destructor, not much can be done about it.
12:20:14 <xarick> testing x64-clang-debug see if it's any different
12:23:31 <xarick> yeh, still same warning, without the addition
12:24:42 <peter1138> https://devblogs.microsoft.com/oldnewthing/20200910-00/?p=104203
12:24:48 <peter1138> Weird shit behind the scenes.
12:25:04 <peter1138> > The `__declspec(novtable)` specifier tells the compiler not to bother setting up the vtable for this class during construction and destruction
12:25:38 <LordAro> clang false positive then!
12:26:46 <peter1138> https://devblogs.microsoft.com/oldnewthing/20200911-00/?p=104205
12:27:03 <peter1138> And this one has a different set of macros for the implementation.
12:30:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337762419497369722/image.png?ex=67a89fd7&is=67a74e57&hm=d6ba5bb54cfec5445dd0e4c8ed3e2c9e5a98583b5efb01d8c65977325b3d3171&
12:30:15 <xarick> STDMETHOD_
12:30:22 <xarick> there's 4
12:36:56 <peter1138> Maybe we should do pull requests via email.
12:39:37 <Rubidium> why?
12:39:46 <LordAro> works for LT
12:39:58 <peter1138> Just to make everything more awkward.
12:40:12 <peter1138> Weed out the cruft. Stifle development. Etc.
12:40:24 <peter1138> (No, it was not a serious suggestion.)
12:48:55 *** SigHunter has quit IRC ()
12:51:34 *** SigHunter has joined #openttd
13:17:23 <michi_cc> But it's distributed! And nobody needs somebod to host anything! (Except the whole e-mail servers, git infrasturcture, websites etc, but who counts that?) πŸ˜›
13:27:10 *** kuka_lie has joined #openttd
13:33:07 *** gelignite has joined #openttd
13:35:19 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337778792873066618/image.png?ex=67a8af16&is=67a75d96&hm=c018420cfb1b437af3f17c2b973c482ea7328dea7a66bc7f8c581c8cafe164d5&
13:35:19 <xarick> I wanna rebase this so much
13:49:10 *** yiffgirl has joined #openttd
13:49:10 <yiffgirl> has anyone built openttd on windows with just clang before?
13:49:10 <yiffgirl> i have zero interest in using visual studio.
13:54:03 <xarick> glx implemented a few of my suggestions
13:55:00 <xarick> but i still can't configure 15 ais from main menu
13:55:19 <xarick> there's still no spectator mode
13:56:25 <xarick> there's now a bug I recently discovered of configurations resetting too much
13:56:39 <xarick> like... it was only for savegame purposes
13:56:49 <xarick> not for in-game purposes
13:58:36 <xarick> the whole Company storing the config thing feels a bit too much
13:59:16 <xarick> but it was a difficult situation to deal with
14:00:00 <xarick> deviation was bad
14:00:11 <xarick> then some random stuff was eliminated
14:00:58 <xarick> start date was reworked for the better at least
14:02:43 <xarick> selecting a version of an AI was implemented, I like this feature
14:03:20 <xarick> multiple ai debug windows implemented, i like it
14:04:32 <xarick> so... yeah, i have to rebase over all these new features
14:04:45 <xarick> sorry for my rambling
14:13:31 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13495: Codechange: chance Source into a class with conversion helpers https://github.com/OpenTTD/OpenTTD/pull/13495
14:15:00 <peter1138> That was shortlived.
14:15:38 <Rubidium> small-and-simple steps, right?
14:16:23 <_glx_> clang warning silenced
14:17:04 <Rubidium> hmm... why is GCC12 so fracking forgiving?
14:18:44 <peter1138> Yeah... I just finished rebasing to the Source that just got changed again :D
14:18:54 <peter1138> Not complaining. Amused.
14:19:47 <Rubidium> now you know how I felt about the news changes recently :D
14:22:39 <xarick> 36 conflicts to solve
14:23:13 <xarick> and of course it involves NWidgets
14:23:21 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #13496: Fix 043d1ac: [Win32] clang-cl warning about missing virtual destructor https://github.com/OpenTTD/OpenTTD/pull/13496
14:23:49 <_glx_> just reading the error message tells what to do πŸ™‚
14:24:42 <xarick> Nuggets, Nwidgets
14:25:28 <xarick> i wasn't told to write virtual
14:25:49 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13496: Fix 043d1ac: [Win32] clang-cl warning about missing virtual destructor https://github.com/OpenTTD/OpenTTD/pull/13496#pullrequestreview-2603858292
14:26:09 <_glx_> "delete called on non-final 'StreamingVoiceContext' that has virtual functions but non-virtual destructor" seems explicit enough
14:26:11 <truebrain> "chance Source .." or "change Source"? Hihi, sorry Rb πŸ˜›
14:27:31 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13496: Fix 043d1ac: [Win32] clang-cl warning about missing virtual destructor https://github.com/OpenTTD/OpenTTD/pull/13496
14:28:31 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13496: Fix 043d1ac: [Win32] clang-cl warning about missing virtual destructor https://github.com/OpenTTD/OpenTTD/pull/13496#pullrequestreview-2603858791
14:29:23 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13495: Codechange: change Source into a class with conversion helpers https://github.com/OpenTTD/OpenTTD/pull/13495
14:29:39 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13496: Fix 043d1ac: [Win32] clang-cl warning about missing virtual destructor https://github.com/OpenTTD/OpenTTD/pull/13496#pullrequestreview-2603858964
14:31:29 <_glx_> hmm the other option could be to make the class final
14:32:33 <_glx_> yup works too, I'll do that instead
14:32:38 <peter1138> Hmm, doesn't the virtual destructor have to be on the base class?
14:33:21 <peter1138> xarick, I didn't ask you to, as the example I looked at didn't have it either.
14:33:31 <_glx_> base class is an interface
14:38:31 <DorpsGek> [OpenTTD/OpenTTD] glx22 dismissed a review for pull request #13496: Fix 043d1ac: [Win32] Mark StreamingVoiceContext final to silence a clang-cl warning https://github.com/OpenTTD/OpenTTD/pull/13496#pullrequestreview-2603858791
14:38:34 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13496: Fix 043d1ac: [Win32] Mark StreamingVoiceContext final to silence a clang-cl warning https://github.com/OpenTTD/OpenTTD/pull/13496
14:39:43 <DorpsGek> [OpenTTD/OpenTTD] mrslate420 commented on issue #13443: [Bug]: "content downloading" never clears on NewGRF download box https://github.com/OpenTTD/OpenTTD/issues/13443
14:41:37 <peter1138> Why is it a unique_ptr anyway?
14:41:44 <_glx_> peter1138: well the example didn't use `override`
14:42:36 <_glx_> and it probably always used `cl` only
14:43:12 <_glx_> it is unique_ptr to remove malloc/free
14:44:27 <_glx_> https://github.com/OpenTTD/OpenTTD/commit/043d1ac111ffb3ec62e3bcd263f1294726a7389e <-- it used to have `virtual ~StreamingVoiceContext()`
14:49:42 <_glx_> hmm but since we use `#define STDMETHOD_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method` maybe the virtual destructor is a better solution
14:54:50 <andythenorth> another reason to refactor Horse πŸ™‚ https://docs.python.org/3/library/dataclasses.html
14:54:57 <andythenorth> sidequests multiply
15:10:03 <peter1138> Well.
15:10:20 <peter1138> Hmm, perhaps I should rename things.
15:11:30 <peter1138> Also fix string encoding.
15:12:31 <peter1138> Raw strings are written as `:"x"`
15:12:40 <peter1138> What if x contains a "...
15:13:43 <peter1138> (This should also be a problem for GS strings, I think.)
15:16:33 <peter1138> `GetEncodedString(STR_JUST_RAW_STRING, "\":04:\"")`
15:26:00 *** Wormnest has joined #openttd
15:40:50 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13496: Codefix 043d1ac: [Win32] Restore virtual destructor of StreamingVoiceContext https://github.com/OpenTTD/OpenTTD/pull/13496
15:43:14 <andythenorth> Is there even a main quest?
15:43:45 <_glx_> peter1138: should be fine, we handle `\"` as it should
16:00:40 *** rotterdxm has joined #openttd
16:00:40 <rotterdxm> If I may make a suggestion for GUI QoL; can we make the pause button more visually obvious (like red/black) because it's hard to see on my new 34" monitor
16:02:19 <rotterdxm> https://cdn.discordapp.com/attachments/1008473233844097104/1337815786366177402/image.png?ex=67a8d18a&is=67a7800a&hm=3c2bdb36b16fd14e8ffe62dcc979a49d8783f27aab3e4fd1df3c6b0c103dd01d&
16:02:19 <rotterdxm> this is what I mean, it's too subtle
16:09:14 <LordAro> i'm not sure i've seen a 'button shading not dark enough' complaint before
16:09:36 <LordAro> (which isn't to indicate that it's not valid)
16:10:07 <LordAro> we have dark grey/black shading for currently selected drop down, perhaps that could be used?
16:12:05 <gwyd4016> I have to say I wouldn't mind having some more contrast when paused
16:13:05 <gwyd4016> Might be more conspicuous if the pause icon blinked, the background is quite obscured by the sprite itself
16:13:28 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13496: Codefix 043d1ac: [Win32] Restore virtual destructor of StreamingVoiceContext https://github.com/OpenTTD/OpenTTD/pull/13496#pullrequestreview-2603898037
16:20:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337820328851935363/image.png?ex=67a8d5c5&is=67a78445&hm=73424df178089f748d5705e80a7825ef93255ad5c8815e2587f01e221b4b4839&
16:20:22 <xarick> uh...
16:20:28 <xarick> I forgot the details
16:20:45 <xarick> how do i detect a config is random now?
16:27:40 <_glx_> it's a useless info for a running script
16:28:17 <xarick> 😦
16:28:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337822344798011475/image.png?ex=67a8d7a6&is=67a78626&hm=a713a0b59a11c0fc548db33489d32836333f07226336fc20a48ea014b0c389f3&
16:28:22 <xarick> well, RIP
16:28:28 <xarick> can't reabse
16:28:31 <andythenorth> Think ttd graphics pause is more obvious
16:33:13 <xarick> it was important enough for me
16:33:26 <xarick> i could tell which AIs were started as random
16:33:29 <xarick> from gui
16:33:40 <_glx_> ``` if ((_game_mode != GM_NORMAL && i == 0) || (_game_mode == GM_NORMAL && Company::IsValidHumanID(i))) {
16:33:40 <_glx_> text = STR_AI_CONFIG_HUMAN_PLAYER;
16:33:40 <_glx_> } else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != nullptr) {
16:33:40 <_glx_> SetDParamStr(0, AIConfig::GetConfig((CompanyID)i)->GetInfo()->GetName());
16:33:40 <_glx_> text = STR_JUST_RAW_STRING;
16:33:41 <_glx_> } else {
16:33:41 <_glx_> text = STR_AI_CONFIG_RANDOM_AI;
16:33:43 <_glx_> }
16:33:52 <_glx_> that's how it's done
16:35:25 <xarick> im printing more than just text
16:35:37 <_glx_> and?
16:35:50 <_glx_> this code detects random or not
16:37:09 <xarick> oh, I see
16:37:20 <_zephyris> rotterdxm: Try using opengfx2 with a larger ui scale instead of opengfx+ big gui? (making quite a few guesses about your setup)
16:40:49 <_zephyris> The ogfx+ big gui isn't great icon design, and forcing larger icons with bigger sprites doesn't scale the bevels, which is what gives the visual feedback.
16:42:22 <_glx_> and it's done that way since the introduction of the window in https://github.com/OpenTTD/OpenTTD/commit/3d35b3c2cc8b227d0cc2df61b4e8dbd70b6a78f1#diff-65e506358d200c3adbd2679e9f04fdb017459a79f08852173dd9fc5964859dbe
16:42:28 <peter1138> Hmm
16:43:16 <peter1138> Accidental nap.
16:43:37 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #13496: Codefix 043d1ac: [Win32] Restore virtual destructor of StreamingVoiceContext https://github.com/OpenTTD/OpenTTD/pull/13496
16:46:27 <peter1138> _glx_, well, I don't, apparently.
16:46:40 <peter1138> `STR_ENCODED_STRING :Test test {RAW_STRING} -- {COMMA} -- {RAW_STRING}`
16:46:54 <rotterdxm> _zephyris: https://github.com/zephyris/opengfx2 you mean this?
16:47:02 <peter1138> `GetEncodedString(STR_ENCODED_STRING, "Oh\":0x100:\"Pants");`
16:47:37 <peter1138> > Test test Oh -- 256 -- Pants
16:48:22 <peter1138> Maybe something on the GS side handles ", but my EncodedString does not.
16:49:27 <_glx_> FormatString has code to handle `\"` as a normal char, while `"` itself is a marker for begin/end
16:49:43 <andythenorth> peter1138: Happens πŸ˜›
16:50:16 <peter1138> _glx_, FormatString is the decoding, which relies on being encoded correctly.
16:50:18 <_zephyris> rotterdxm: It's on bananas too
16:51:08 <peter1138> `void operator()(const std::string &arg) { fmt::format_to(this->output, ":\"{}\"", arg); }`
16:51:33 <peter1138> Is obviously not going to be treating any `"` characters in `arg` specially.
16:52:20 <_glx_> but to have `"` in arg it needs to be escaped or squirrel will error
16:52:55 <_glx_> the language itself takes care of strings
16:52:59 <rotterdxm> _zephyris: do I need to uninstall opengfx bigGui?
16:53:33 <_glx_> `Squirrel's strings, behave like C or C++, are delimited by quotation marks(") and can contain escape sequences(\t,\a,\b,\n,\r,\v,\f,\\,\",\',\0,\xhhhh). `
16:54:12 <_glx_> so you can't actually have unquoted `"` comming from squirrel
16:54:27 <_zephyris> rotterdxm: Yeah, that overrides the base set
16:55:19 *** kuka_lie has quit IRC (Quit: Lost terminal)
16:55:40 <rotterdxm> Another thing, filter for *active* newGRFs would be welcome? it's there for the active ones.
16:56:19 <_glx_> if you need a filter you have too many active ones πŸ™‚
16:57:18 <rotterdxm> πŸ˜‰
16:58:01 <_glx_> you can resize the window so it shows two huge columns
16:58:13 <rotterdxm> OH!
16:58:48 <_glx_> and CTRL clic on one of the buttons on top to save the new size as default
17:00:05 <rotterdxm> https://cdn.discordapp.com/attachments/1008473233844097104/1337830324725616740/image.png?ex=67a8df15&is=67a78d95&hm=e22c0a49bc9c6cdd24347e27270ee620df0792ed870d1ac593d770145248d9fe&
17:00:05 <rotterdxm> ironically the first thing that caught my eye was this: best of both worlds
17:00:20 <peter1138> _glx_, are you saying that if I have, in Squirrel, a raw string "Test \" String", the representation of that string on the OpenTTD side will be "Test \\\" String"?
17:01:15 <_glx_> in squirrel you'll need to write it as "Test \" String" for it to be a valid squirrel string
17:02:03 <_glx_> hmm I need to check how it works with all the indirection though
17:05:12 <peter1138> I am correct.
17:05:26 <peter1138> Of course you have to write it like that in Squirrel.
17:05:38 <peter1138> That does not mean that that it's still like that when it in C++.
17:06:02 <peter1138> `STR_TEST :Test {RAW_STRING} -- {COMMA} -- {RAW_STRING} String
17:06:05 <peter1138> `
17:06:14 <peter1138> GSTown.SetText(this.town, GSText(GSText.STR_TEST, "What \":100:\"Is this"));
17:06:30 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1337831939352039476/image.png?ex=67a8e096&is=67a78f16&hm=77a729e7242d3f4338f69ba4358a07b8ab4c6d1864efa7db88319729f4fdc992&
17:07:29 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1337832185868193903/image.png?ex=67a8e0d0&is=67a78f50&hm=ed36353b21d72473315a723727e512f68ffd729a1af8347649ec9d6e91834aa4&
17:07:29 <_glx_> GSTown.SetText(0, GSText(GSText.STR_RAW, "Test \" String")); with STR_RAW :{RAW_STRING}
17:07:57 <_glx_> something doesn't work indeed
17:08:08 <peter1138> It's not encoded correctly.
17:08:17 <peter1138> There's no escaping.
17:08:25 <_glx_> yeah the escape is lost
17:08:33 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337832454865813665/image.png?ex=67a8e110&is=67a78f90&hm=97d16f8c9d78359f1bcc493a4a1a70ff09b22fa502f20e5e59b61d577fe2e3bd&
17:08:33 <xarick> this doesn't work
17:09:04 <xarick> none of the AIs were started as random
17:09:10 <xarick> but they get the icon
17:09:13 <peter1138> The escape worked as it should, there is no reason to assume the the escape would still exist once it's been parsed by Squirrel.
17:09:47 <xarick> and im still missing the start/stop toggle button
17:09:49 <peter1138> This is fine. It just means I was correct in thinking this code is buggy and I need to fix it before I go further with EncodedStrings :-)
17:09:49 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1337832775947911299/image.png?ex=67a8e15d&is=67a78fdd&hm=7193a573757f4f5656344a143befc04b1210999c709971873f324bc2789a4560&
17:09:49 <_glx_> with GSTown.SetText(0, GSText(GSText.STR_RAW, "\t\tTest \" String"));
17:11:05 <_glx_> ScriptText uses StrMakeValid
17:11:17 <_glx_> which doesn't add quotes
17:12:45 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13402: Codechange: make pool item indices strongly typed https://github.com/OpenTTD/OpenTTD/pull/13402
17:13:11 <peter1138> Damn, I was hoping fmt's `{:?}` would do the job, but no :)
17:13:50 <peter1138> _glx_, no reason it should. `"` is a valid character inside a string.
17:14:09 <peter1138> It's only string encoding that needs to do special things with it.
17:14:13 <xarick> when i click Reload AI on a randomly started AI, it starts a random script, so this information is still stored somewhere, where did u put it at
17:14:44 <peter1138> `value.replace("\"", "\\\"")`. but of course that isn't valid C++ :)
17:18:16 <peter1138> I think we're past the point of trying to avoid string copies now :S
17:18:23 <peter1138> WELL past.
17:18:43 *** gelignite has quit IRC (Quit: Stay safe!)
17:19:07 *** aperezdc has quit IRC (Remote host closed the connection)
17:20:13 *** aperezdc has joined #openttd
17:21:36 <peter1138> I think we can do this more efficiently.
17:21:59 <_glx_> fmt::format will copy anyway
17:22:30 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1337835965661708289/image.png?ex=67a8e456&is=67a792d6&hm=c0b3ea99d41aec22e7f641eaa7b68db05437eb23de19de30db5e512f23f34d4f&
17:22:33 <peter1138[d]> Oof. Almost.
17:23:01 <peter1138> The decoder doesn't handle `\"` either.
17:23:06 <peter1138> But still, this is less broken.
17:23:20 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1337836177306161242/image.png?ex=67a8e488&is=67a79308&hm=45fc68be626cdb5dd820712a32ebee01a0aef608981841c6772613a59aa557b9&
17:23:36 <peter1138> Basically outputing char by char, not using fmt:: at all.
17:23:42 <_glx_> decoder skips \\"
17:24:04 <peter1138> It skips it, but it needs to handle it as ".
17:24:06 <_glx_> ie left it untouched in the string
17:24:28 <peter1138> Or rather, output it as.
17:25:04 <peter1138> Anyway, what I meant with string copying was using a generic function to replace " with \" first.
17:25:11 <peter1138> Which would be even more copies.
17:25:26 <peter1138> At least this way is just output char by char and not making extra copies everywhere.
17:26:16 <peter1138> And
17:26:36 <peter1138> Replacing `void operator()(const std::monostate &) { fmt::format_to(this->output, ":"); }` with `void operator()(const std::monostate &) { *this->output = ':'; }` is a bit more efficient.
17:28:48 <peter1138> But still, even with the decoding not working correctly, this is better because it now handle break the in-band encoding.
17:31:28 <peter1138> Instead of band-aiding this, maybe we can use a more robust method to encode strings.
17:31:49 <peter1138> Although these strings can be stored in save games, so that's a bit awkward.
17:33:53 <peter1138> Like, EndianBuffer is more robust, but that doesn't encode the argument types into the buffer.
17:36:42 <_glx_> using something other than `""` to enclose rawstring could help
17:37:10 <_glx_> like a special SCC
17:38:17 <_glx_> will require conversion when loading saves
17:38:23 <peter1138> That just means you need to escape (or filter) a different character.
17:38:54 <peter1138> And makes detection harder because it's no longer a single byte character. (Unless you go with something < 32)
17:39:08 <peter1138> And yes, ASCII does have the FS code.
17:39:55 <peter1138> 28 - file separator, 29 - group separator, 30 - record separator, 31 - unit separator.
17:42:08 <peter1138> Doesn't help with encoding the parameter type mind you.
17:42:49 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13497: Codechange: make all pool item indices strongly typed https://github.com/OpenTTD/OpenTTD/pull/13497
17:43:29 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 closed pull request #13416: Codechange: make some types used as ID in pools enums https://github.com/OpenTTD/OpenTTD/pull/13416
17:43:56 <peter1138> Hmm.
17:44:14 <_glx_> STX and ETX for raw strings ?
17:45:07 <peter1138> With EncodedString I'd like to have more options for encoding different types.
17:45:52 <peter1138> StringParameterData only takes number or string right now, but given Rubidium's work, I could forsee it handling things like number, string, depotid, stationid ...
17:46:18 <_glx_> STX(byte for type)valueRTX
17:46:33 <peter1138> Not saying that it would be done, but better to keep options open.
17:47:17 <peter1138> I have a patch that puts a vector in the StringParameterData variant. Encoding that could be a problem anyway :D
17:48:29 <peter1138> Hmm, but then if the data to be encoded is binary then it still has collision problems.
17:48:36 <peter1138> Base64? heheh
17:49:20 <_glx_> like `:<SCC_ENCODED><StringID>` could become `STX<SCC_ENCODED><StringID>ETX`
17:50:03 <peter1138> Hmm, interesting point.
17:50:20 <peter1138> Ah, it's UTF-8, not interesting :)
17:51:04 <_glx_> integers would go from `:<number>` to `STX<number_type><number>ETX`
17:51:47 <peter1138> Imagine for some reason I had a string parameter that is an array, containing the values 0x00 through to 0x3F.
17:52:34 <peter1138> STX/ETX would conflict there.
17:52:45 <peter1138> Hmm, unless it's just encoded as hex numbers.
17:53:01 <peter1138> Uses more space but is in keeping with the concept of an encoded *string*
17:53:48 <_glx_> and we could split the string before parsing
17:53:49 <peter1138> `:0,1,2,...,3D,3E,3F`
17:54:14 <peter1138> Or equally, `<RS>0,1,2,...,3D,3E,3F`
17:54:27 <peter1138> I think I prefer the idea of RS rather than STX/ETX though.
17:54:37 <peter1138> There's then only one character to search for.
17:55:02 <_glx_> yeah, but still <RS><type marker>...
17:55:56 <peter1138> Also, about the SCC codes.
17:56:08 <peter1138> Sometimes we add them, and thus the numbers change.
17:56:19 *** Flygon has quit IRC (Read error: Connection reset by peer)
17:56:27 <peter1138> Are they ever stored in savegames, or is SCC_ENCODED the only one that ever matters?
17:56:52 <_glx_> SCC_ENCODED is followed by a StringID
17:57:06 <peter1138> That is the answer to a completely different question.
17:57:12 <_glx_> all other SCC are in the pointed string itself
17:57:27 <_glx_> and GSString are compiled at runtime
17:57:54 <_glx_> saved encoded string come from a specific GS
17:58:18 <peter1138> I *think* it's not intended for a saved string to contain any SCC codes (other than SCC_ENCODED)
17:58:23 <_glx_> we assume it doesn't reorder its strings
17:58:54 <peter1138> Yeah, well, that's an incorrect assumption, but not much we can do about that.
17:59:26 <_glx_> it will show "(invalid...)" on use
17:59:34 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1337845294791921684/image.png?ex=67a8ed06&is=67a79b86&hm=3ca05a34f49287d45086c317ea8fa028217f3fdc468a8b39a37b72bd4b1d9b1f&
17:59:38 <peter1138> A bit more than just that.
18:00:40 <_glx_> it's part of the "don't change addons in a running game"
18:01:23 <andythenorth> Unless developing πŸ˜›
18:01:45 <_glx_> yeah but then you expect things to break
18:02:48 <peter1138> Well, in this case it's "don't save a game from a multiplayer server when you don't have the exact version of the script locally"
18:03:40 <_glx_> nothing we can do about that
18:05:37 *** gelignite has joined #openttd
18:05:37 <xarick> save the scripts in the savegame
18:05:43 <xarick> the source code
18:07:22 <_glx_> hmm how does GSTown.SetText() work over network, since it's an encoded string, but the GS is only on the server
18:14:00 <peter1138> Erm.
18:14:05 <Rubidium> using the GSTR chunk in the savegame I guess
18:14:17 <peter1138> >Error: Assertion failed at line 152 of /home/petern/src/openttd/src/script/script_instance.cpp: this->suspend < 0
18:14:20 <peter1138> Hmm.
18:14:38 <Rubidium> i.e. the clients have the complete language files that the server has
18:15:41 <peter1138> Whatever andythenorth's FIRS gs does, it prevents starting a server.
18:16:36 <peter1138> I know it's only experimental, but causing the game to assert is probably bad :D
18:18:23 <_glx_> oh indeed we put all GS strings in the save
18:21:07 <_glx_> and if there's a GS to start it happens at the end of loading and it will reset the loaded strings
18:21:33 <andythenorth> peter1138: β€œExciting”
18:22:59 <_glx_> it forget to sleep at the end of constructor ?
18:23:39 <_glx_> hmm no it's not mandatory
18:25:12 <_glx_> hmm this assert is triggered via command callback
18:25:54 <_glx_> could be ayncmode
18:27:37 <_glx_> ` Tret res = ::Command<Tcmd>::Unsafe((StringID)0, networking ? ScriptObject::GetDoCommandCallback() : nullptr, false, estimate_only, tile, args);`
18:28:02 <_glx_> yeah, not sure we properly tested async mode in network
18:32:49 <xarick> i miss the IsRandom
18:35:03 <_glx_> confirmed it's asyncmode
18:39:57 <xarick> glx, problem i have... the AIInfo is present, it's not nullptr, (the AI is started as random and alive), however it used to be possible to know if a running AI company has started as random
18:40:28 <_glx_> it's started so config is not random at this point
18:41:12 <xarick> i need to restore IsRandom somehow
18:41:37 <xarick> will look at the history, see when it was removed
18:43:07 <peter1138> Let's see if this "just works"
18:43:18 <peter1138> If so, then it's probably worth doing, with a bit of saveload conversion.
18:43:18 <_glx_> AIConfig::GetConfig((CompanyID)i, SSS_FORCE_GAME)->GetInfo()
18:43:51 <_glx_> you don't need IsRandom(), you need to look at the correct info
18:44:57 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler started discussion #13498: RFC: Inter-Company Permissions https://github.com/OpenTTD/OpenTTD/discussions/13498
18:45:51 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1337856940591808752/image.png?ex=67a8f7de&is=67a7a65e&hm=ae97150aaf48aa2e64cca2e4225b1c8f2c1f0e0de1b845a7a024f59df8865859&
18:45:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on discussion #13065: Neutral Stations https://github.com/OpenTTD/OpenTTD/discussions/13065
18:45:57 <peter1138> Yeah...
18:46:44 <peter1138> this->town->text
18:46:45 <peter1138> (std::string) "ξ€€2\U0000001eWhat \":100:\"Is this\U0000001e32\U0000001ePass"
18:46:52 <peter1138> "Oops" :)
18:47:40 <peter1138> So the \U0000001e is the RS, and despite lldb displays is only a byte.
18:48:23 <peter1138> The other characters are SCC_ENCODED_GS, SCC_ENCODED_STRING, SCC_ENCODED_NUMERIC and SCC_ENCODED_STRING again.
18:48:55 <peter1138> They are utf-8 encoded, so are... I think 3 bytes each.
18:49:05 <peter1138> `for (; *p != '\0' && *p != SCC_RECORD_SEPARATOR; ++p) {}`
18:49:14 <peter1138> That is the code for extraction the next parameter.
18:49:38 <peter1138> So it's a lot simpler.
18:51:02 <peter1138> Adding more parameter types is possible now.
19:08:29 <peter1138> Hm.
19:08:59 <peter1138> `(invalid SCC_ENCODED)`
19:09:07 <peter1138> Right, sorting that is next.
19:09:13 <peter1138> Silly side-quests.
19:10:27 <peter1138> Hmm, conversion of `SLE_STR | SLF_ALLOW_CONTROL` I suppose.
19:30:48 <xarick> nop, nothing works
19:40:05 <xarick> an important piece of the puzzle is missing
19:53:52 <peter1138> Alright, conversion is converting.
20:11:27 <xarick> well.. time to drop the random indicator feature
20:11:31 <xarick> for the time being
20:13:01 <_glx_> really `AIConfig::GetConfig((CompanyID)i, AIConfig::SSS_FORCE_GAME)->GetInfo() == nullptr` should indicate the slot is random
20:13:48 <xarick> gonna try one more time
20:14:23 <_glx_> it's not using the company but the config in the slot
20:17:49 <xarick> works, nearly as I'd like
20:18:56 <xarick> need to fix something in ai_core.cpp, not sure how
20:24:25 <Rubidium> with great alacrity?
20:29:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13499: Codechange: Change internal format of encoded strings to improve robustness and allow expansion. https://github.com/OpenTTD/OpenTTD/pull/13499
20:41:39 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13500: Codechange: [Script] Use helper function over direct casting CompanyID https://github.com/OpenTTD/OpenTTD/pull/13500
20:42:06 <Rubidium> ... and that's another side-quest
20:47:12 <xarick> that assert... could it be a script crash instead?
20:47:41 *** D-HUND has joined #openttd
20:51:42 <Rubidium> What's the benefit of a script crash?
20:51:59 <xarick> it's not an openttd crash
20:52:27 <xarick> the script is forced death
20:52:33 <xarick> but openttd continues
20:55:29 <Rubidium> so, because some OpenTTD-developer forgot 'ResolveCompanyID' in the API implementation, the script is killed and as a result the AI-developer does not use the function. And that continues for essentially all AI-developers. Instead of crashing, and fixing the bug in OpenTTD.
20:57:05 <Rubidium> basically with crashing the script you're sweeping the issue under the rug and blaming the AI-developer for doing something wrong, when they haven't done anything wrong!
20:57:21 <peter1138> Oh, is #13500 related to the crash I saw?
20:57:38 <peter1138> Or are talking about different things.
20:58:04 <peter1138> But yes, the game should crash if it's a bug in the game.
20:58:13 <peter1138> If it's a bug in the script, no, of course.
20:58:35 <Rubidium> I doubt your crash is related to #13500
20:58:53 <peter1138> Okay, it was just coincidence then.
20:59:31 <Rubidium> I reckon xarick saw `assert` in the PR and thought... no, please crash the script for the game bug!
20:59:58 <peter1138> Yeah... no :)
21:00:10 <xarick> `assert(company != ScriptCompany::COMPANY_SELF && company != ScriptCompany::COMPANY_SPECTATOR);` this one
21:00:17 <xarick> but i dunno
21:00:56 <xarick> seeing asserts inside the API is ... strange
21:00:58 <peter1138> Yes. That is deliberate.
21:01:03 <xarick> okay then
21:01:07 <peter1138> There's even a comment to explain it.
21:02:09 <_glx_> it's an assert scripts can't trigger
21:02:36 <_glx_> (if openttd does the right thing)
21:02:40 <peter1138> Hmm, the SCC_ENCODED_STRING/_NUMERIC codes add 3 bytes per parameter. I guess that's okay.
21:03:02 <peter1138> Could cheat and use another low-ascii character :D
21:03:07 <Rubidium> though, xarick... please try to trigger that assert :)
21:10:00 <frosch123> Hmm, I recall GS langfiles were only stored in the save for joining clients, not for disk saves, so no savegame conversion would be needed. But looks like that is no longer the case. Or I just imagined it
21:12:57 <peter1138> frosch123, more complex than that.
21:13:34 <peter1138> This is strings which are saved for something like Town.SetText and Industry.SetText.
21:13:54 <peter1138> So they're not part of the GSTR chunk, but they are saved with towns/industries.
21:14:02 <peter1138> There's potentially other places, I'm not sure.
21:14:17 <peter1138> Goals, of course.
21:14:59 <peter1138> These saved strings to depend on the GSTR chunk.
21:15:00 <_glx_> GSTR contains raw data to be compiled
21:15:14 <peter1138> (But exist even if that's not present, I suppose.)
21:15:15 <_glx_> so no control code at all in that
21:15:31 <peter1138> -to+do
21:16:17 <frosch123> Oh, right. I forgot those texts existed as well
21:16:20 <_glx_> but some fields of Town and Industry, for instance, can contain SCC_ENCODED data
21:16:43 <_glx_> and that needs conversion
21:18:19 <peter1138> At least we don't have to be 7-bit clean.
21:27:56 *** kuka_lie has joined #openttd
21:34:53 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #13501: Fix 3effb89: [Script] Don't set CommandCallback for asynchronous commands https://github.com/OpenTTD/OpenTTD/pull/13501
21:35:42 <_glx_> strange nobody reported the issue before today πŸ™‚
21:39:12 <xarick> sorry
21:41:05 <_glx_> #13501 is for your crash peter1138[d]
21:42:34 <peter1138> Yeah I'm just compiling it :)
21:43:18 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1337901597828579439/image.png?ex=67a92175&is=67a7cff5&hm=cb913fcd91aa2160eb9b9b9f17db04bfaf9ebaac67aabf3f76a06c10651aedae&
21:43:30 <_glx_> my test GS stopped crashing
21:44:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13501: Fix 3effb89: [Script] Don't set CommandCallback for asynchronous commands https://github.com/OpenTTD/OpenTTD/pull/13501#pullrequestreview-2604054764
21:45:33 <_glx_> the sleep loop is to wait for another client to join before modifying the towns (to check it worked fine)
21:46:52 <peter1138> I tested with the FIRS gs, it no longer crashes, so good enough for me :)
21:55:00 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13500: Codechange: [Script] Use helper function over direct casting CompanyID https://github.com/OpenTTD/OpenTTD/pull/13500#pullrequestreview-2604055948
22:02:19 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13500: Codechange: [Script] Use helper function over direct casting CompanyID https://github.com/OpenTTD/OpenTTD/pull/13500
22:14:42 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #13501: Fix 3effb89: [Script] Don't set CommandCallback for asynchronous commands https://github.com/OpenTTD/OpenTTD/pull/13501
22:20:04 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13500: Codechange: [Script] Use helper function over direct casting CompanyID https://github.com/OpenTTD/OpenTTD/pull/13500#pullrequestreview-2604060635
22:21:14 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476#issuecomment-2645964871
22:28:37 *** Tirili has joined #openttd
22:40:38 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:40:43 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:42:23 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13500: Codechange: [Script] Use helper function over direct casting CompanyID https://github.com/OpenTTD/OpenTTD/pull/13500
22:42:26 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13476: Add: [Script] GetEconomyAge and GetWagonEconomyAge https://github.com/OpenTTD/OpenTTD/pull/13476#issuecomment-2645970211
22:48:39 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:49:58 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:57:22 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13497: Codechange: make all pool item indices strongly typed https://github.com/OpenTTD/OpenTTD/pull/13497
22:57:26 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #13493: Codechange: make Company mask a BitSet https://github.com/OpenTTD/OpenTTD/pull/13493
23:01:53 <peter1138> Hmm.
23:02:03 <peter1138> Yeah, my conversion is bad.
23:02:12 <peter1138> Unit test, eh?
23:06:45 <Rubidium> that might be the fastest way to test-and-fix that issue
23:18:15 <xarick> YAY!!! Successfully rebased! thanks _glx_ <https://github.com/SamuXarick/OpenTTD/compare/max_no_competitors-%3D-15-v33-r27931.patch>
23:21:26 <peter1138> I think there's no point in testing the escaped case that the old decoder tried to handle, because strings were never escaped properly in the first place.
23:22:34 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1337926580810551438/image.png?ex=67a938ba&is=67a7e73a&hm=089d4de19d6acafe747d2c970eab942c8df9d8d4f0f4600e65f5e970f1b6dfaa&
23:22:34 <xarick> meanwhile... AdmiralAI is leading!
23:22:57 <xarick> NoCAB 2nd and AAAHogEx 3rd
23:53:01 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13499: Codechange: Change internal format of encoded strings to improve robustness and allow expansion. https://github.com/OpenTTD/OpenTTD/pull/13499
23:53:28 <peter1138> Hrmm, well.
23:54:41 <peter1138> Something using `<< SCC_ENCODED << "0"` style syntax is probably better, but it's just a test...
23:55:22 <peter1138> Or there's some way to embed constants as unicode in a string that I don't know :)
23:59:06 *** Tirili has quit IRC (Quit: Leaving)