Config
Log for #openttd on 21st November 2024:
Times are UTC Toggle Colours
00:24:40  <peter1138> Okay, now I know how this all works.
00:24:51  <peter1138> Roughly.
00:25:10  <peter1138> Deleting and never touching again 😉
02:00:14  *** Wormnest has quit IRC
02:32:16  *** tokai has joined #openttd
02:32:16  *** ChanServ sets mode: +v tokai
02:39:00  *** tokai|noir has quit IRC
02:48:30  *** Wormnest has joined #openttd
03:00:09  *** herms has quit IRC
03:02:26  *** Wormnest has quit IRC
03:03:30  *** herms has joined #openttd
03:11:22  *** godbed has joined #openttd
03:11:36  *** Zathras has joined #openttd
03:14:50  *** debdog has quit IRC
03:15:00  *** D-HUND has quit IRC
03:46:43  *** Zathras is now known as debdog
04:20:33  *** aperezdc has quit IRC
05:46:02  *** Flygon has joined #openttd
06:12:39  *** aperezdc has joined #openttd
07:44:38  <DorpsGek> [OpenTTD/OpenTTD] felixprigge updated pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683
08:31:32  *** HerzogDeXtEr has joined #openttd
08:33:46  <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683#pullrequestreview-2450606508
08:36:20  <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13073: Add: NewGRF Badges feature https://github.com/OpenTTD/OpenTTD/pull/13073
08:36:51  <peter1138> "good"
09:02:13  <peter1138> Brrr, fingers coooold
09:03:10  <Rubidium> and you got no hot cup of tea in them?
09:04:38  <peter1138> My coffee's gone cold as well.
09:47:19  <orudge> truebrain: any chance you might be able to have a look at https://github.com/OpenTTD/appstore-data/pull/12 when you have some free time?
09:47:35  <truebrain> orudge: I do have it on my list, but free time is an issue 😛
09:47:41  <orudge> :D
09:47:42  <orudge> No worries
09:47:45  <truebrain> I only need to check out if eints will pick this up correctly
09:47:51  <orudge> I know the feeling
09:48:08  <truebrain> the rest of the PR is fine by me; worst case, something breaks ... 😛
09:48:27  <truebrain> so soon I just want to merge it, and see what eints does
09:48:34  <truebrain> but I need to make sure I have a backup etc first 😄
09:48:36  <orudge> It shouldn't really affect anything else, but yes, I'm hoping it gets picked up, then folk translate it :)
09:50:30  <truebrain> That would be the dream 😄
10:07:41  *** XYZ has quit IRC
10:29:57  <peter1138> Stupid smart thermostat.
10:30:30  <peter1138> Likes to reset itself to 16.5°C during the day...
10:32:20  <exceptik> comfy temperature
10:33:21  <peter1138> I'm warm enough apart from fingers.
10:35:44  <exceptik> then its time for a smoke break, suddenly it becomes even warmer
10:47:43  <peter1138> Ew
11:44:54  <exceptik> replace smoke with tea 😆
11:51:11  *** XYZ has joined #openttd
11:58:11  <_glx_> It's my turn to get snow
11:58:58  <johnfranklin> I wore some very thin trousers, I regretted.
11:59:39  <_glx_> Why? Summer is over
12:00:20  <johnfranklin> I wore them yesterday and it was not cold, since I also wore down coats
12:00:39  <johnfranklin> And it was warmer inside buildings
12:00:49  <johnfranklin> But today is much colder
12:29:50  <DorpsGek> [OpenTTD/OpenTTD] felixprigge commented on pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683#issuecomment-2491011194
12:31:56  <peter1138> ```ScriptListMap *list_items = &list->items;
12:31:56  <peter1138> for (auto &it : *list_items) {```
12:32:00  <peter1138> Good use of pointers there.
12:32:25  <kuhnovic> References? Never head of
12:32:36  <peter1138> It does not even need a reference.
12:32:58  <kuhnovic> That too
13:03:42  <peter1138> Hmm, the sprite sorters a bit complex eh?
13:04:14  <locosage> just a tiny bit 😅
13:04:49  <peter1138> JGRPP changes it all.
13:05:32  <peter1138> But using a temporary std::stack and a temporary std::forward_list seems not cache friendly.
13:05:53  <locosage> wonder why
13:06:07  <locosage> is jgrpp sort order the same?
13:07:59  <peter1138> The algorithm is different because JGRPP has all sorts of optimisations.
13:08:25  <peter1138> The "but using" refers to vanilla code, not JGRPP.
13:11:06  <locosage> ah, well, I compared quite a lot of options and stack+list list is the best I came up with
13:12:03  <peter1138> Lots of pointers and allocations in a list.
13:12:27  <peter1138> std::stack is a deque so it's a chunk at least.
13:13:41  <locosage> I tried vector instead of list, was slower
13:13:56  <locosage> <https://github.com/OpenTTD/OpenTTD/pull/7962#issuecomment-586487781>
13:16:26  <locosage> don't remember why exactly but it removes stuff from the middle it seems
13:47:51  <johnfranklin> Everyday pasta
13:53:44  <peter1138> Someone's having a Discord 'call'.
13:54:15  <peter1138> Go on there and make eating noises at them.
14:02:54  <peter1138> z-buffer instead of sorting?
14:03:54  <peter1138> (Doesn't work with alpha)
14:08:38  <_jgr_> The vanilla sprite sorter works better if you sort a whole full-screen's worth in one go
14:09:50  <_jgr_> I took the approach of just slicing the screen up in that case, which also allows sorting and drawing the slices to be done in parallel
14:10:50  <_jgr_> The one in my branch is close to the old vanilla sprite sorter
14:30:07  <peter1138> How many recolour sprites though?
14:30:49  <peter1138> And no, I don't think lots of recolour sprites is wrong, although if any of them are the same and could be reused then that would reduce memory usage.
14:34:42  <peter1138> (grf-py's trick of deduplicating sprites doesn't work for recolours, and the deduplication only applies to the file, they're still separate sprites in game)
14:35:56  <peter1138> ParentSpriteToDraw is a bit too big to just be moved around quickly...
14:36:06  <peter1138> Hmm.
14:55:47  *** nielsm has joined #openttd
15:12:18  <xarick> Copilot is learning the coding style of openttd quite easily
15:13:49  <_glx_> "learning"
15:14:39  <xarick> eh, I guess that's why they're called machine learning
15:17:29  <xarick> I need a way to compound kdtree with townindustries in a manner that you guys can accept
15:18:30  <xarick> currently they're separate, but they operate on the same thing which is counting industry types
15:18:37  <xarick> I want to unify that somehow
15:19:12  <xarick> Once I have achieved that, I will PR
15:34:20  <LordAro> machine learning is applied to the initial training, not the output
15:34:34  <LordAro> it's not learning anything from you talking to it
15:34:48  <LordAro> other than a bit more context, perhaps
15:49:38  *** XYZ_ has joined #openttd
15:50:59  *** XYZ has quit IRC
16:11:41  *** ufo-piloot has quit IRC
16:12:53  *** ufo-piloot has joined #openttd
16:36:15  <peter1138> Correct, prop 28 is required for prop 32 to do anything.
16:37:57  <peter1138> Changing how it works so that it can work without 28 might make it easier to describe?
16:39:34  <peter1138> Currently, if you want classes 0 or 1, you set 28 to 0b11. If you want classes 0 and 1, you need to set 28 to 0b11 and 0x32 to 0b11.
16:40:44  <peter1138> Would it make more sense to allow setting just 0x32 to 0b11?
16:41:03  <peter1138> Filter might be a way to describe it.
16:41:20  <peter1138> (And use, I'm aware those two classes are not sensible choices :))
16:42:06  <michi_cc[d]> Changing prop 32 would not be the same though, if you have cargos with classes 01 and 11 and 10. prop 32 as 01 and 28 as 01 would be an example.
16:42:27  <michi_cc[d]> Make that one 10 of course.
16:45:27  <peter1138> Yes, the callback is recipe for running out of act2ids, or just including more of them.
16:46:03  <peter1138> Has anyone hit the limit of 1 billion act2s yet?
16:46:57  <peter1138> The property will be simpler, and smaller.
16:47:48  <peter1138> NML does, at least, hide the fact that you are writing lots of bytes when use varacts2, I guess..
16:47:57  <peter1138> +you
16:48:38  <_glx_> nml hides the fact you actually may write more than one varact2 with a single switch
16:53:36  <peter1138> And due to how OpenTTD loads varact2, every callback result is a "spritegroup" as well, with its own pool index...
16:54:30  <peter1138> Because a switch result could be a link to a previous act2, or a callback result. So internally a callback result is a "previous result".
16:55:06  <peter1138> JGRPP probably rewrites all that :p
16:55:31  <_jgr_> I just re-use callback result sprite groups for the same value
16:55:51  <peter1138> Do you search for them or keep a list?
16:56:08  <peter1138> I guess I could just look.
16:56:41  <_jgr_> I use a hash table
16:57:06  <peter1138> const CallbackResultSpriteGroup *&ptr = _callback_result_cache[result];
16:57:08  <peter1138> Yeah.
16:58:15  <_glx_> andythenorth: a name or a mechanism/syntax to do both 0x28 and 0x32 with `refittable_cargo_classes`
16:58:21  <peter1138> If we were evil we could use point manipulation...
16:58:34  <peter1138> *pointer.
16:59:30  <_glx_> single value or an array of 2
17:01:07  <_glx_> exclusion is unchanged 🙂
17:06:00  <_glx_> there's an existing mechanism, let me try something
17:09:45  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1309204117788426330/image.png?ex=6740bad9&is=673f6959&hm=f0ffa1e716a3ec9a5ee3ffea65a9db081a7c680ac5a35f7bb199234c73b41076&
17:09:45  <xarick> Copilot is just awesome at describing things with clarity
17:12:45  <peter1138> An array of vectors of vectors. Probably not going to fly?
17:13:05  <xarick> oh :/
17:13:34  <mnhebi> You trying to summon our lord and saviour, blue screen of death?
17:14:14  <peter1138> Dunno but my VS Code just disappeared.
17:14:29  <mnhebi> Well thats positive news since VS Code is cancer.
17:15:12  <peter1138> And yet I'm so much more productive with it than Vim.
17:15:39  <mnhebi> Like any AI it bullshits its way through life
17:15:48  <mnhebi> so sure, its correct. At bullshitting.
17:15:54  <peter1138> Okay, ninja somehow was not stealthy and trigger OOM killer.
17:16:23  <mnhebi> Your dreams are the LLM, you are not
17:16:34  <mnhebi> LLMs are like dreams, not minds.
17:17:35  <mnhebi> Pretty much all the research about LLMs say they are similar to dreams, and anyone who uses them in any capacity can notice that
17:20:57  <mnhebi> https://medium.com/@antoineross/how-does-an-llm-work-they-dream-3b5434a52e5c https://sjl.us/2023/12/11/llms-dream-machines/  https://www.redhat.com/en/blog/when-llms-day-dream-hallucinations-how-prevent-them https://www.lesswrong.com/posts/6HFAAewifyGYQpXJM/do-llms-sometime-simulate-something-akin-to-a-dream
17:22:55  <mnhebi> andythenorth: nah its a nightmare.
17:23:11  <LordAro> invisible andy still invisible
17:26:23  *** XYZ has joined #openttd
17:27:38  *** XYZ_ has quit IRC
17:31:06  *** Wolf01 has joined #openttd
17:31:12  <peter1138> Iron Horse: 962 different callback results, reused 79383 times.
17:32:16  <peter1138> So 1860KiB saved.
17:32:51  <LordAro> nice.
17:32:55  <LordAro> a whole MB
17:32:57  <LordAro> nearly 2
17:35:33  <peter1138> Of course it probably 50MB caching it 😉
17:37:16  <peter1138> 962 * 16, I suppose, so about 15KiB.
17:41:59  <peter1138> Or 962 * 8 if I use SpriteGroupID instead of SpriteGroup *.
17:43:49  <peter1138> In theory other things might be reused but realistically callback results is it.
17:44:17  *** XYZ has quit IRC
17:45:04  <peter1138> I added a load more GRFs and it was 228993 reused.
17:45:26  *** XYZ has joined #openttd
17:46:41  <peter1138> Okay, so if a NewGRF returns every value from 0 to 32767, and then only used it once, we'd be allocating 256KiB for no reason.
17:46:55  <peter1138> (+ whatever overheads)
17:52:14  <_glx_> andythenorth: but it optimise when generating the warnings 🙂
17:53:31  <_glx_> when you see the "result is constant" it actually uses the constant and not the switch at "call" location
17:54:57  <_glx_> you can check nfo output and see your switch is actually not generated
18:07:42  <_glx_> andythenorth: https://github.com/OpenTTD/nml/compare/master...glx22:nml:refit_prop
18:09:20  <peter1138> Well, my heating is on but it's not feeling warm.
18:10:00  <peter1138> I hate outsourcing... give task to developer. Spend hours explaining task...
18:14:00  <_glx_> current examples don't really need AND
18:18:09  <DorpsGek> [OpenTTD/OpenTTD] Schmitt-DE opened issue #13110: [Crash]: CTD when calling GSAdmin.Send https://github.com/OpenTTD/OpenTTD/issues/13110
18:18:45  <LordAro> ooh.
18:20:03  <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1309221808003743915/image.png?ex=6740cb53&is=673f79d3&hm=ab5891853993b061f9951394841c1d381a836696d01eb285255256549250203d&
18:20:03  <_glx_> ahah the example still has comment from before the 2013 update in <https://github.com/OpenTTD/nml/commit/0fe1d6907880edbed4e02e1f23ae65bbfd0d2bd2>
18:21:00  <xarick> What is wrong
18:21:03  <xarick> <https://gist.github.com/SamuXarick/402c050e2f1e903c3e69b1fdf6141858>
18:21:32  <_glx_> missing include ?
18:22:06  <xarick> i only moved the kdtree into Industry struct
18:22:11  <xarick> I don't get it
18:22:59  <xarick> ```#include "core/kdtree.hpp"
18:22:59  <xarick> #include "industry.h"
18:22:59  <xarick> struct Kdtree_IndustryXYFunc {
18:22:59  <xarick> inline uint16_t operator()(IndustryID iid, int dim)
18:22:59  <xarick> {
18:23:00  <xarick> return (dim == 0) ? TileX(Industry::Get(iid)->location.tile) : TileY(Industry::Get(iid)->location.tile);
18:23:00  <xarick> }
18:23:02  <xarick> };
18:23:02  <xarick> using IndustryKdtree = Kdtree<IndustryID, Kdtree_IndustryXYFunc, uint16_t, int>;```
18:23:58  <xarick> I tried including industry_type.h
18:25:35  <xarick> oh, I think i see what's missing
18:26:52  <xarick> nop, i don't. still failing
18:28:27  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13110: [Crash]: CTD when calling GSAdmin.Send https://github.com/OpenTTD/OpenTTD/issues/13110
18:29:00  <LordAro> _glx_: invalid unicode?
18:29:33  <_glx_> data unavalilable in dump
18:35:20  <xarick> I don't understand what I'm missing
18:35:28  <xarick> it used to work
18:35:34  <xarick> suddenly it doesn't
18:36:07  <xarick> probably something tiny that I'm not aware
18:36:29  <xarick> I din't change the includes, it makes no sense why it doesn't work now
18:36:34  <_glx_> error seems to be about using Industry without knowing Industry
18:38:54  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13110: [Crash]: CTD when calling GSAdmin.Send https://github.com/OpenTTD/OpenTTD/issues/13110
18:39:08  <_glx_> our validation is incorrect
18:39:19  <_glx_> assert is not enough
18:42:11  <xarick> is there any tool that would help me identify the problem?
18:42:19  <xarick> I'm clueless
18:44:09  <_glx_> is industry_type.h included before industry_kdtree.h ?
18:45:00  <xarick> no, industry_type.h is not even in the list
18:46:13  <_glx_> that's the error, if nothing includes industry_type.h before industry_kdtree.h then industry_kdtree.h can't use Industry
18:55:29  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13111: Codechange: Cache callback spritegroups. https://github.com/OpenTTD/OpenTTD/pull/13111
18:57:14  <peter1138> Hmm, I think it actually loads a bit quicker as well, because it's not adding so many pool items.
18:58:12  <peter1138> Nothing really noticable mind you.
18:58:14  <xarick> makes no difference whether I include industry_type.h in industry.h or industry_kdtree.h
18:58:22  <xarick> it still fails
19:01:30  <xarick> _glx_: if you have time/patience, help me figure out what's wrong here:
19:01:30  <xarick> <https://github.com/SamuXarick/OpenTTD/compare/town-industry-type-counts-mixed-with-kdtree-for-industries>
19:33:12  <peter1138> Get back to drawing your badges
19:37:32  <xarick> back
19:41:01  <xarick> hmm
19:43:14  *** nielsm has quit IRC
19:43:23  <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13111: Codechange: Cache callback spritegroups. https://github.com/OpenTTD/OpenTTD/pull/13111#pullrequestreview-2452473369
19:45:29  <xarick> doesn't build no matter what I do... I ruined this big time
19:49:33  <xarick> omg the more i touch the includes the worse it gets
19:54:22  <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13111: Codechange: Cache callback spritegroups. https://github.com/OpenTTD/OpenTTD/pull/13111#pullrequestreview-2452516773
19:59:20  <peter1138> Nah.
19:59:33  <peter1138> I think I pushed it with a bit missing.
20:12:32  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1309250114589691904/image.png?ex=6740e5b0&is=673f9430&hm=7dcfa3839ee34d49e19c5516b9d05b3af46a2cc8fc6103c32476ee7daace6e28&
20:12:32  <xarick> I accidentaly
20:12:39  <xarick> fun tetris
20:13:09  <xarick> I guess this is what peter is doing all the time
20:14:17  <_glx_> yeah, but this one has no hole, so no need to shuffle
20:14:18  <peter1138> Not exactly all the time.
20:14:57  <_glx_> btw maybe your changes in industry.h cause the issue for Industry
20:17:31  *** gelignite has joined #openttd
20:18:43  <_glx_> oh I see, you do a circular reference
20:19:12  <_glx_> Industry depends on IndustryKdtree and IndustryKdtree depends on Industry
20:19:17  <_glx_> it's impossible
20:19:53  <xarick> oh, nice of you to figure that out
20:20:10  <xarick> any idea how to solve
20:20:33  <_glx_> yes don't use IndustryKdtree in Industry, or don't use Industry in IndustryKdtree
20:21:08  <xarick> hmm interesting
20:21:21  <xarick> so the move to unify the whole thing... falls apart
20:22:40  <xarick> gonna try move the kdtree stuff into kdtree file itself, but not sure how the Inc and Dec count will work
20:36:06  <xarick> dang, can't find a spot for these things
20:45:13  <talltyler> Heh, when I was writing NotDaylength I opted to not allow the timekeeping mode to be changed in-game. Somehow I missed blocking the Scenario Editor workaround, and now Master Hellish is streaming a game where graphs will be broken for 1499 periods. 😬
20:46:31  <talltyler> Economy year is 1, company GUI won't show anything until 1950
20:46:36  <talltyler> Silly company data GUI
20:48:08  <peter1138> Reset whatever field it is that stops it?
20:48:34  <talltyler> I have no idea how that storage works, to be honest. I've looked.
20:49:05  <peter1138> Presumably something says 1950 and that just needs to be set to the current economy year if the mode is switched. Right?
20:49:43  <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1309259472086241320/image.png?ex=6740ee67&is=673f9ce7&hm=eb31f4b9b53c84538d67b6ca38cc42a6cbeb576f7892c7e9c8a376359a8ee513&
20:49:43  <_glx_> no it doesn't
20:50:22  <peter1138> Heh
20:51:21  <talltyler> I forget all of the reasons why mode can't be changed, but there are multiple factors. More relevant here is getting the GUI to draw the most recent data instead of waiting for the year -- date cheat breaks it in the exact same way
20:51:42  <talltyler> (If you change the year before the start date of the game)
20:51:45  <_glx_> `mytable[0] = 0;` is accepted but it's not supposed to
20:58:57  <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1309261794526892123/image.png?ex=6740f090&is=673f9f10&hm=0437531efbe823231dcb3b7db296d5ecfc7ee40d4600f2e8628561dd58b092d0&
20:58:57  <_glx_> though the doc says
21:02:24  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1309262665037643888/image.png?ex=6740f160&is=673f9fe0&hm=d07244fd55a5c9a86d9e461855d39c10f72d67f08ce6122e7644d21305622818&
21:02:43  <peter1138> Okay, I just saved as scenario, then converted it to wallclock, and loaded it as a new game.
21:03:04  <peter1138> There's a little spike, but otherwise the chart is working fine.
21:03:14  <peter1138> The in-game year is the same as well.
21:03:25  <talltyler> Sorry, I mean company financial data (the table, not a graph)
21:03:34  <talltyler> I believe the problem is here: https://github.com/OpenTTD/OpenTTD/blob/master/src/company_gui.cpp#L430
21:03:55  <talltyler> (Not a bug, but the reason it behaves this way)
21:04:13  <talltyler> What happens if you start a new company after changing the mode?
21:04:36  <peter1138> Okay.
21:04:38  <peter1138> That's easy
21:05:09  <peter1138> Reset inaugurated_year (either relative or absolute)
21:05:18  <talltyler> Yep
21:05:40  <peter1138> My chart is still going, but then again the game year didn't change when I switched to wallclock.
21:06:24  <peter1138> I think it did reset as it shows only 1 period to start with, but it fills in fine.
21:07:07  <peter1138> Of course, this is an established game, way past 1950.
21:07:18  <talltyler> Was your table blank after changing modes? I'm having trouble reproducing, for some reason
21:09:32  <peter1138> One potential solution is to ignore inauguration year and just check if that expenses column is all zeroes.
21:09:54  <peter1138> This seems like such a tiny thing that shouldn't block anything, tbh.
21:11:45  <talltyler> I am happy to revisit changing modes in a game, but this is an old behavior that also happens with the date cheat so I wouldn't mind fixing it in a way that works for both
21:12:16  <talltyler> I got a new computer and haven't set up a development environment yet 😕
21:12:46  <talltyler> My old machine was hilariously underspec for my new job developing for Unreal Engine 🙂
21:12:49  *** Flygon has quit IRC
21:14:50  <talltyler> Okay, so company expenses are saved in `c->year_expenses[]`, that makes sense. So we just need to align the data to the correct column?
21:15:32  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1309265971294503003/image.png?ex=6740f474&is=673fa2f4&hm=08ea3868f09149e874260d5db2d2b491ab4b38fa2a6dca6913c018fabbc2c2da&
21:15:33  <peter1138> Heh
21:16:12  <talltyler> OpenTTD now supports BC 😛
21:16:28  <talltyler> (although I recall someone explaining to me why there was no year 0)
21:16:30  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1309266212928360598/image.png?ex=6740f4ae&is=673fa32e&hm=6544c26b769fafc7cd9f7d9d48f3c64fb99779a4924c9d2c404e3e6aa3b7619f&
21:16:30  <peter1138> Is that acceptable on a new game?
21:16:49  <peter1138> Yeah, we can hide if it's < 1.
21:17:45  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1309266527442440282/image.png?ex=6740f4f9&is=673fa379&hm=4107faaf3218318ff54b193a3920516e15ebf18e064642222e2f80ff1131614a&
21:17:45  <peter1138> Current behaviour is to fill from the left until it's full.
21:20:11  <talltyler> Is that with your change? Looks perfect.
21:21:24  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1309267446967963771/image.png?ex=6740f5d4&is=673fa454&hm=d07e49165db2ea8cd7d5e7eef204cd1540822e2407b24ddd937060872976e593&
21:21:30  <peter1138> No empty columns.
21:23:09  <peter1138> So my converted game shows -1, 0, 1 still, becuase there is data there.
21:23:31  <peter1138> Right, what should the columns show...
21:23:34  <peter1138> (headers)
21:24:03  <talltyler> I don't mind incorrect headers if the game has been forcibly converted
21:31:45  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112
21:31:55  <peter1138> (Oh no, more ranges)
21:32:05  *** HerzogDeXtEr has quit IRC
21:32:59  <peter1138> Still.
21:33:15  <peter1138> Is being fixed a problem?
21:38:54  <peter1138> Set by gamescript?
21:38:56  <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #13113: Fix #13110: [Script] keys in squirrel table might be non strings https://github.com/OpenTTD/OpenTTD/pull/13113
21:39:10  <peter1138> The issue is... badges are only displayed in purchase lists.
21:40:04  <peter1138> Where you show them?
21:40:13  <peter1138> *would
21:40:44  <peter1138> So you made up a contrived example because you want per-instance badges.
21:41:21  <peter1138> sd
21:41:42  <peter1138> std::multimap<TileIndex, Badge>
21:44:09  <peter1138> That wasn't me.
21:44:44  <peter1138> How many badges can an instance have?
21:45:14  <peter1138> std::array<std::string, UINT16_MAX> sounds perfect.
22:05:05  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112#pullrequestreview-2452848055
22:05:55  <talltyler> Thanks for figuring this out, peter1138. 😄
22:05:55  <talltyler> I triggered a preview build so I can test it out before approving. Not that I don't trust your tests, just curious. 🙂
22:06:15  <peter1138> Well, I could've posts screenshots, but... uh... lazy? Hmm.
22:08:27  <talltyler> masterhellish: We may have [a solution](https://github.com/OpenTTD/OpenTTD/pull/13112) for your savegame. This would draw the data properly even if the timekeeping mode is changed, or if the date cheat is used. Stay tuned. 🙂
22:08:27  <talltyler> Note that this won't be released into stable until the next major release (April 2025 if we follow the usual schedule), so you and any players who want to follow along would have to play the Nightly version, available in Steam betas and from OpenTTD.org.
22:10:37  <talltyler> Another possible workaround is to change the company inauguration date, since that's the wrong number. If you don't want to lose your progress, you could try:
22:10:37  <talltyler> 1. Create a new company
22:10:37  <talltyler> 2. Make the old company an AI company
22:10:37  <talltyler> 3. Forcibly purchase the old company
22:10:37  <talltyler> 4. (See your) profit???
22:13:04  <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13112: Change: Show company finances column if it has any values in it. https://github.com/OpenTTD/OpenTTD/pull/13112#issuecomment-2492453222
22:14:44  <peter1138> Unable to resolve github.com :S
22:15:57  <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13113: Fix #13110: [Script] keys in squirrel table might be non strings https://github.com/OpenTTD/OpenTTD/pull/13113#issuecomment-2492457638
22:18:42  *** masterhellish has joined #openttd
22:18:42  <masterhellish> Tahnks I will ahve a look at this tomorrow morning
22:23:27  <peter1138> talltyler: oh did I 'break' a WontFix? hah
22:24:38  <talltyler> If only it was in `known-bugs.txt`
22:24:47  <talltyler> Er, `.md`
22:25:18  <talltyler> Then you could feel truly accomplished 😛
22:27:12  <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683
22:27:58  <peter1138> Hmm.
22:28:12  <peter1138> In that case, is #8625 valid?
22:29:56  <peter1138> Oh maybe that is recent. And the year is baked into the sprite. Never mind.
22:35:08  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1309286002338173079/image.png?ex=6741071c&is=673fb59c&hm=326a174937fa80a67800ee96ebb3db380be10cc1cdc99c7bd0a57d2ce54e4bf2&
22:35:08  <xarick> yay _glx_ this was so difficult to solve. Thx for the help. It finally compiled
22:36:13  <xarick> Copilot pointed me to the right direction too, explaining forward declarations and whatever
22:37:11  <xarick> I was also missing a default constructor for the kdtree, it also helped me out on that
22:41:33  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13114: Codechange: Tidy up GRFParameterInfo. https://github.com/OpenTTD/OpenTTD/pull/13114
22:42:22  <peter1138> Kdtree has a default constructor...
22:43:39  <xarick> it meant for this:
22:43:39  <xarick> ```    /**
22:43:39  <xarick> * Struct representing the cache of industry counts for a specific industry type.
22:43:39  <xarick> */
22:43:39  <xarick> struct IndustryTypeCountCaches {
22:43:40  <xarick> IndustryKdtree kdtree;                ///< A k-d tree for spatial indexing of industries.
22:43:40  <xarick> std::vector<IndustryTownCache> towns; ///< A vector of IndustryTownCache entries, each representing a town and its associated industries.
22:43:42  <xarick> /* Default constructor to initialize the kdtree */
22:43:42  <xarick> IndustryTypeCountCaches() : kdtree(IndustryKdtree()) {}
22:43:44  <xarick> };```
22:44:31  <xarick> ~is it bad?
22:48:59  <_glx_> constructor is not needed
22:50:04  <xarick> it didn't let me compile without that line
22:51:11  <xarick> wow... what the heck? now it compiled
22:52:00  <xarick> this is so haunted
22:58:54  *** Wolf01 has quit IRC
23:05:18  *** keikoz has quit IRC
23:06:34  *** gelignite has quit IRC
23:15:47  <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #13113: Fix #13110: [Script] convert table keys to string when generating JSON https://github.com/OpenTTD/OpenTTD/pull/13113
23:16:55  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13113: Fix #13110: [Script] convert table keys to string when generating JSON https://github.com/OpenTTD/OpenTTD/pull/13113#issuecomment-2492547124
23:18:30  <xarick> alright, I got it done!
23:19:13  <_glx_> in worst case key will be "typename : 0x..."
23:19:19  <xarick> quite many changes, mostly Copilot descriptions <https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:town-industry-type-counts-mixed-with-kdtree-for-industries>
23:22:26  *** jlx__ has quit IRC
23:23:13  *** jlx__ has joined #openttd
23:26:24  <peter1138> Okay, squirrel parameters still eludes me.
23:26:45  <peter1138> -2 is now -1.
23:27:06  <_glx_> yeah you take value at stack -2 and push the result
23:27:16  <_glx_> so the result is now in -1
23:31:30  <peter1138> so sq_tostring does a hidden stack operation...
23:34:54  <_glx_> http://squirrel-lang.org/doc/squirrel2.html#sq_tostring
23:34:57  <_glx_> it's not hidden 🙂
23:39:50  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13113: Fix #13110: [Script] convert table keys to string when generating JSON https://github.com/OpenTTD/OpenTTD/pull/13113#issuecomment-2492572793
23:40:02  <_glx_> added a silly test 🙂
23:46:35  <_glx_> all sq_ function works directly with the VM and the stack
23:47:50  <_glx_> sq_next pushes key and value, we convert key to string and it's pushed
23:50:21  <_glx_> working with squirrel stack is fun (but it's easy to do mistakes)
23:50:57  <_glx_> usually the error is a missing pop, or too many

Powered by YARRSTE version: svn-trunk