IRC logs for #openttd on OFTC at 2022-07-21
            
00:09:56 *** ChoHag_ has joined #openttd
00:09:56 *** ChoHag has quit IRC (Read error: Connection reset by peer)
00:33:30 *** ChoHag_ has quit IRC (Ping timeout: 480 seconds)
00:46:42 *** ChoHag has joined #openttd
00:56:05 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
00:59:17 *** ely-the-kitsune has joined #openttd
01:07:33 *** ely-the-kitsune has quit IRC (Ping timeout: 480 seconds)
01:15:06 *** ely-the-kitsune has joined #openttd
01:16:56 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
01:17:24 *** ely-the-kitsune has joined #openttd
01:25:51 *** dell-latitude-e5430 has joined #openttd
01:30:26 *** e621 has joined #openttd
01:30:26 *** dell-latitude-e5430 has quit IRC (Read error: Connection reset by peer)
01:31:43 *** ely-the-kitsune has quit IRC (Ping timeout: 480 seconds)
01:33:09 *** e621 has quit IRC (Read error: No route to host)
01:33:24 *** ely-the-kitsune has joined #openttd
01:39:07 *** dell-latitude-e5430 has joined #openttd
01:45:03 *** ely-the-kitsune has quit IRC (Ping timeout: 480 seconds)
02:07:33 *** menelaos[m] has quit IRC ()
02:07:43 *** Wormnest has quit IRC (Quit: Leaving)
02:15:54 *** tokai|noir has joined #openttd
02:15:54 *** ChanServ sets mode: +v tokai|noir
02:21:46 *** Smedles_ has joined #openttd
02:21:46 *** Smedles has quit IRC (Read error: Connection reset by peer)
02:22:36 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:56:32 *** D-HUND has joined #openttd
02:57:26 *** glx has quit IRC ()
02:59:56 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:07:57 *** jeremy[m]1 has quit IRC (Quit: Client limit exceeded: 20000)
04:22:41 *** lobstarooo has joined #openttd
04:23:11 *** lobstarooo_ has joined #openttd
04:29:26 *** lobster has quit IRC (Ping timeout: 480 seconds)
04:30:55 *** lobstarooo has quit IRC (Ping timeout: 480 seconds)
04:31:36 *** lobstarooo_ has quit IRC (Ping timeout: 480 seconds)
04:33:09 *** dell-latitude-e5430 has quit IRC (Remote host closed the connection)
04:33:32 *** ely-the-kitsune has joined #openttd
05:02:13 *** D-HUND is now known as debdog
05:25:07 *** blikjeham[m] has quit IRC (Quit: Client limit exceeded: 20000)
05:41:58 *** Smedles_ has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:42:07 *** Smedles has joined #openttd
05:51:00 *** CornsMcGowan[m] has quit IRC (Quit: Client limit exceeded: 20000)
06:14:57 *** hamstonkid[m] has quit IRC (Quit: Client limit exceeded: 20000)
06:23:55 *** sla_ro|master has joined #openttd
06:44:20 *** Flygon has joined #openttd
06:46:43 *** andythenorth has joined #openttd
07:09:27 *** andythenorth has quit IRC (Quit: andythenorth)
08:28:55 *** andythenorth has joined #openttd
08:38:47 *** andythenorth has quit IRC (Quit: andythenorth)
09:16:02 *** Samu has joined #openttd
09:29:19 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
09:29:42 *** ely-the-kitsune has joined #openttd
10:12:33 *** virtualrandomnumber has joined #openttd
10:13:18 *** virtualrandomnumber has quit IRC ()
12:23:00 <Samu> hi
12:24:46 *** ely-the-kitsune has quit IRC (Read error: No route to host)
12:25:18 *** ely-the-kitsune has joined #openttd
12:28:39 *** virtualrandomnumber has joined #openttd
12:28:54 *** virtualrandomnumber has quit IRC ()
12:43:10 *** glx has joined #openttd
12:43:10 *** ChanServ sets mode: +v glx
12:52:52 *** virtualrandomnumber has joined #openttd
12:52:55 *** virtualrandomnumber has quit IRC (Remote host closed the connection)
13:01:00 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
13:02:43 *** WormnestAndroid has joined #openttd
13:41:41 *** nielsm has joined #openttd
13:44:16 *** Wormnest has joined #openttd
13:59:56 *** sla_ro|master has quit IRC ()
14:02:37 <Samu> i'm slightly confused by how this works https://docs.openttd.org/ai-api/classAIRail.html#a4553fc21ff34a7e6ffda9998301bcebf
14:02:58 <Samu> if tile from and tile to are the same, it doesn't fail
14:04:17 <glx> but it says from != to
14:04:39 <Samu> ah
14:04:51 <Samu> ok, i need to test something
14:05:12 *** supermop_work has joined #openttd
14:05:55 <Samu> there is no enforceprecondition with from != to
14:10:31 <Samu> it built
14:11:33 <Samu> AIBuild.Rail(378, 377, 378) https://i.imgur.com/RkUlSDj.png
14:13:57 *** Wormnest has quit IRC (Quit: Leaving)
14:33:56 <Samu> buildrail and removerail
14:34:23 <Samu> they have from != to as precondition in the hpp file
14:34:27 <Samu> but not in the cpp
14:36:33 <Samu> should it be added?
14:36:54 <Samu> it would be useful, at least from my point of view
14:37:28 <Samu> less code required in the pf script to ensure it won't add a neighbour going backwards
14:42:38 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
14:47:28 *** WormnestAndroid has joined #openttd
14:53:50 *** HerzogDeXtEr has joined #openttd
14:54:07 *** andythenorth has joined #openttd
15:03:49 <Samu> hmm, what's the point for requiring the from tile?
15:06:21 *** andythenorth has quit IRC (Quit: andythenorth)
15:09:50 <glx> helps to find the correct side of the tile for some tracks
15:10:15 <LordAro> think diagonals
15:14:56 *** andythenorth has joined #openttd
15:16:38 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
15:17:11 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #9952: Fix #9951: Scenario editor random industries button and persistent storage https://github.com/OpenTTD/OpenTTD/pull/9952#issuecomment-1191616716
15:18:33 <Samu> i guess there's no need to enforce from != to
15:18:51 <Samu> but building backwards is sure strange
15:20:08 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
15:21:42 <DorpsGek> [OpenTTD/OpenTTD] LordAro merged pull request #9952: Fix #9951: Scenario editor random industries button and persistent storage https://github.com/OpenTTD/OpenTTD/pull/9952
15:21:45 <DorpsGek> [OpenTTD/OpenTTD] LordAro closed issue #9951: [Bug]: Industries created using scenario editor random industries button have their persistent storage cleared https://github.com/OpenTTD/OpenTTD/issues/9951
15:27:52 *** ely-the-kitsune has joined #openttd
15:28:55 *** ely-the-kitsune has quit IRC ()
15:29:20 *** ely-the-kitsune has joined #openttd
15:30:31 *** WormnestAndroid has joined #openttd
15:33:39 <Samu> something still amiss in the enforceprecondition
15:34:15 <LordAro> Samu: it's tricky, as adding the enforceprecondition might break existing scripts
15:34:34 <LordAro> technically it's just that the documentation is wrong
15:45:35 *** andythenorth has quit IRC (Quit: andythenorth)
15:49:03 *** andythenorth has joined #openttd
15:58:57 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
15:59:05 *** WormnestAndroid has joined #openttd
16:16:42 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
16:16:50 *** WormnestAndroid has joined #openttd
16:24:52 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
16:26:09 *** virtualrandomnumber has joined #openttd
16:26:24 *** virtualrandomnumber has quit IRC (Remote host closed the connection)
16:30:13 *** WormnestAndroid has joined #openttd
16:35:48 <Samu> I made something... https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:disallow-building/removing-rail-backwards
16:36:21 <Samu> from != to was not sufficient when the rail was longer than 1 tile
16:36:31 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:37:04 *** Smedles has joined #openttd
16:37:24 <LordAro> doing arithmetic on tileindexes like that seems very wrong
16:38:18 <Samu> uh, many ais do it
16:38:43 *** gelignite has joined #openttd
16:38:52 <Samu> i mean, all pathfinders kind of do it
16:39:01 <LordAro> but tileindexes are not contiguous
16:39:11 <LordAro> (along one axis)
16:39:12 <nielsm> but you're not writing Squirrel here
16:39:32 <nielsm> you're writing C++ and you should use the helper functions to express the proper meaning
16:40:04 <nielsm> (the compiler is going to generate the same code, probably, but humans reading the code will better be able to reason about it and understand it)
16:40:11 <Samu> it's checking if the direction from a tile to another is the same
16:47:06 <Samu> okay, i can use DiagdirBetweenTiles
16:47:29 <DorpsGek> [OpenTTD/team] rodigu opened issue #326: [pt_BR] Translator access request https://github.com/OpenTTD/team/issues/326
16:51:03 <Samu> there is however no ScriptMap::DiagdirBetweenTiles
16:51:10 <Samu> :(
16:52:00 <Samu> what to do
16:53:01 <Samu> no equivalent :(
16:57:12 *** andythenorth has quit IRC (Quit: andythenorth)
17:02:47 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:03:11 *** WormnestAndroid has joined #openttd
17:11:54 *** andythenorth has joined #openttd
17:14:04 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #9952: Fix #9951: Scenario editor random industries button and persistent storage https://github.com/OpenTTD/OpenTTD/pull/9952#issuecomment-1191739918
17:14:33 *** JoeriEvers[m] has left #openttd
17:17:53 *** dell-latitude-e5430 has joined #openttd
17:19:23 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:20:32 *** WormnestAndroid has joined #openttd
17:21:59 <Samu> https://gist.github.com/SamuXarick/a63ba5231e8a2d3c52fc4d59dcc5f678
17:22:10 <Samu> became too ugly
17:22:32 <DorpsGek> [OpenTTD/team] glx22 commented on issue #326: [pt_BR] Translator access request https://github.com/OpenTTD/team/issues/326
17:23:20 *** Smedles has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
17:23:26 *** Smedles has joined #openttd
17:24:57 *** ely-the-kitsune has quit IRC (Ping timeout: 480 seconds)
17:27:48 <Samu> (int)from - (int)tile == ((int)tile - (int)to) / ::DistanceManhattan(tile, to)
17:28:09 <Samu> we already know the distance from 'from' to 'tile' is 1
17:29:05 <Samu> tile and to can be however not in the same axis
17:29:23 <LordAro> if you have to explain it to us, it should be explained in code
17:29:29 <Samu> distancemanhattan gives integers, no decimals
17:29:30 <LordAro> preferably with an intermediate variable
17:29:47 <Samu> i'm thinking
17:30:29 <LordAro> but as you say, DiagdirBetweenTiles exists
17:30:32 <LordAro> why are you not using that?
17:30:43 <Samu> there is no equivalent squirrel function
17:30:52 <LordAro> ...you're not in squirrel?
17:30:57 <Samu> what would I write in the declaration
17:31:04 <Samu> the comment
17:31:40 <LordAro> i don't understand the issue with writing it as is
17:32:05 <Samu> one would assume there is a Script::DiagdirBetweeTiles
17:32:11 <LordAro> why?
17:32:42 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:33:10 *** WormnestAndroid has joined #openttd
17:33:16 <Samu> I don't think any other function does that
17:35:02 <LordAro> there's plenty of @pre statements that aren't full code
17:39:11 <Samu> oh, you're right, found one
17:39:28 <Samu> it uses KillFirstBit
17:39:57 <Samu> in the comment it isn't there though, but the functionality is explained as a note
17:41:48 <Samu> so it's a matter of english now, and I'm bad at it
17:44:46 <Samu> i just realized there's no way to build a rail in the edge of the map if its direction is towards the void
17:45:00 <Samu> must use valid tiles :o
17:45:27 <nielsm> good thing rail track isn't directional, you can just build away from the void instead
17:46:09 <Samu> well, the opposite direction still requires a tile to be in the void
17:46:29 <Samu> at least there's BuildRailTrack, to compensate
17:46:39 <Samu> where BuildRail would fail
17:48:31 <Samu> i think IsValidTile(from) and IsValidTile(to) don't need to be a precondition
17:50:07 <nielsm> on the other hand, how often is it actually a problem that you can't build a rail track that connects to the void?
17:50:56 <nielsm> maybe if you're doing some weird signals abuse to build computers
18:02:47 * Rubidium wonders when you want to make a track that starts or ends in the void
18:04:04 <Rubidium> in my opinion doing that very likely means your code (path finder) is broken in some way
18:05:39 <LordAro> but the edgecases!
18:06:11 <LordAro> occasionally you can see why CS just made the world border ocean
18:19:14 <nielsm> also regarding building on the edge, even if you make that function work for the south edges on the map, I think it could break on the north edges because you don't have void tiles there
18:22:08 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:33:16 *** tokai|noir has quit IRC (Quit: c('~' )o)
18:41:51 <andythenorth> well
18:41:55 * andythenorth has been away
18:42:11 <supermop_work> same
18:48:51 <Samu> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:disallow-building/removing-rail-backwards
18:49:05 <Samu> what to write in the comment
19:24:21 <Samu> something in the rail pathfinder still confusing
19:24:34 <Samu> so it plans a bridge
19:24:50 <Samu> then the neighbours after crossing the bridge are...
19:26:43 <Samu> the same
19:27:25 <Samu> https://i.imgur.com/d5iu2RI.png
19:28:11 <Samu> feels like it doesn't have to push 3 times
19:28:17 <Samu> once would suffice
19:29:23 <Samu> 3 times the same neighbour with the same direction and the same cost/estimate
19:49:11 *** nielsm has quit IRC (Ping timeout: 480 seconds)
19:57:48 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
19:58:56 <TrueBrain> glx: it is shocking how much less dependabot activity without boto* :P
19:59:04 <glx> yeah
20:03:25 *** WormnestAndroid has joined #openttd
20:06:57 *** dell-latitude-e5430 has quit IRC (Remote host closed the connection)
20:10:22 *** ely-the-kitsune has joined #openttd
20:15:48 *** tokai has joined #openttd
20:15:48 *** ChanServ sets mode: +v tokai
20:16:59 *** sla_ro|master has joined #openttd
20:44:07 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
20:44:43 *** WormnestAndroid has joined #openttd
21:13:37 *** andythenorth has quit IRC (Quit: andythenorth)
21:17:18 *** gelignite has quit IRC (Quit: Stay safe!)
21:25:28 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
21:25:58 *** WormnestAndroid has joined #openttd
21:31:17 *** tokai has quit IRC (Quit: c('~' )o)
21:34:46 *** esselfe has quit IRC (Quit: rebooting)
21:38:07 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
21:38:12 *** WormnestAndroid has joined #openttd
21:38:53 *** tokai has joined #openttd
21:38:53 *** ChanServ sets mode: +v tokai
21:40:56 *** esselfe has joined #openttd
21:50:22 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
21:55:10 *** Samu has quit IRC (Ping timeout: 480 seconds)
22:26:34 *** sla_ro|master has quit IRC ()
22:42:29 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:20:41 *** lobster has joined #openttd
23:21:11 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
23:21:27 *** lobstarooo has joined #openttd
23:22:47 *** ely-the-kitsune has joined #openttd
23:25:47 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
23:26:35 *** ely-the-kitsune has joined #openttd
23:27:00 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
23:28:44 *** lobster has quit IRC (Ping timeout: 480 seconds)
23:28:48 *** lobstarooo is now known as lobster
23:29:07 *** ely-the-kitsune has joined #openttd
23:34:14 *** ely-the-kitsune has quit IRC (Read error: Connection reset by peer)
23:43:06 *** ely-the-kitsune has joined #openttd
23:50:44 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
23:51:11 *** ely-the-kitsune has joined #openttd