IRC logs for #openttd on OFTC at 2018-09-23
⏴ go to previous day
00:05:10 *** Gustavo6056 is now known as Gustavo6046
00:09:54 *** techmagus has joined #openttd
00:19:44 *** Smedles has joined #openttd
00:29:58 *** Hobbyboy has joined #openttd
00:42:14 *** Supercheese has joined #openttd
00:58:01 *** Gustavo6056 has joined #openttd
01:00:08 *** snail_UES_ has joined #openttd
01:05:10 *** Gustavo6056 is now known as Gustavo6046
01:07:30 *** Supercheese has joined #openttd
01:17:14 *** synchris has joined #openttd
01:19:13 *** Thedarkb-T60 has joined #openttd
01:47:30 *** sim-al2 has joined #openttd
01:58:29 *** Gustavo6056 has joined #openttd
02:05:42 *** Gustavo6056 is now known as Gustavo6046
02:25:53 *** ToBeFree has joined #openttd
02:55:30 *** Mahjong has joined #openttd
02:56:20 *** Mahjong has joined #openttd
02:58:41 *** Gustavo6056 has joined #openttd
03:05:42 *** Gustavo6056 is now known as Gustavo6046
03:37:17 *** Sheogorath has joined #openttd
03:58:49 *** Gustavo6056 has joined #openttd
04:05:42 *** Gustavo6056 is now known as Gustavo6046
04:41:50 *** greeter has joined #openttd
04:58:56 *** Gustavo6056 has joined #openttd
05:05:45 *** Gustavo6056 is now known as Gustavo6046
05:37:40 *** Supercheese has joined #openttd
05:42:18 *** OsteHovel has joined #openttd
05:43:27 *** haudrauf has joined #openttd
05:58:41 *** Gustavo6056 has joined #openttd
06:06:13 *** Gustavo6056 is now known as Gustavo6046
06:58:48 *** Gustavo6056 has joined #openttd
07:06:18 *** Gustavo6056 is now known as Gustavo6046
07:44:26 *** Smedles has joined #openttd
07:47:50 *** Alberth has joined #openttd
07:47:50 *** ChanServ sets mode: +o Alberth
07:59:03 *** Gustavo6056 has joined #openttd
08:06:18 *** Gustavo6056 is now known as Gustavo6046
08:08:04 *** Mahjong1 has joined #openttd
08:10:52 *** Mahjong1 has joined #openttd
08:11:52 *** Hobbyboy has joined #openttd
08:13:02 *** Mahjong2 has joined #openttd
08:13:43 *** sushibear_ has joined #openttd
08:17:32 *** Mahjong has joined #openttd
08:19:32 *** IgnoredAmbience has quit IRC
08:21:43 *** Thedarkb-T60 has joined #openttd
08:22:40 *** OsteHovel has joined #openttd
08:22:40 *** Sheogorath has joined #openttd
08:22:40 *** IgnoredAmbience has joined #openttd
08:22:40 *** ^Spike^ has joined #openttd
08:22:40 *** DorpsGek_II has joined #openttd
08:22:40 *** Alkel_U3 has joined #openttd
08:22:40 *** milek7_ has joined #openttd
08:28:41 *** IgnoredAmbience has quit IRC
08:29:54 *** OsteHovel has joined #openttd
08:29:54 *** Sheogorath has joined #openttd
08:29:54 *** IgnoredAmbience has joined #openttd
08:29:54 *** ^Spike^ has joined #openttd
08:29:54 *** DorpsGek_II has joined #openttd
08:29:54 *** Alkel_U3 has joined #openttd
08:29:54 *** milek7_ has joined #openttd
08:59:24 *** Gustavo6056 has joined #openttd
09:06:17 *** Gustavo6056 is now known as Gustavo6046
09:09:15 *** HerzogDeXtEr has joined #openttd
09:11:18 *** Gustavo6056 has joined #openttd
09:16:18 *** Gustavo6056 is now known as Gustavo6046
09:25:19 <LordAro> known error in admiralai, iirc
09:25:27 <LordAro> since yexo is gone...
10:10:39 *** andythenorth has joined #openttd
10:11:25 *** Gustavo6056 has joined #openttd
10:18:42 *** Gustavo6056 is now known as Gustavo6046
10:21:54 <andythenorth> too early to tell
10:21:58 <andythenorth> please dial again later
10:36:38 *** Gustavo6046 has joined #openttd
10:41:29 <Wolf01> andythenorth stud.io 2.0 with "stability check" function, seems nice to test if a technic moc stays in place or falls apart :P
10:49:29 <andythenorth> under what conditions? :P
10:49:47 <andythenorth> does it model static loads?
10:49:54 <andythenorth> or driving it down the stairs?
10:51:01 <Wolf01> At least you shouldn't have an entire gearbox falling apart because you forgot an axle
10:52:16 <Wolf01> I still miss a functional check for technic, so you can rotate an axle and look if the function it drives works
10:52:43 <Wolf01> SR32 does it, but I'm not able to use that one for building
10:53:02 *** Progman has joined #openttd
11:11:32 *** Gustavo6056 has joined #openttd
11:15:02 *** sla_ro|master has joined #openttd
11:18:07 *** Gustavo6056 is now known as Gustavo6046
11:20:15 *** gelignite has joined #openttd
12:11:34 *** Gustavo6056 has joined #openttd
12:18:48 *** Gustavo6056 is now known as Gustavo6046
12:25:07 *** Thedarkb-T60 has joined #openttd
12:25:22 *** frosch123 has joined #openttd
12:32:34 *** GroovyNoodle has joined #openttd
13:11:52 *** Gustavo6056 has joined #openttd
13:17:17 *** andythenorth has joined #openttd
13:19:07 *** Gustavo6056 is now known as Gustavo6046
13:25:32 *** GroovyNoodle has joined #openttd
13:57:44 *** chomwitt has joined #openttd
13:57:49 *** V453000 has joined #openttd
14:11:49 *** Gustavo6056 has joined #openttd
14:19:08 *** Gustavo6056 is now known as Gustavo6046
14:27:38 *** TrueBrain has joined #openttd
14:27:39 <Samu> what is better pathfinder-wise? forbid level crossings or a very high penalty for level crossing?
14:31:44 *** Lejving_ has joined #openttd
15:12:22 *** Gustavo6056 has joined #openttd
15:19:08 *** Gustavo6056 is now known as Gustavo6046
15:29:17 <Samu> TrueBrain has created a tournament server and is regularly running competitions between AIs. It is currently offline. Check back in a few weeks for updates.
15:30:42 <LordAro> that's not been run in... 10 years?
15:31:24 *** argoneus has joined #openttd
15:59:33 <Samu> blog.openttd.org does not exist
15:59:56 *** synchris has joined #openttd
16:06:17 *** gelignite has joined #openttd
16:08:37 <Samu> i have a suggestion: one way drive through stations, plz do it!
16:08:59 <LordAro> surround it with one-way roads
16:10:44 <Samu> but the vehicles can't use both sides of the road as one direction anyway :(
16:11:18 <LordAro> so it wouldn't make any difference
16:12:23 *** Gustavo6056 has joined #openttd
16:12:38 *** Wolf01 is now known as Guest1139
16:12:47 <Samu> AIRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION
16:12:59 <Samu> what is this error for? when does it trigger?
16:14:07 <Samu> it's when i try to place a X station in a Y road
16:19:36 <Samu> I'm not sure if i should trust the documentation
16:19:37 *** Gustavo6056 is now known as Gustavo6046
16:19:51 <Samu> i'm pretty sure there are more errors than these
16:19:59 <Samu> and they're not being listed
16:27:28 <LordAro> documentation is usually very good
16:37:57 <Samu> pathfinder doesn't count road stations as nodes
16:38:08 <Samu> only counts drivethrough stations
16:39:58 <Samu> and i bet the same happens road depots
16:40:19 <Samu> imagine that was the intention
16:40:32 <Samu> to pathfind to a road depot or road station
16:57:34 <Samu> ((AIRoad.IsRoadStationTile(next_tile) || AIRoad.IsRoadDepotTile(next_tile)) && AITile.GetOwner(next_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF))
16:58:29 <Samu> couldn't it just be: AITile.GetOwner(next_tile) == AICompany.COMPANY_SELF
16:58:52 <Samu> is the ResolveCompanyID actually needed'
17:01:54 *** Wormnest has joined #openttd
17:05:38 <Samu> COMPANY_SELF = 254, ///< Constant that gets resolved to the correct company index for your company.
17:12:20 *** Gustavo6056 has joined #openttd
17:19:37 *** Gustavo6056 is now known as Gustavo6046
17:37:40 *** snail_UES_ has joined #openttd
17:41:18 *** rocky113844 has joined #openttd
17:52:51 <Samu> but i discovered another one
17:54:16 <Samu> an existing bridge with its direction towards a drivethrough station in an incompatible direction
17:54:46 <Samu> pathfinder thinks the path is open
17:59:01 *** GroovyNoodle has joined #openttd
18:12:43 *** Gustavo6056 has joined #openttd
18:19:37 *** Gustavo6056 is now known as Gustavo6046
18:26:09 <Samu> this one is more complicated to fix, grr
18:26:28 <Samu> seems that my fixes are breaking other functionality
18:38:25 *** andythenorth has joined #openttd
18:46:10 <Wolf01> Mmmh, astroneer melts my pc :S
18:48:23 <Samu> Road::_CheckDirection why is checkdirection always returning false?
18:49:17 <Samu> what would it be useful for if it had a use?
19:12:35 *** Gustavo6056 has joined #openttd
19:14:00 <Samu> what will this return if the tile is outside the map
19:15:40 <Samu> i hope it returns the tile outside the map in this case
19:20:08 *** Gustavo6056 is now known as Gustavo6046
19:37:29 <Samu> bah, can't use distancemanhattan
19:59:21 *** Progman has joined #openttd
20:08:50 *** sla_ro|master has joined #openttd
20:12:48 *** Gustavo6056 has joined #openttd
20:20:08 *** Gustavo6056 is now known as Gustavo6046
20:39:39 <Samu> can i append repeated items in an array?
20:43:55 <Samu> oh well, i totally forgot about the depot
20:44:05 <Samu> it is built on the array
20:45:03 <Samu> how to keep track of the array
20:55:16 *** haudrauf has joined #openttd
21:11:42 *** Gustavo6056 has joined #openttd
21:19:12 *** Gustavo6056 is now known as Gustavo6046
22:12:12 *** Gustavo6056 has joined #openttd
22:19:12 *** Gustavo6056 is now known as Gustavo6046
22:32:16 <Samu> help me avoid code repetition
22:33:56 <Samu> lines 13-32, repeated at lines 39-58, and repeated at lines 79-103 with the exception of the _slope cost
22:35:38 <Samu> oops, exception of the _coast cost
22:41:01 <Samu> my problem is the self thingy
22:42:46 <Samu> the self_ is a aystart + pathfinder thingy, they work together, i think it's a callback
22:43:17 <glx> self is the current object
22:44:14 <glx> and it's the first parameter of your Road::_Cost() function
22:44:52 <Samu> ehm, the code isn't exactly mine, i just edited stuff in
22:45:30 <glx> you can put the repeated part in a function and pass it self
22:48:32 <glx> the 13-31 (without the return) goes to the new function and return the calculater cost
22:49:18 <glx> and line 32 becomes return path.GetCost() + new_function_calculating_cost(self);
22:50:42 <glx> for the last block you call the function, add the _cost_slope as needed like it's done now, then the return
22:54:50 <Samu> trying function Road::_CostHelper(self, prev_tile, new_tile)
22:56:25 <Samu> return path.GetCost() + self._CostHelper(self, prev_tile, new_tile);
22:56:47 <Samu> is it ok for self to be repeated there
22:57:03 <Samu> I don't see this anywhere else
23:01:18 <Samu> heh, the coast cost is also repeated
23:04:19 *** Eddi|zuHause has joined #openttd
23:12:21 *** Gustavo6056 has joined #openttd
23:19:13 *** Gustavo6056 is now known as Gustavo6046
23:19:47 <Samu> i'm playing with null vs false vs true, hope the behaviour is the same
23:23:01 <glx> add temporary debug messages to check
23:23:26 <glx> seems like a big abuse of untyped language
23:28:56 <Samu> oops, the index path does not exist
23:29:25 *** Thedarkb-T60 has joined #openttd
23:34:06 <Samu> coast_cost_only == false is too common
23:34:31 <Samu> im not debugging this the right way :(
23:42:02 <Samu> it's null when on bridge tiles
23:44:45 <Samu> probably gonna be rare, it's when the ai wants to build a bridge and it ends on a coast tile with water
23:46:26 *** andythenorth has joined #openttd
23:46:36 <andythenorth> enable flip for articulated vehicles?
23:46:49 <andythenorth> it's probably fine, just a lot of CB36 nonsense to handle
23:48:01 <andythenorth> oh it's the samu channel :)
23:48:09 <andythenorth> I should write a github issue
23:50:37 <Samu> working as intended then
23:56:33 <Samu> thx glx, I believe this part is working
continue to next day ⏵