Times are UTC Toggle Colours
01:12:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13097: Change: Determine industry directory width only on visible rows. https://github.com/OpenTTD/OpenTTD/pull/13097 02:09:08 *** Wormnest_ has joined #openttd 02:09:08 *** Wormnest has quit IRC 02:11:09 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13097: Change: Determine industry directory width only on visible rows. https://github.com/OpenTTD/OpenTTD/pull/13097#pullrequestreview-2444142793 02:32:01 *** tokai has joined #openttd 02:32:01 *** ChanServ sets mode: +v tokai 02:35:54 *** Wormnest_ has quit IRC 02:38:59 *** tokai|noir has quit IRC 02:43:09 *** Flygon has joined #openttd 03:13:48 *** D-HUND has joined #openttd 03:17:20 *** debdog has quit IRC 03:28:56 *** D-HUND is now known as debdog 04:23:48 *** felix has quit IRC 04:24:09 *** felix has joined #openttd 05:08:39 *** keikoz has joined #openttd 05:28:34 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/11906662390 06:13:40 *** keikoz has quit IRC 06:58:22 <Rubidium> poor MacOS being thrown under the bus 07:58:57 <peter1138> Oh god, it's snowing. 08:02:48 <LordAro> minimal here 08:06:55 *** SigHunter has quit IRC 08:09:34 *** SigHunter has joined #openttd 08:15:15 *** gelignite has joined #openttd 08:26:02 <peter1138> $snow 08:29:55 *** SigHunter has quit IRC 08:30:36 <peter1138> Does it matter? No one will understand it. 08:32:25 *** SigHunter has joined #openttd 08:41:21 <peter1138> They're all in the GRFs. 08:41:54 <peter1138> So what you are saying is build a list of labels and their classes into OpenTTD and override whatever the author says... 08:42:33 <peter1138> And do the same for railtype classes which don't even exist. 08:42:58 <peter1138> grfcodec -d is not the easiest way of setting cargo classes. 08:59:05 *** keikoz has joined #openttd 09:03:38 <peter1138> 13090 is going to cause your act2ids to be consumed even faster right? 09:04:05 <LordAro> there seems to be someone missing from the bridge 09:04:15 <LordAro> or else peter is talking to himself 09:04:34 <peter1138> Yes, andy said a rude unicode character. 09:04:42 <pickpacket> peter1138: we had some snow a couple of days ago. Still on the ground 09:05:43 <johnfranklin> Snow! 09:05:48 <pickpacket> When I'm trying out my GS, is it possible to reload it without closing the game? 09:09:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13097: Change: Determine industry directory width only on visible rows. https://github.com/OpenTTD/OpenTTD/pull/13097#pullrequestreview-2444800122 09:10:37 <Rubidium> I don't think that's possible yet. Or maybe rescan_game + reload (if you mean restarting the application by "closing the game") 09:12:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13097: Change: Determine industry directory width only on visible rows. https://github.com/OpenTTD/OpenTTD/pull/13097#issuecomment-2485116568 09:19:06 <peter1138> 16 bit act2ids when? 09:19:36 <peter1138> For badges I use a 16 bit translation table, not that's really needed but I define more than 255 badges... 09:20:36 <peter1138> Yup. 09:20:46 <peter1138> DIRTY THIRDS 09:38:04 <xarick> hi 09:47:33 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13095: Codefix: Missing this-> in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13095 09:49:48 *** mindlesstux has quit IRC 09:50:02 <exceptik> I thought `this` doesn't work in static context since there is no object to associate π€ 09:50:56 *** mindlesstux has joined #openttd 09:54:09 <DorpsGek> [OpenTTD/OpenTTD] felixprigge updated pull request #12683: Fix: Timetable precision https://github.com/OpenTTD/OpenTTD/pull/12683 10:12:57 <Rubidium> exceptik: this in static context does indeed not work, but consider a static data member called m; That can be accessed by this->m from non-static context 10:16:54 <exceptik> I'm just used to use `ClassName::member` π€· 10:17:07 *** gelignite has quit IRC 10:18:21 <Rubidium> that is the way we prefer it to be for static class members, just like we would like this-> to be used for instance members 10:25:54 <peter1138> Yeah, it's annoying that `this->` DOES work for static members from inside. 10:29:22 <xarick> am I doing something bad? 10:30:18 <xarick> what name would "level + 1" have if it was defined as a variable? 10:30:44 <xarick> descent_level? 10:30:50 <xarick> it's in kdtree context 10:31:25 <kuhnovic> Did I already mention that I don't like the `this->` thing π ? 10:33:45 <xarick> I'm going with "descent_level" 10:40:30 <xarick> what's different between static const and static constexpr 10:50:09 <xarick> static const size_t MIN_REBALANCE_THRESHOLD = 8; made it recompile 158 files 10:56:33 <xarick> peter told me to make PR's 10:56:50 <xarick> should I be happy? 11:08:22 <peter1138> Yes, I'm regretting that. 11:08:31 <peter1138> Make PRs if you know what you are doing, perhaps. 11:09:23 <xarick> I won't do for those cases where I'm uncertain 11:09:46 <xarick> the std::move fiasco, don't know how much implications it has 11:10:34 <peter1138> In fact we should probably go private and develop everything behind closed doors :p 11:11:40 <talltyler> Finally, ClosedTTD 11:13:30 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13098: Codefix: Replace magic number in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13098 11:21:11 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13098: Codefix: Replace magic number in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13098#pullrequestreview-2445152606 11:27:58 <peter1138> constexpr t 11:29:34 <xarick> is that better? the INVALID_NODE doesn't have it 11:40:48 <xarick> Make member functions const for const-correctness 11:40:48 <xarick> Sometimes Copilot is too obvious 11:41:18 <xarick> would that fly as a commit message? 11:43:14 <yiffgirl> codefix: 11:48:11 <xarick> Copilot is looking at your Pull Request template 11:48:32 <yiffgirl> why tho 11:48:58 <yiffgirl> don't you have a brain of your own 11:50:04 <xarick> my brain is made of water 11:56:45 <xarick> jesus, it answered all of the "Limitations" part 11:56:47 <xarick> lol 12:02:45 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13099: Codechange: Make Kdtree member functions const for const-correctness https://github.com/OpenTTD/OpenTTD/pull/13099 12:17:23 <xarick> there's some more consts mixed with references 12:17:29 <xarick> i'm not 100% sure 12:18:08 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1308405953489670164/image.png?ex=673dd380&is=673c8200&hm=9bfc97a45f7fbe7b5dddab7bde481892264a1a2b255c438357c244bdc55bea9a& 12:18:08 <xarick> Is this worth PR'ing? 12:18:34 <xarick> part of me says yes 12:20:31 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13099: Codechange: Make Kdtree member functions const for const-correctness https://github.com/OpenTTD/OpenTTD/pull/13099#pullrequestreview-2445302527 12:21:29 <xarick> also renaming the "e" for "element" and making the name consistent across the other parts that also refer to "element" 12:21:55 <xarick> I've seen it named "v", "a", "b" 12:31:56 <xarick> @tparam T Type stored in the tree, should be cheap to copy. 12:33:07 <xarick> viewport_kdtree.h doesn't look cheap to me 12:37:00 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #13099: Codechange: Make Kdtree member functions const for const-correctness https://github.com/OpenTTD/OpenTTD/pull/13099 12:40:08 *** gelignite has joined #openttd 12:45:25 <talltyler> But can it run ~~Doom~ Conway's Game of Life? 12:45:25 <talltyler> https://www.youtube.com/watch?v=5qA80BwvHnI 12:48:31 <LordAro> :o 12:53:51 <peter1138> Ah yes, can't view videos inside Discord because the ads are not blocked. 12:55:42 <peter1138> His voice is weird... 12:57:26 <peter1138> Also he misnames the game. Pfft. 13:03:29 <xarick> what is he doing? he can copy paste rails? 13:03:31 <xarick> wtf 13:03:33 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13096: Codefix: Use correct type for IndustryType in FindTownForIndustry. https://github.com/OpenTTD/OpenTTD/pull/13096#pullrequestreview-2445413528 13:04:32 *** sam_chug has joined #openttd 13:04:32 <sam_chug> i can't do anything about my weird voice π 13:04:42 <peter1138> Oh hai :p 13:05:36 <sam_chug> i get that a lot, its ok haha 13:06:11 <locosage> sam_chug: hi, next time you have issues with cmclient just dm me ;) 13:17:41 <peter1138> This is the 13:17:53 <peter1138> This is the only legit use for block signals as 'logic' 13:19:04 <peter1138> "vanilla transport tycoon also has a hard cap of 5000 trains" 13:19:30 <peter1138> Mmm, I think actual Transport Tycoon is a lot lower than that. 13:20:25 *** gelignite has quit IRC 13:25:19 <xarick> 80 13:31:22 <sam_chug> yeaaaah true, but to be fair "open transport tycoon deluxe" or "openttd" dont roll off the toungue the same way "transport tycoon" does 13:32:24 <peter1138> The first one isn't the game's name anyway. 13:33:28 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1308424909743067216/image.png?ex=673de527&is=673c93a7&hm=4f54e3df8393fca6f2f2b383efe9815a1290649a25cd421406273553470d97e0& 13:33:28 <xarick> what is union 13:33:59 <_glx_> it's an union 13:34:04 <xarick> why do station, town, sign always have the same value? 13:34:14 <xarick> if one is 5, the others are also 5 13:34:16 <peter1138> It's the same location. 13:34:59 <_glx_> maybe it could be a variant instead 13:35:55 <peter1138> Not super useful, all the types are uint16_t. 13:37:17 <peter1138> Plus all the overhead of checking the variant contents. 13:37:32 <_glx_> anyway all IDs are in the same location, and to know which one it really is there's the type field right above 13:38:13 <xarick> isn't this a thing that could be passed as reference instead of copy? 13:38:29 <_glx_> what ? 13:38:30 <xarick> ViewportSignKdtreeItem 13:39:29 <_glx_> most things can be passed as reference, depending on context 13:40:03 <xarick> https://discord.com/channels/142724111502802944/1008473233844097104/1308405953707638825 13:40:09 <xarick> about this screenshot 13:40:41 <xarick> e is a ViewportSIgnKdtreeItem in this case 13:40:41 <_glx_> push_back will make a copy anyway 13:40:57 <xarick> oh π¦ 13:44:44 <xarick> maybe copilot is misleading me 13:57:17 <peter1138> "surprise" 14:31:32 <xarick> I'm trying to invent a IsAnyContainedExcept for kdtree 14:50:20 <xarick> oh, I actually need a FindNearest except 14:54:39 *** nielsm has joined #openttd 15:43:15 *** herringland has joined #openttd 15:43:15 <herringland> I have a question about Bananas. Iβm interested in pushing content to Bananas with a GitHub (or similar) build pipeline, but Iβm finding the existing tooling doesnβt have the features I need. 15:43:15 <herringland> I took a look at the bananas-frontend-cli, which is very nearly what I need, however Iβm finding the authentication component a bit of a hassle. To get an authentication token for Bananas, you need to log in with GitHub in your browser, and allow permissions to Bananas for verifying your account. Doing this once wouldnβt be an issue, however the bananas authentication token only seems to be valid 15:43:15 <herringland> for 14 hours. Iβd prefer my build pipeline to publish to bananas automatically, without the need for manual web authentication. 15:43:15 <herringland> Is there a way to get a longer lived token to bananas, or a way to authenticate your GitHub that doesnβt involve logging in with a browser? TIA! 16:30:48 <xarick> how do I return the invalid sentinel value of a type? 16:30:54 <xarick> typename? 16:31:46 <xarick> I need a T::ReturnInvalidSentinel() 16:31:58 <xarick> T could be many things 16:32:14 <xarick> IndustryID, TownID, StationID 16:37:10 <_glx_> all are just uint16_t 16:37:32 <xarick> well currently yes... but 16:38:27 <xarick> viewport item thingy doesn't have 16:39:08 <_glx_> I mean IndustryID:: is like uint16_t:: 16:40:20 <_glx_> usually if there's an invalid value it's specified as a template param 16:41:32 <peter1138> Oops, I did a bad commit :S 16:43:03 <xarick> π¦ 16:45:01 <peter1138> $work 16:45:15 <peter1138> All my OpenTTD commits are good. Honest π 16:46:03 <johnfranklin> Lol 16:46:17 <johnfranklin> Is openttd sfw? 17:20:28 <exceptik> definitely a no 17:22:44 <johnfranklin> (Blame Long Vehicles v4) 17:32:18 <xarick> I can't do my magic 17:32:20 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1308485022411395163/image.png?ex=673e1d23&is=673ccba3&hm=2bf485ee5e508193228735707be7783b77dbf3101805efad87fb1ac49f983541& 17:35:44 <LordAro> i'd imagine it has no idea what 'T' is 17:40:22 <_glx_> no it knows what 'T' is and it's clearly not interchangeable with 'int' 17:40:54 <_glx_> the proper way would be an extra template arg 17:43:28 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13100: Codechange: Use std::visit instead of std::get_if for string parameters. https://github.com/OpenTTD/OpenTTD/pull/13100 17:45:16 <xarick> copilot is telling me std::optional<T> element = std::nullopt 17:46:10 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13100: Codechange: Use std::visit instead of std::get_if for string parameters. https://github.com/OpenTTD/OpenTTD/pull/13100#pullrequestreview-2446194932 17:46:37 <peter1138> Is it optional? 17:47:09 <xarick> yes, I dunno, still testing 17:47:52 <_glx_> looks optional 17:48:09 <peter1138> Ah 17:48:18 <_glx_> else you would not need a default value 17:53:22 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13101: Codechange: Use std::visit for GetActiveCargoLabel. https://github.com/OpenTTD/OpenTTD/pull/13101 17:54:26 <peter1138> Don't worry, I'm not doing ALL of them... 17:59:43 <truebrain> Booooo 18:01:17 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13101: Codechange: Use std::visit for GetActiveCargoLabel. https://github.com/OpenTTD/OpenTTD/pull/13101#pullrequestreview-2446228295 18:03:39 <peter1138> herringland: Not sure about banana token life. Maybe truebrain knows. 18:09:18 <herringland> peter1138: cheers, wasnβt sure if I should ping them or not 18:09:34 <xarick> ``` const auto iid = _industry_type_kdtrees[type].FindNearestExcept(TileX(tile), TileY(tile), current->index); 18:09:34 <xarick> if (iid.has_value()) best_dist = DistanceManhattan(tile, Industry::Get(iid.value())->location.tile);``` 18:09:34 <xarick> magic achieved! 18:09:52 <peter1138> Oh well, I probably shouldn't either, but at least that means you don't get the wrath π 18:14:32 <peter1138> truebrain: Well, I guess I could... 18:15:13 <truebrain> herringland: Access Tokens are retrieved from GitHub, so their lifetime is defined by GitHub. But as it goes with Access Tokens, you want them to be short-lived. So that is expected, and also not something you would like to change 18:16:33 <truebrain> If you want an app that survives longer, you need to do the handshaking with GitHub, and use one of their machine-to-machine flows 18:17:19 <truebrain> I once made a begin with that, but all content creators at that time made very clear to have zero interest in that, so .. with no users, no effort was added π 18:17:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13100: Codechange: Use std::visit instead of std::get_if for string parameters. https://github.com/OpenTTD/OpenTTD/pull/13100 18:17:46 <_glx_> bananas permissions is only done once I think 18:18:08 <truebrain> I am unsure how permissions are related to this question? 18:18:58 <_glx_> but you have to log in to get the token, which seems to be expected 18:21:10 <truebrain> I still don't know what you are trying to say, sorry π 18:21:49 <_glx_> it should be possible to use a long term access token you can generate in github interface and put in secrets 18:21:50 <truebrain> herringland: anyway, part of the problem is that the only machine-to-machine flow GitHub supports, is done by creating your own GitHub App, which seems a bit far-fetched from the average use-case 18:22:01 <truebrain> so maybe we should look into supporting login-flows by just a PAT 18:22:11 <truebrain> as in the end, BaNaNaS doesn't actually care how you authenticated 18:22:12 <truebrain> just that you are 18:25:20 *** gelignite has joined #openttd 18:27:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13101: Codechange: Use std::visit for GetActiveCargoLabel. https://github.com/OpenTTD/OpenTTD/pull/13101 18:28:24 *** asasnat has joined #openttd 18:28:24 <asasnat> note to self: do NOT parallel build OpenTTD on Linux 18:28:50 <asasnat> (my system froze when I did that) 18:29:09 <herringland> truebrain: Thanks for reply, the bearer token time limit makes sense. The PAT route sounds like what Iβm looking for. 18:29:13 <_glx_> you forgot to limit the parallisation 18:29:29 <truebrain> herringland: yeah, that needs altering of the bananas-api 18:29:37 <asasnat> _glx_: no idea what that is so I'll just serial build (is that the corret term?) 18:30:19 <truebrain> basically all API endpoints should just accept a Bearer token, instead of depend on a session 18:30:26 <truebrain> but this API was written from way before that was acceptable π 18:30:29 <_glx_> don't use `-j` without any number 18:31:59 <herringland> truebrain: Do you accept PRs? Iβm a Python developer/devops person by day, I could probably take a look at this. 18:32:06 <truebrain> Go for it! 18:32:15 <_glx_> PRs always welcome π 18:32:16 <truebrain> I do think it might require a bit more fundamental rewrite of the API 18:32:28 <truebrain> it has been months, no, years since I last actually looked at the API 18:33:39 <truebrain> ah, no, I am wrongt 18:33:44 <truebrain> the API already uses Bearer 18:33:52 <truebrain> it was just from before it was normal that frontends talked to the API directly 18:33:56 <truebrain> so it is now routed via a backend 18:34:11 <truebrain> which means the API only wants to see a valid JWT token 18:34:31 <truebrain> so I guess it means the backend of the frontend (ghehe) only needs another login URL where you can offer it a token directly 18:35:13 <truebrain> ah, yes, I didn't write that backend 18:35:15 <truebrain> now I remember π 18:36:00 <truebrain> herringland: https://github.com/OpenTTD/bananas-frontend-web/blob/0272a012b106581613cff1a9ce9092c5104e6da0/webclient/pages/login.py#L77 now sets the JWT token in the backend (of the frontend), after the OAuth login flow 18:36:12 <truebrain> I guess it would be reasonable if there was another URL where you can offer the JWT directly 18:36:30 <truebrain> now I come to think of it 18:36:34 <truebrain> you are skipping the frontend completely 18:36:40 <truebrain> so you should just be able to talk to the API via a valid JWT 18:36:59 <truebrain> so none of what I said in the last 30 minutes is anywhere near relevant 18:37:11 <truebrain> and the answer is just: make a call the API yourself, and use a PAT token as Bearer token 18:37:15 <truebrain> that should "just work" π 18:37:37 <truebrain> I might be wrong, as that sounds too simple π 18:38:24 <truebrain> ah, indeed. Okay, next mindfuck. Does it show I wrote this software years ago? π 18:38:29 <truebrain> Sorry about the long blabla 18:38:47 <truebrain> but the API acts like its own OAuth provider, so we do need an extra step 18:38:53 <peter1138> Heh 18:39:18 <truebrain> and we do expire our own API tokens too 18:39:38 <truebrain> so I was very wrong π Lovely! 18:39:49 <herringland> truebrain: Yeah, this is what I was running into! 18:39:58 <truebrain> Both the GitHub's access token expires 18:40:03 <truebrain> but we expire our API tokens too 18:40:29 <herringland> no worries about forgetting the old software haha, Iβm basically in the same boat here, trying to make automatic releases so I donβt forget how to do all this 18:40:57 <peter1138> I did happen to wonder about doing automatic releases from github just today. 18:41:17 <peter1138> But I don't have any workflows yet to even get to the point of discovering that login is a problem π 18:41:30 <truebrain> https://github.com/OpenTTD/bananas-api/blob/main/bananas_api/helpers/user_session.py#L51 18:41:30 <truebrain> This for example is where normally the OAuth code (of the API) is changed for a Bearer token 18:42:04 <truebrain> I think we did it this way, as back then, it wasn't absolutely a given that GitHub was to stay 18:42:09 <truebrain> so the API supports multiple backends 18:42:32 <truebrain> so it implements its own OAuth handling, but doesn't give things like persistent tokens, or JKS, or any of that stuff 18:45:21 <_glx_> peter1138: if you release via github to github it should not be too hard to do using github API 18:45:29 <truebrain> it will not be a simple change, but to give some pointers: you most likely want another route, somewhere around https://github.com/OpenTTD/bananas-api/blob/main/bananas_api/user/github.py#L110, where a user of the API can offer a valid GitHub token. This token then has to be validated (for example via JWK). After validation succeeds, it can be written down in the `_sessions_by_bearer` dict (this 18:45:29 <truebrain> function doesn't exist yet), and a valid Bearer token can be returned to the application, which can be used for the next 14h to do API calls 18:45:40 <truebrain> the 14h isn't an issue then too, as your automation shouldn't take that long π 18:45:51 <truebrain> and this way we have a clean way to revalidate every 14h that a PAT is still valid 18:46:19 <truebrain> does that make sense? Anyway, a PR would be much and highly appreciated. Just know it is a bit of an old codebase, so there are some odd thing sin there. But the only changes you need should be in the bananas-api repo 18:50:07 <herringland> truebrain: Yeah, that makes sense! Iβll spin up a development environment tonight to start working on this π 18:50:34 <herringland> Thanks for your explanations! 18:50:44 <truebrain> any questions, let me know! 18:50:48 <truebrain> here to help, just limited in time π 18:55:22 *** Flygon has quit IRC 19:00:44 *** jfinance has joined #openttd 19:00:44 <jfinance> Hidden secrets of the digital market that top traders donβt want you to know! Iβm looking to help just five individuals who are serious about earning over 0K weekly in the digital market. Remember, Iβll require just 15% of your profits once you start seeing earnings. Note: Iβm only looking for five serious and truly interested individuals!, drop a message letβs get stated by asking (HOW) 19:16:05 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13102: Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. https://github.com/OpenTTD/OpenTTD/pull/13102 19:24:13 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13103: Codechange: Use std::visit for SetupCargoForClimate. https://github.com/OpenTTD/OpenTTD/pull/13103 19:30:29 *** Wolf01 has joined #openttd 19:31:05 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #13102: Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. https://github.com/OpenTTD/OpenTTD/pull/13102#pullrequestreview-2446482916 19:35:13 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13103: Codechange: Use std::visit for SetupCargoForClimate. https://github.com/OpenTTD/OpenTTD/pull/13103#pullrequestreview-2446490460 19:36:19 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13095: Codefix: Missing this-> in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13095#pullrequestreview-2446492649 19:36:34 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13089: Codechange: Avoid unnecessary re-reads/seeks in RandomAccessFile::ReadBlock https://github.com/OpenTTD/OpenTTD/pull/13089#pullrequestreview-2446493124 19:37:26 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13085: Codechange: Remove redundant checks in FindClosestTrainDepot https://github.com/OpenTTD/OpenTTD/pull/13085#pullrequestreview-2446494702 19:38:18 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13092: Codechange: Use reference for non-optional StationList parameter. https://github.com/OpenTTD/OpenTTD/pull/13092#pullrequestreview-2446496352 19:39:10 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13074: Codechange: Use template struct for Kdtree XYFunc. https://github.com/OpenTTD/OpenTTD/pull/13074#pullrequestreview-2446497893 19:40:19 <LordAro> you guys have been slacking 19:40:48 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13078: Codechange: Use vector for town's persistent storage list. https://github.com/OpenTTD/OpenTTD/pull/13078#issuecomment-2486596708 19:42:48 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic merged pull request #13085: Codechange: Remove redundant checks in FindClosestTrainDepot https://github.com/OpenTTD/OpenTTD/pull/13085 20:03:20 <DorpsGek> [OpenTTD/website] JGRennison opened issue #330: Changelog links on download pages lead to 404 due to text to markdown renames https://github.com/OpenTTD/website/issues/330 20:07:57 *** HerzogDeXtEr has joined #openttd 20:11:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1308525086059266048/image.png?ex=673e4273&is=673cf0f3&hm=73d8252cad5bb644169799fbf8a4dcb6253343d37031bdd2d6d5904dcb7abb38& 20:11:32 <xarick> this looks ugly... 20:11:39 <xarick> the style is 20:11:52 <xarick> any suggestion? 20:20:54 <peter1138> Well 20:29:59 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13074: Codechange: Use template struct for Kdtree XYFunc. https://github.com/OpenTTD/OpenTTD/pull/13074 20:30:20 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13103: Codechange: Use std::visit for SetupCargoForClimate. https://github.com/OpenTTD/OpenTTD/pull/13103 20:32:11 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13096: Codefix: Use correct type for IndustryType in FindTownForIndustry. https://github.com/OpenTTD/OpenTTD/pull/13096 20:32:20 <peter1138> This'll make everything unhappy π 20:33:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13092: Codechange: Use reference for non-optional StationList parameter. https://github.com/OpenTTD/OpenTTD/pull/13092 20:34:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1308530839453171763/image.png?ex=673e47cf&is=673cf64f&hm=554f5f6c4de86c07525d05130d42107bf0ae176fac3deaec497a83951c76ce3c& 20:34:23 <xarick> a bit less ugly 20:34:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13098: Codefix: Replace magic number in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13098 20:34:55 <xarick> cool! 20:35:18 <peter1138> Maybe it still compiles 20:35:40 <xarick> oh, you merged 2 kdtree changes :p 20:38:43 <peter1138> Hmm 20:39:28 <peter1138> I guess NETWORK_COMPANY_NAME_LENGTH is not actually necessary since it was removed from the server info side? Was I imagining that it has company names at some point. 20:40:54 <peter1138> #13095 conflicts 20:41:39 <xarick> oh snap 20:41:41 <xarick> ok i fix 20:45:45 <xarick> fake conflict... 20:45:51 <xarick> i changed the line above only 20:46:14 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13094: Codechange: Speed up industry generation using industry-type checks. https://github.com/OpenTTD/OpenTTD/pull/13094 20:48:48 <_glx_> actually NETWORK_COMPANY_NAME_LENGTH should have been removed since 12.0 20:48:54 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13102: Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. https://github.com/OpenTTD/OpenTTD/pull/13102 20:49:13 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick dismissed a review for pull request #13095: Codefix: Missing this-> in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13095#pullrequestreview-2446492649 20:49:16 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13095: Codefix: Missing this-> in Kdtree https://github.com/OpenTTD/OpenTTD/pull/13095 20:51:41 <peter1138> _glx_: Yeah 20:52:51 <peter1138> MAX_LENGTH_PRESIDENT_NAME_CHARS and MAX_LENGTH_COMPANY_NAME_CHARS are looking a bit arbitrary as well, to be honest. 20:55:06 <_glx_> but they are used for command level checks 20:55:12 <peter1138> Yup 20:55:23 <peter1138> I don't mean they're wrong. Just... arbitrary π 20:56:27 <_glx_> remnants from fixed size arrays, now they mostly prevent weird GUI resizing I guess 20:56:57 <kuhnovic> https://cdn.discordapp.com/attachments/1008473233844097104/1308536516632383539/image.png?ex=673e4d18&is=673cfb98&hm=d0f2d46f5b9cf384a0680283c1dc7c2042e6ad261382ff632f5bb781905b2218& 20:56:57 <kuhnovic> Just got a divide by zero exception starting openttd... 20:57:46 <peter1138> Oof 20:57:54 <peter1138> Who would write such code. 20:58:34 <_glx_> min 0, max 255, def 4 20:58:49 <_glx_> clearly wrong 20:59:05 <peter1138> Sorry I broked it π¦ 20:59:13 <peter1138> And it's been 2 MONTHS?! 21:00:04 <kuhnovic> PETER 21:00:14 <kuhnovic> Everone loves larger towns 21:00:38 <peter1138> The second one is safe. 21:01:37 <xarick> I'm bad at splitting commits 21:01:42 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1308537713808506881/image.png?ex=673e4e36&is=673cfcb6&hm=29bd102449f12dca4d12459f2b230c626d9237efc289592ffd2e1be8592cb332& 21:01:42 <peter1138> True facts. 21:02:05 <_glx_> as good as reviewers π 21:06:25 <xarick> does Codefeature exist? 21:06:44 <kuhnovic> If you are in the C++ committee, then yes 21:06:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13104: Fix d450d4743: Division by zero when larger_towns is set to 0. https://github.com/OpenTTD/OpenTTD/pull/13104 21:11:37 <exceptik> i wouldn't be surprized if one of them is here 21:13:59 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic approved pull request #13104: Fix d450d4743: Division by zero when larger_towns is set to 0. https://github.com/OpenTTD/OpenTTD/pull/13104#pullrequestreview-2446666824 21:14:25 <peter1138> Still, Rust would protect against that. 21:14:50 <peter1138> (I have no idea what it would do) 21:16:31 <xarick> My code features <https://github.com/OpenTTD/OpenTTD/commit/e258ab0b9be7f8c17ab79e4d9dfba00ec2bf13d7> 21:16:44 <LordAro> panic, unless you used checked_div or similar 21:19:27 <peter1138> Hmm, I think I can't std::visit for a std::variant that needs to be accessed by index. 21:21:42 *** gelignite has quit IRC 21:24:07 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic opened issue #13105: [Bug]: Ship gets lost trying to find a path to invalid station https://github.com/OpenTTD/OpenTTD/issues/13105 21:24:36 <kuhnovic> I channel my inner Xarick to find this obscure bug 21:24:58 <peter1138> That's in the wrong section, you should've opened a PR... 21:25:15 <kuhnovic> I'll ask copilot 21:25:23 <peter1138> lol 21:29:50 <kuhnovic> `20>C:\Program Files (x86)\Windows Kits\Include.0.19041.0\um\winbase.h(9531,5): warning C5105: macro expansion producing 'defined' has undefined behavior` how ironic 21:32:47 <_glx_> #if defined(defined) 21:37:11 <xarick> crap, I need a FindContainedExcept 21:37:32 <xarick> not a IsAnyContainedExcept 21:43:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13078: Codechange: Use vector for town's persistent storage list. https://github.com/OpenTTD/OpenTTD/pull/13078 21:44:20 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13078: Codechange: Use vector for town's persistent storage list. https://github.com/OpenTTD/OpenTTD/pull/13078#issuecomment-2486814257 21:47:16 *** HerzogDeXtEr has quit IRC 21:56:01 <xarick> `_industry_type_kdtrees[ind_index].FindContainedExcept(0, 0, Map::SizeX(), Map::SizeY(), current->index, [¤t, &layout_filter, &town_filter, &closest_dist, &count](IndustryID iid) {` 21:56:01 <xarick> hmm π 21:58:09 *** keikoz has quit IRC 21:59:06 <xarick> I don't expect much gains, but let's test 22:00:51 <kuhnovic> Oh don't you love it when you fix one bug, but reintroduce an old one 22:05:23 <xarick> I suspect 13105 is... ship trying to go to the tile with the sign which has no water 22:06:43 <xarick> kuhnovic: can you try https://github.com/OpenTTD/OpenTTD/pull/12156 if it solves 22:12:05 *** nielsm has quit IRC 22:12:43 <kuhnovic> I completely forgot about that one! 22:17:18 <kuhnovic> It doesn't fix it, but might still be related 22:19:43 <kuhnovic> 13105 is one of those lovely cases where the high level path is found, but a low level path can't be found because the ship needs to reverse. 12333 is another one of those, and I haven't yet found a good solution for these two. 22:19:56 <kuhnovic> To be honest I haven't tried too hard 22:45:53 <xarick> dang, my featuresques 22:45:58 <xarick> are overheading 23:40:08 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13102: Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. https://github.com/OpenTTD/OpenTTD/pull/13102#pullrequestreview-2447039335 23:42:06 *** Wolf01 has quit IRC 23:44:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13102: Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. https://github.com/OpenTTD/OpenTTD/pull/13102