IRC logs for #openttd on OFTC at 2022-07-21
⏴ go to previous day
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: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 *** 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: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: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: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: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: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: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:44:16 *** Wormnest has joined #openttd
13:59:56 *** sla_ro|master has quit IRC ()
14:02:58 <Samu> if tile from and tile to are the same, it doesn't fail
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: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: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:14:56 *** andythenorth has joined #openttd
15:16:38 *** ely-the-kitsune has quit IRC (Remote host closed the connection)
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: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:36:21 <Samu> from != to was not sufficient when the rail was longer than 1 tile
16:37:04 *** Smedles has joined #openttd
16:37:24 <LordAro> doing arithmetic on tileindexes like that seems very wrong
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: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:51:03 <Samu> there is however no ScriptMap::DiagdirBetweenTiles
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: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: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: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: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: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: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: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: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:49:05 <Samu> what to write in the comment
19:24:21 <Samu> something in the rail pathfinder still confusing
19:24:50 <Samu> then the neighbours after crossing the bridge are...
19:28:11 <Samu> feels like it doesn't have to push 3 times
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
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 *** 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 *** 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
continue to next day ⏵