IRC logs for #openttd on OFTC at 2024-10-18
            
01:12:48 <DorpsGek> [OpenTTD/team] CrypticNothings opened issue #597: [en_US] Translator access request https://github.com/OpenTTD/team/issues/597
02:49:57 *** gnu_jj_ has joined #openttd
02:53:19 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:00:52 *** D-HUND has joined #openttd
03:04:26 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:51:24 *** keikoz has joined #openttd
04:47:16 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/35d37d4768f0b2f0047a0993687bd3df99a5f84d
04:47:17 <DorpsGek> - Update: Translations from eints (by translators)
05:07:14 *** debdog has joined #openttd
05:12:26 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:36:56 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/11397835278
06:00:49 <_pruple> oops
06:29:32 <andythenorth[d]> [making cargo class docs]
06:29:38 <andythenorth[d]> I'm confused
06:30:01 <andythenorth[d]> who's responsible for providing fallbacks?
06:30:26 <andythenorth[d]> should cargo authors set classes so that there are always fallbacks to piece goods, bulk, liquid?
06:30:56 <andythenorth[d]> or should vehicle authors always provide some vehicles that support all the classes?
08:06:52 *** Flygon has joined #openttd
08:13:20 *** SigHunter has quit IRC ()
08:15:58 *** SigHunter has joined #openttd
08:33:33 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
08:34:37 *** mindlesstux has joined #openttd
08:54:16 *** dwfreed_ has joined #openttd
08:56:16 *** dwfreed has quit IRC (Quit: ZNC - http://znc.in)
08:58:25 *** dwfreed_ has quit IRC (Remote host closed the connection)
08:58:26 *** dwfreed has joined #openttd
08:59:07 <andythenorth[d]> think it's cargos
08:59:32 <andythenorth[d]> what if FIRS had a parameter "set all non-pax, non-mail cargos to include CC_PIECE_GOODS"
08:59:33 <andythenorth[d]> ?
08:59:44 <andythenorth[d]> [what if OpenTTD had a setting for that?] 😮
09:08:32 *** akimoto has joined #openttd
09:30:25 <andythenorth[d]> I did have an idea about detecting any cargos that don't have a suitable vehicle, then just forcing something to refit them
09:30:44 <andythenorth[d]> but it's much more complicated and would be more pitchforks (planes carrying coal)
09:41:58 <xarick> hi
09:46:38 <xarick> I have another one of those weird ideas
09:47:00 <xarick> get rid of TileIndexDiff and only use TileIndexDiffC
09:55:34 <NGC3982> no config file bundled in openttd-14.1-linux-generic-amd64$?
10:00:18 <NGC3982> oh
10:00:23 <NGC3982> its created when the program runs
10:00:46 <NGC3982> it doesnt seem to be created in linux automatically when i run the program headless
10:01:29 <LordAro> it'll use the default config file locations
10:01:32 <LordAro> see the readme
10:08:08 <NGC3982> i see
10:09:29 <NGC3982> how do i set the minutes per year in the cfg? https://wiki.openttd.org/en/Archive/Manual/Settings/Openttd.cfg doesn't seem to say.
10:13:20 <NGC3982> oh, the site isnt updated
10:13:21 <NGC3982> timekeeping_units = 1
10:13:22 <NGC3982> minutes_per_calendar_year = 0
10:13:24 <NGC3982> there we go
10:19:10 <xarick> I haven't come accross any assert yet, that's quite remarkable
10:19:27 <xarick> that doesn't mean things are working correctly
10:20:53 <NGC3982> also, how is server_name set? it's not part of the new config and the site hyperlink is broken
10:30:36 *** debdog has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
10:38:04 *** akimoto has quit IRC (Remote host closed the connection)
10:46:29 *** D-HUND is now known as debdog
10:49:28 <xarick> 116 matches for TileOffsByDiagDir 😦
11:01:34 <peter1138> NGC3982: "Archive" in the URL 🙂
11:02:22 <peter1138> `server_name` is set in private.cfg now.
11:12:11 <NGC3982> ah, i see
11:29:25 <xarick> it's my first time doing an operator
11:30:04 <xarick> ```struct TileIndexDiffC {
11:30:04 <xarick> int16_t x; ///< The x value of the coordinate
11:30:04 <xarick> int16_t y; ///< The y value of the coordinate
11:30:04 <xarick> TileIndexDiffC operator - () { return TileIndexDiffC{ static_cast<int16_t>(-x), static_cast<int16_t>(-y) }; };
11:30:04 <xarick> };```
11:30:06 <xarick> does this look right?
11:31:42 <xarick> example usage:
11:31:42 <xarick> TileIndexDiffC delta = TileIndexDiffCByDiagDir(AxisToDiagDir(axis));
11:31:42 <xarick> TileIndex start = AddTileIndexDiffC(start, -delta) AddTileIndexDiffC(start, -delta)```
11:31:45 <peter1138> There's a pattern that should be followed when implementing these operators.
11:32:11 <peter1138> e.g. `operator-` should usually be defined in terms of `operator-=`
11:32:36 <peter1138> So it may be better to have explicit functions (like how TileAdd is) instead.
11:44:03 <NGC3982> peter1138: if it's in private.cfg, how is it references while running openttd as a dedicated server?
11:44:08 <NGC3982> referenced*
11:44:44 <peter1138> private.cfg still exists.
11:45:38 <peter1138> When using `-c` just use different config directories instead of one.
11:45:56 <NGC3982> oh, so it picks up private.cfg in the config directory
11:46:09 <NGC3982> i noticed that it was created there when i tried running with the separate cfg file
11:55:21 <DorpsGek> [OpenTTD/team] glx22 commented on issue #597: [en_US] Translator access request https://github.com/OpenTTD/team/issues/597
12:03:45 <peter1138> Is tile 0 always MP_VOID?
12:04:33 <xarick> no
12:05:01 <xarick> freeform_edges off makes it a water tile
12:28:51 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1296812240241950751/image.png?ex=6713a603&is=67125483&hm=6e6f19101d25ff9b537f0230de65ec956af34af6415ef38fd40ac9229741ef6c&
12:28:51 <xarick> this looks wrong
12:29:24 <xarick> i want -delta to be {x=0 y=1}, how hard can it be?
12:31:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1296812877272846336/image.png?ex=6713a69b&is=6712551b&hm=bca12468cf4fb70ff76095e4d002dc5fb7c07609a6e47627449b8d1f8c436e8e&
12:31:23 <xarick> oh, it's right on the other side... weird
12:32:28 <peter1138> Were you looking at the value before it had been executed?
12:32:52 *** argoneus has quit IRC (Read error: No route to host)
12:32:54 *** argoneus7 has joined #openttd
12:35:39 <xarick> AddTileIndexDiffC(start, -delta)
12:36:06 <xarick> how do I know what it does?
12:39:20 *** Flygon has quit IRC (Read error: Connection reset by peer)
12:40:15 <xarick> inline constexpr TileIndexDiffC operator - ()
12:40:15 <xarick> {
12:40:15 <xarick> this->x = -this->x;
12:40:15 <xarick> this->y = -this->y;
12:40:15 <xarick> return *this;
12:40:16 <xarick> };
12:43:03 *** Flygon has joined #openttd
12:44:01 <xarick> operator- still displays it returning garbage, but AddTileIndexDiffC displays it correctly after
12:49:09 <xarick> ah, got it!
12:49:22 <xarick> it's &operator -
12:49:52 <xarick> oh, actually...
12:50:06 <xarick> that's worse
12:50:38 <xarick> it is turning the original delta into a different thing, that's not what I want
12:51:40 <peter1138> Yeah, if you implement operators incorrectly...
12:52:04 <_glx_> `T T::operator-() const;` that's the expected signature
12:52:25 <_glx_> you are not supposed to modify `this`
12:55:11 <_glx_> "All built-in arithmetic operators compute the result of specific arithmetic operation and returns its result. The arguments are not modified. " <https://en.cppreference.com/w/cpp/language/operator_arithmetic> is clear 🙂
12:57:29 <kuhnovic> Question about code style. Do we allow function parameters to shadow member names, and rely on this-> to solve that? `this->tile_index = tile_index;` for example.
12:57:51 <peter1138> Ideally it shouldn't.
12:57:57 <_glx_> but it's common
12:58:13 <_glx_> that's why we "force" `this->`
12:58:32 <_glx_> but usually it's for constructors only
12:58:49 <_glx_> other functions tries to not do it
12:59:03 <peter1138> If you can avoid it, do so. Like `tile_index` can just be `tile`
13:00:17 <xarick> @glx TileIndexDiffC is a struct, not a class
13:00:29 <_glx_> and ?
13:00:49 <_glx_> struct and class are similar, the only difference is default visibility
13:01:47 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1296820526689550336/image.png?ex=6713adbb&is=67125c3b&hm=46b78a5a48455ca37deb9bb16a824a36f9bd74c27a45f77d862b1fb411476e8d&
13:01:47 <xarick> which one is it? what the heck is T
13:02:23 <_glx_> "The keywords class and struct are identical except for the default member access and the default base class access."
13:02:58 <_glx_> T is TileIndexDiffC in your case
13:04:32 <xarick> i tried replacing a with this, doesn't work
13:04:44 <kuhnovic> peter1138: The reason I'm asking is that I want to fix the codestyle in all of YAPF. There's a lot of renaming and adding `this->`, I don't really want to nitpick each parameter name 😛
13:04:57 <peter1138> kuhnovic: I have patches for that already.
13:05:07 <kuhnovic> Do they merge :P?
13:06:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13005: Codechange: Use standard code-style for YAPF. https://github.com/OpenTTD/OpenTTD/pull/13005
13:06:38 <peter1138> I hope so...
13:07:02 <peter1138> I only did it this week.
13:08:01 <peter1138> And without `m_` everywhere it becomes much easier to read, IMHO.
13:08:03 <kuhnovic> I'm glad I mentioned it before I went all the way haha
13:08:18 <peter1138> I did already say I was doing it, soryr.
13:08:43 <kuhnovic> I did see that but I only half registered it I guess
13:08:49 <kuhnovic> No worries
13:09:03 <peter1138> Anyway, if you fancy reviewing that PR... 🙂
13:09:11 <kuhnovic> ... not really ... 😛
13:09:20 <kuhnovic> But I will
13:09:28 <peter1138> Removal of `m_` is also what motivated me to remove `CCountedPtr`
13:09:39 <LordAro> phwoar
13:10:12 <kuhnovic> One thing leads to another, suddenly everything is modern C++ and half of the codebase is removed
13:10:25 <kuhnovic> Did you do this by hand or did you use some tooling?
13:10:32 <peter1138> Using `m_` doesn't make sense when those members are accessable outside the class directly.
13:10:50 <peter1138> It's mostly automatic refactoring, and some manual replacements where that missed things.
13:11:28 <peter1138> The second commit that adds includes helped, as that reinforces the
13:11:58 <peter1138> the links between types and also means that you actually get feedback on what is right/wrong.
13:12:04 <kuhnovic> It was quite easy for me to do the renaming automatically, but the this-> was something I couldn't get automated
13:12:53 <peter1138> That's why I did `this->` first. I could ensure that anything that started with `m_` by itself would have `this->` added.
13:13:06 <peter1138> If I renamed first, then that's not so easy to see.
13:13:30 <peter1138> And indeed there might be that tile_index naming clash there I guess 🙂
13:14:07 <kuhnovic> Ah yeah that's smart
13:15:17 <kuhnovic> One thing at a time, this is already a huge improvement. Some variable names could also use a bit of a refresh I guess. I don't see the need to abbreviate things like "trackdir" to "td" for example. But that's definitely outside the scope of this PR.
13:19:13 <peter1138> Correct.
13:19:21 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1296824946735185990/image.png?ex=6713b1d9&is=67126059&hm=f6117756e5952e7cc1a9825264462acc0309b101e31e66d7fae89c4d03b9a6dd&
13:19:21 <xarick> good english?
13:20:06 <peter1138> Seeing `ft.m_new_tile` used in places just reinforced my view that m_ is the wrong thing there.
13:20:38 <peter1138> There are some bits that are still matching our convention. e.g. template parameter naming.
13:20:46 <peter1138> And using `typedef` still instead `using`
13:21:56 <peter1138> *NOT* matching.
13:22:54 <peter1138> Hmm, not sure why I renamed 'm_arr' to 'items' and then went with "data" int he debug output... heh
13:24:40 <kuhnovic> Again, one thing at a time, this is already a huge change and I bet I'm going to see "this->" when I close my eyes tonight 😛
13:40:57 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic requested changes for pull request #13005: Codechange: Use standard code-style for YAPF. https://github.com/OpenTTD/OpenTTD/pull/13005#pullrequestreview-2378058436
13:41:38 <kuhnovic> Small stuff. Let's do a few more improvement iterations 🙂
13:43:16 <xarick> woah 🙂 poor YAPF
13:45:24 <kuhnovic> YAPF should be happy, it's getting a full body make-over!
13:57:11 *** Borg has joined #openttd
14:02:13 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13004: Fix: ScriptTile::PlantTreeRectangle does not check that the end tile is in bounds. https://github.com/OpenTTD/OpenTTD/pull/13004#pullrequestreview-2378165046
14:07:47 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13006: Codefix: remove duplicate typedef https://github.com/OpenTTD/OpenTTD/pull/13006
14:10:23 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13006: Codefix: remove duplicate typedef https://github.com/OpenTTD/OpenTTD/pull/13006#pullrequestreview-2378204627
14:10:24 *** nielsm has joined #openttd
14:28:40 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13007: Codechange: use TileIndexDiff/TileDiffXY as intended https://github.com/OpenTTD/OpenTTD/pull/13007
14:30:49 <xarick> ^
14:30:49 <xarick> -^
14:31:56 <LordAro> +^
14:33:56 <xarick> I was going the removal direction
14:34:02 <xarick> removing TileDiffXY
14:34:27 <xarick> removing TileIndexDiff
14:34:38 <LordAro> just make everything an int
14:34:38 <xarick> convert everything to TileIndexDiffC
14:34:46 <LordAro> it's all it is underneath anyway
14:35:30 <peter1138> But we all know maps when 4 million tiles are too small...
14:35:56 <LordAro> 2 ints
14:36:17 <peter1138> But we all know maps with only 4 million tiles in one direction are too small...
14:36:22 <peter1138> 😄
14:38:17 <Rubidium> up to 2 billion we'll go ;)
14:39:16 <LordAro> 2 sets of 2 ints ;)
14:43:20 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #13006: Codefix: remove duplicate typedef https://github.com/OpenTTD/OpenTTD/pull/13006
14:49:08 <xarick> `assert(!IsDriveThroughRoadStopContinuation(rs->xy, AddTileIndexDiffC(rs->xy, -TileIndexDiffCByDiagDir(AxisToDiagDir(DiagDirToAxis(GetRoadStopDir(rs->xy)))))));`
14:49:08 <xarick> smart coding
14:57:25 <xarick> woah, script_road is complicated
14:58:44 <Borg> okey :) BSPI v3.00 release.. I made a post on thread.. now lets wait for bug reports ;)
15:01:31 <xarick> NormaliseTileOffset in script_road.cpp... how to deal with it?
15:02:51 <LordAro> i wouldn't call ')))))))' particularly smart
15:02:55 <LordAro> not in C++
15:30:29 *** Wormnest has joined #openttd
15:32:52 *** keikoz has joined #openttd
15:35:13 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12999: Fix #12973: Don't exclude high score after using sandbox options https://github.com/OpenTTD/OpenTTD/pull/12999#pullrequestreview-2378442703
15:58:21 *** gelignite has joined #openttd
16:04:50 *** HerzogDeXtEr has joined #openttd
16:53:28 <andythenorth[d]> peter1138: too small for lunch?
16:55:51 *** gelignite has quit IRC (Quit: Stay safe!)
16:56:58 <xarick> I just realised most of my AddTileIndexDiffC should have been AddTileIndexDiffCWrap
16:57:06 <xarick> pff 😦
17:07:09 <andythenorth[d]> did I even lunch?
17:08:17 *** Wolf01 has joined #openttd
17:12:52 <peter1138> Well.
17:13:01 <peter1138> Okay, so TileIndex 0 could be sea.
17:27:22 <johnfranklin> Fish and chips today
17:29:43 <xarick> 42 files touched!
17:30:13 <xarick> replacing all TileOffsByDiagDir to TileIndexDiffCByDiagDir
17:30:35 <xarick> but...
17:30:50 <xarick> script_road.cpp is a mess, I can't change that
17:39:11 <xarick> > /* Here's one of the main headaches. GetTileSlope does not correct for possibly
17:39:11 <xarick> > * existing foundataions, so we do have to do that manually later on.*/
17:39:20 <xarick> foundataions!
17:49:04 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
17:49:26 *** jinks has joined #openttd
18:12:41 <peter1138> Hmm
18:13:46 <andythenorth[d]> yes
18:20:39 <NGC3982> where did lan_internet and server_advertise move?
18:44:03 <peter1138> [network]
18:44:03 <peter1138> server_game_type = public
18:44:03 <peter1138> in openttd.cfg
18:56:30 <xarick> SetupFarmFieldFence
18:57:28 <xarick> trying to understand if it can ever assert with my changes
18:57:42 <xarick> but it seems already resilient enough
20:00:59 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
20:29:31 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #12985: Codefix: Incorrect documentation comments in StringBuilder https://github.com/OpenTTD/OpenTTD/pull/12985
20:35:32 *** Tirili has joined #openttd
20:37:22 *** Wormnest has joined #openttd
20:40:12 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #13008: Fix #13002: Crash due to use of dangling types in picker GUI used/saved lists https://github.com/OpenTTD/OpenTTD/pull/13008
20:40:21 <ian01223> hmm... I just noticed that on the English (UK) language, all the tooltips for tickboxes say "Check this box..."
20:41:01 <ian01223> this seems like a great argument waiting to happen
20:42:14 <ian01223> well, I guess checkbox has pretty much become part of british english by this point, but not the verb check for this purpose
20:42:48 <ian01223> the things you notice when writing wiki articles...
20:44:44 <xarick> I finally got asserts!
20:44:56 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #13009: Codefix: do not wrap-around the map when flooding tiles https://github.com/OpenTTD/OpenTTD/pull/13009
20:45:31 <_jgr_> That text has been there for over 20 years, I expect any such argument would have happened by now
20:46:24 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13008: Fix #13002: Crash due to use of dangling types in picker GUI used/saved lists https://github.com/OpenTTD/OpenTTD/pull/13008#pullrequestreview-2378942122
20:47:44 <Rubidium> I hope those tooltips don't tick someone off ;)
20:48:56 <xarick> woah, I was doing that
20:49:52 <ian01223> I'd be surprised if it didn't
20:50:26 <xarick> I was instead doing a massive 50++ file changes at once
20:50:42 <ian01223> so, 51 file changes?
20:51:17 <xarick> I get some ortogonal iterator asserts :p
20:51:21 <xarick> when placing airports
20:51:50 <ian01223> _jgr_: but I think I'll let someone else check the IRC logs for when it did last happen
21:07:31 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #13009: Codefix: do not wrap-around the map when flooding tiles https://github.com/OpenTTD/OpenTTD/pull/13009#pullrequestreview-2378967586
21:12:59 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
21:15:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:26:33 *** Borg has quit IRC (Quit: leaving)
21:37:40 *** Wormnest has joined #openttd
21:47:44 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:51:35 *** tokai has joined #openttd
21:51:35 *** ChanServ sets mode: +v tokai
21:58:29 *** Tirili has quit IRC (Quit: Leaving)
21:58:33 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:19:53 <xarick> I have a problem
22:21:20 <xarick> [script_tunnel.cpp](https://github.com/OpenTTD/OpenTTD/blob/master/src/script/api/script_tunnel.cpp#L41)
22:21:20 <xarick> actually fine in openttd
22:21:58 <xarick> nevermind, I'm stupid
22:22:08 <xarick> tile = AddTileIndexDiffCWrap(tile, delta);
22:22:44 <xarick> bed, cyas good night
22:32:36 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:18:54 <NGC3982> hm
23:43:54 <wensimehrp> Hey
23:52:27 <peter1138> Hmm