IRC logs for #openttd on OFTC at 2018-09-02
            
00:08:49 *** Wacko1976 has quit IRC
00:10:21 *** Progman has quit IRC
00:14:30 *** Tharbakim has quit IRC
00:15:08 *** Wormnest has quit IRC
00:18:15 *** glx has joined #openttd
00:18:15 *** ChanServ sets mode: +v glx
00:31:13 *** hph^ has quit IRC
00:31:32 *** hph^ has joined #openttd
00:45:01 *** KouDy has joined #openttd
00:56:06 *** Wolf01 has quit IRC
01:32:33 *** Tharbakim has joined #openttd
01:50:44 *** KouDy has quit IRC
01:51:42 *** Supercheese has quit IRC
01:52:03 *** Supercheese has joined #openttd
02:11:01 <Samu> what's the difference between cargoID cargo_type and cargoClass cargo_class ?
02:20:36 <Samu> nevermind, i got it
02:20:45 <Samu> LuDiAI had it wrong
02:20:55 <Samu> I'm surprised it still worked
02:31:10 <LordAro> welcome to software :p
02:33:21 *** sim-al2 has quit IRC
02:49:00 *** HerzogDeXtEr has quit IRC
02:49:41 <Samu> i'm off to bed, take care
02:49:49 *** Samu has quit IRC
03:18:25 *** Gustavo6056 has joined #openttd
03:25:28 *** Gustavo6046 has quit IRC
03:25:28 *** Gustavo6056 is now known as Gustavo6046
03:36:11 *** KouDy has joined #openttd
03:43:02 *** KouDy has quit IRC
03:59:35 *** glx has quit IRC
04:18:22 *** Gustavo6056 has joined #openttd
04:24:01 *** KouDy has joined #openttd
04:25:33 *** Gustavo6046 has quit IRC
04:25:33 *** Gustavo6056 is now known as Gustavo6046
04:39:48 *** KouDy has quit IRC
04:54:42 *** KouDy has joined #openttd
04:57:28 *** KouDy has quit IRC
05:18:20 *** Gustavo6056 has joined #openttd
05:25:29 *** Gustavo6046 has quit IRC
05:25:29 *** Gustavo6056 is now known as Gustavo6046
05:32:06 *** KouDy has joined #openttd
05:34:15 *** haudrauf has quit IRC
05:38:07 *** haudrauf has joined #openttd
05:40:06 *** KouDy has quit IRC
06:18:39 *** Gustavo6056 has joined #openttd
06:22:12 *** Suprcheese has joined #openttd
06:25:33 *** Gustavo6046 has quit IRC
06:25:33 *** Gustavo6056 is now known as Gustavo6046
06:28:29 *** Supercheese has quit IRC
06:28:38 *** Suprcheese is now known as Supercheese
07:04:00 *** KouDy has joined #openttd
07:07:11 *** Alberth has joined #openttd
07:07:11 *** ChanServ sets mode: +o Alberth
07:18:35 *** Gustavo6056 has joined #openttd
07:26:03 *** Gustavo6046 has quit IRC
07:26:03 *** Gustavo6056 is now known as Gustavo6046
07:34:30 *** Flygon has joined #openttd
08:02:45 *** nielsm has joined #openttd
08:48:20 *** Progman has joined #openttd
08:49:05 *** Gustavo6056 has joined #openttd
08:56:03 *** Gustavo6046 has quit IRC
08:56:03 *** Gustavo6056 is now known as Gustavo6046
08:59:55 *** KouDy has quit IRC
09:00:09 *** sla_ro|master has joined #openttd
09:01:16 *** chomwitt has joined #openttd
09:17:42 *** KouDy has joined #openttd
10:32:37 *** Wolf01 has joined #openttd
10:33:08 <Wolf01> o/
10:52:01 *** Supercheese has quit IRC
10:52:14 <Alberth> hi hi
10:52:24 *** Supercheese has joined #openttd
11:00:54 *** Supercheese has quit IRC
11:31:16 *** Samu_ has joined #openttd
11:31:54 <Samu_> what if the pathfinder actually used real costs
11:33:58 <Alberth> number of electrons used for displaying the train or so?
11:34:20 <Samu_> the money type of cost
11:34:55 <Samu_> not whatever internal cost it uses now
11:36:10 <Alberth> distance is time, time is money, so 1 railtrack has fixed cost
11:36:41 <Alberth> therefore it makes no difference whether you count railtrack pieces or number of fixed cost to apply
11:38:37 <Samu_> You are not allowed to change parameters of a running pathfinder.
11:38:38 <Samu_> boo
11:38:43 <Samu_> guess it's not possible
11:39:57 *** Wormnest has joined #openttd
11:40:54 <Samu_> oh i see
11:41:13 <Samu_> road re-use costs would maybe cause weird path choices
11:41:20 <Samu_> cost would be always 0
11:47:22 <Samu_> oh, bridges
11:47:24 <Samu_> hmm
11:47:32 <Samu_> cost of a bridge
11:47:37 <Samu_> how would it decide
11:47:47 <Samu_> the bridge type
11:47:53 <Samu_> to get the cost off
11:49:11 <Samu_> i think i'm editing pathfinder.road.4
11:49:18 <Samu_> wanna experiment with money costs
11:51:41 <Samu_> oh, Alberth one thing
11:51:58 <Samu_> i got some semi-repetitive classes
11:52:05 <Samu_> wait, i'm copy pastying
11:57:01 <Samu_> https://paste.openttdcoop.org/pfjjpkvto
11:57:05 <Samu_> here
11:57:37 <Samu_> all cases where I needed classes
11:58:26 <Samu_> there' some that are quite similar, just wondering if this could be made in another manner
12:01:45 <Samu_> anyway, it works great the way it is
12:01:52 <Samu_> just wondering if it's sub-optimal code
12:07:32 *** Wacko1976 has joined #openttd
12:08:53 <Samu_> nevermind
12:09:06 <Samu_> it works, that's all that matters
12:11:52 <Samu_> oh, before I go head on into the pathfinder code
12:12:06 <Samu_> there's something before that that needs fixing
12:12:20 <Samu_> bridges :(
12:12:37 <Samu_> the pathfinder returns a bunch of tiles
12:12:53 <Samu_> the building that happens always fails to detect an existing bridge
12:13:08 <Samu_> because of road auto-complete
12:14:04 <Samu_> tiles 1 -> 2 -> 3 where 3 is an existing bridge
12:14:28 <Samu_> the builder starts from 1 -> 2, builds a road from middle of tile 1 to middle of tile 2
12:14:47 <Samu_> but when building from middle of tile 2 to middle of tile 3
12:15:01 <Samu_> it connects the bridge with an extra road piece
12:15:18 <Samu_> that's what is making it fail to detect a bridge after
12:15:39 <Samu_> it checks if it's connected
12:15:50 <Samu_> and since it is, it doesn't even bother checking the bridge
12:16:40 <Samu_> what can I do so that I can actually keep track of bridges
12:18:51 <Samu_> I failed my explanation
12:19:18 <Samu_> when building 1 -> 2 it actually connects everything from 1 to 3
12:19:29 <Samu_> it doesn't build up to the middle of tile 2
12:20:39 <Samu_> more precisely, from the middle of tile 1 to the edge of tile 2, which then it means tiles 2 and 3 are connected
12:21:15 <Alberth> build from edge to edge
12:22:01 <Alberth> or build 4 half-tiles at a tile
12:22:47 <Alberth> (ie build code thinks in road units of 1/2 a tile
12:23:37 <Samu_> AIRoad.BuildRoad says it connects from middle of tile start to middle of tile end, and that is not entirely true
12:26:10 <Samu_> in this situation, with a bridge ahead, it connected from middle of start tile to edge of tile end :(
12:26:39 <Samu_> bug or just mimicing human behaviour?
12:31:42 <Samu_> I wish i could make a gif
12:33:44 *** Wormnest has quit IRC
12:36:33 <Samu_> now with a picture https://imgur.com/a/OyyBDOh
12:36:39 <Samu_> easier to spot the problem
12:46:10 <DorpsGek_II> [OpenTTD/OpenTTD] YodasWs opened issue #6888: Add layer(s) showing station coverage https://github.com/OpenTTD/OpenTTD/issues/6888
12:47:53 *** frosch123 has joined #openttd
12:51:14 <Alberth> hmm, tricky puzzle
12:52:29 <Alberth> technically it's incorrect wrt to its description I agree, but not sure other options exist there
12:52:53 <Alberth> ie you can't build a half tile road under the bridge head
12:54:05 <Alberth> not to mention it will likely break all AIs if you change it
12:57:05 *** john-aj has joined #openttd
13:05:50 *** HerzogDeXtEr has joined #openttd
13:11:07 <Samu_> it would build the missing half tile
13:11:51 <Samu_> or at least I think it would
13:12:00 <Samu_> if it's mimicing human behaviour again
13:37:52 <Samu_> lines 886 and 887 of roac_cmd.cpp
13:38:45 <Samu_> seems to be where it's causing the issue
13:38:51 <Samu_> road_cmd.cpp
13:39:49 *** gelignite has joined #openttd
13:41:10 *** KouDy has quit IRC
13:45:48 *** john-aj has quit IRC
13:52:31 <Samu_> maybe not
13:52:36 <Samu_> im still investigating
13:54:10 *** KouDy has joined #openttd
13:58:36 *** KouDy has quit IRC
14:06:07 *** hrnek has joined #openttd
14:06:22 <hrnek> there's a lot of people here
14:06:24 <hrnek> HI
14:07:11 <Wolf01> Hi
14:07:28 <hrnek> I'm translating the wiki and there's the {{Railway_toolbar_overview}}
14:07:35 <hrnek> in railways
14:07:49 <Wolf01> Template
14:07:59 <hrnek> it's a nice table describing what each part does, but it stays in english
14:08:05 <hrnek> how can I get to it?
14:08:39 <Wolf01> Iirc you need to make a sub-template in your language, it will automatically get it
14:08:52 <LordAro> Template:Foobar
14:09:37 <hrnek> sorry, I've never done templates from scratch
14:12:23 <Wolf01> I made some templates from scratch, it's not difficult, but translating one... I did it once, years ago
14:12:57 <Wolf01> https://www.mediawiki.org/wiki/Content_translation/Templates
14:17:15 <hrnek> looking for the source of the template but I can't find it
14:17:16 <hrnek> http://wiki.openttd.org/Category:Templates
14:17:27 <hrnek> the link helps, though, it's a nice one
14:18:11 <hrnek> I would probably make a copy of the original one and redo whatever needs to be redone
14:19:04 <Wolf01> Call it Railway_toolbar_overview/YourLanguage, so it keeps it tidy, or try to look if it has been done in other languages
14:21:18 <hrnek> Some do..
14:21:36 <hrnek> I believe it's like the main menu on the right side
14:21:40 <hrnek> the same sort of thing
14:21:42 <Wolf01> Just copy what they did, the best approach in wikimedia :P
14:21:51 <hrnek> :D
14:22:47 <hrnek> But I still don't know how to get to the source to copy/edit. They all have it hidden in the {{ X }}
14:23:40 <Wolf01> The links at the bottom of the edit page
14:23:59 <Wolf01> Template:Raiilway_toolbar...
14:25:56 <Wolf01> https://wiki.openttd.org/Template:Railway_toolbar_overview
14:26:21 <Wolf01> So, it just seem you have to create the same template for your language
14:27:02 <hrnek> Ohhhhh, that's how you get to it! Nice!
14:27:05 <Wolf01> Template:RailwayToolbarInYourLanguage/YourLanguageCode
14:27:40 <Samu_> this is strange, i can't spot the issue
14:28:09 <Wolf01> PEBKAC
14:29:28 <Samu_> i can't reproduce the issue :( why
14:34:48 <Samu_> why the heck i can't reproduce the issue now
14:34:54 <hrnek> and I make a new template by going to an address that doesn't exist and edit the page?
14:35:08 <Wolf01> Yes
14:35:26 <Samu_> Alberth: sorry, my report can't be reproduced
14:35:43 <Samu_> it's already doing what it should do
14:35:56 <Samu_> damn, and I thought there was a bug in openttd
14:36:10 <Samu_> https://imgur.com/a/OyyBDOh
14:36:30 <Samu_> it actually does "what it should do" when i tried to reproduce it :(
14:36:35 <Samu_> bah, i fail
14:36:42 <Samu_> sorry for the false alarm
14:37:41 <Alberth> np
14:39:11 *** ToBeFree has joined #openttd
14:40:51 *** ToBeFree has quit IRC
14:42:09 *** hrnek has quit IRC
14:44:40 *** KouDy has joined #openttd
14:55:19 *** Progman has quit IRC
14:59:31 *** gelignite has quit IRC
15:09:08 *** juzza1 has quit IRC
15:10:10 *** juzza1 has joined #openttd
15:17:41 <Samu_> okay, the issue is the builder itself
15:19:34 <Samu_> i failed to interpret what it was doing
15:21:53 <Samu_> line 127 never triggers
15:21:55 <Samu_> https://paste.openttdcoop.org/pptgbn3aq#line-127
15:25:31 <Samu_> instead it triggers line 57, even on a bridge tile
15:25:35 <Samu_> why
15:27:02 <Samu_> actually no, not even that
15:27:34 <Samu_> triggers line 65
15:27:35 <Samu_> my bad
15:39:28 <Samu_> im confused as hell about this builder
15:43:28 *** sim-al2 has joined #openttd
15:48:20 <Alberth> less confused now :)
15:48:54 <Samu_> i found the culprit!
15:49:04 <Samu_> line 82
15:49:15 <Samu_> that && should have been ||
15:49:23 <Samu_> now it works
15:50:01 <Samu_> damn it, I spent so much time figuring out why it wasn't triggering the bridge message
15:51:53 <Samu_> it finally triggered! https://imgur.com/a/yBgr46q
16:08:22 *** Wacko1976 has quit IRC
16:13:00 *** Compu has joined #openttd
16:34:29 *** sim-al2 has quit IRC
16:44:39 *** Webster is now known as Guest2253
16:45:29 *** Webster has joined #openttd
16:51:32 <Samu_> Build a bridge from one tile to the other. As an extra for road, this functions builds two half-pieces of road on each end of the bridge, making it easier for you to connect it to your network.
16:51:46 <Samu_> why's that? it only complicates
16:53:24 <Samu_> it also does the same for tunnels
16:53:26 <Samu_> :(
16:53:50 <Wolf01> It does the same for depots and roadstops
16:53:53 <Samu_> the path builder is smarter enough to know that
16:54:05 <Samu_> orly?
16:54:07 <Samu_> :(
16:55:00 <Samu_> Builds a road depot.
16:55:04 <Samu_> nop, doesn't say anything else
16:55:30 <Wolf01> Did you try to build a depot facing a road?
16:56:00 <Samu_> as an AI? yes, but...
16:56:10 <Samu_> I think i have to manually connect to the road
16:56:12 <Samu_> must test
16:57:35 *** KouDy has quit IRC
16:59:43 <Samu_> testing
17:00:30 *** KouDy has joined #openttd
17:03:08 <Samu_> nop, it doesn't connect automatically
17:03:32 <Wolf01> Strange, the game should do it
17:03:58 <Wolf01> Like when you build it by hand
17:04:16 <Samu_> for the AIs it's better not to
17:04:41 <Samu_> at least in my perspective
17:04:59 <Samu_> gives me a better control of the things happening
17:07:20 *** ToBeFree has joined #openttd
17:10:21 <Samu_> for tunnels and bridges, it doesn't even need a road in front to build the 2 pieces, it just builds it no matter what, that's kinda gay
17:12:54 <Samu_> the pathbuilder is apparently already taking care of these
17:13:31 <Samu_> demolishes them if it needs to build 2 bridges in a row
17:13:38 <Samu_> or tunnel
17:14:14 <Samu_> doesn't seem to make life easier
17:14:22 <Samu_> only complicated
17:14:48 <Wolf01> That might be wrong, yes
17:19:23 *** mloc has joined #openttd
17:22:28 *** Alberth has left #openttd
17:23:54 *** KouDy has quit IRC
17:28:52 <Samu_> yep, no issues for the pathbuilder, but it's just an awkward waste of money
17:29:15 <Samu_> tested just now
18:28:53 *** Wacko1976 has joined #openttd
18:59:52 *** Flygon has quit IRC
19:10:57 *** Gja has joined #openttd
19:19:28 *** Gustavo6056 has joined #openttd
19:19:39 <Wolf01> Bye
19:19:41 *** Wolf01 has quit IRC
19:26:43 *** Gustavo6046 has quit IRC
19:26:43 *** Gustavo6056 is now known as Gustavo6046
19:30:18 <nielsm> hm were anyone here using linux for daily desktop OS? any recommendation for distro? (or, arguments against ubuntu)
19:30:24 *** Stimrol has quit IRC
19:32:52 <LordAro> ubuntu is fine
19:33:12 <LordAro> basically use whatever you're comfortable with
19:34:21 <peter1138> Debian, of course.
19:40:33 *** Stimrol has joined #openttd
19:48:31 <debdog> or anyting without systemd :P
19:48:35 *** Stimrol has quit IRC
19:49:41 <peter1138> systemd is fine
19:50:33 *** Stimrol has joined #openttd
19:58:26 *** andythenorth has joined #openttd
19:58:31 <andythenorth> o/
19:58:35 <andythenorth> real internet :P
19:58:45 <peter1138> Gosh
19:58:56 <SpComb> you mean working IPv6?
19:59:34 <SpComb> I should finally get around to deploying to my shell, but I can't decide between stateless RA and DHCPv6
20:01:27 <LordAro> doesn't look like working ipv6, from the rdns :p
20:01:40 <LordAro> also because it's virgin media
20:06:43 *** tokai has joined #openttd
20:06:43 *** ChanServ sets mode: +v tokai
20:06:45 *** Wacko1976 has quit IRC
20:07:12 *** gelignite has joined #openttd
20:08:06 *** Wacko1976 has joined #openttd
20:12:49 <Samu_> something weird with pathfinder, does it not count drivethrough stations as roads or something?
20:12:58 <andythenorth> but where is deliveroo? :|
20:13:03 * andythenorth is hungry
20:13:40 *** tokai|noir has quit IRC
20:14:51 *** Supercheese has joined #openttd
20:17:13 <andythenorth> oof
20:17:19 <andythenorth> laptop screen is unfeasibly wide
20:17:25 <andythenorth> 2 weeks using 4 inch phone
20:17:36 <andythenorth> my eyes can't stretch this big :P
20:22:42 *** Arveen2 has quit IRC
20:22:59 *** Arveen2 has joined #openttd
20:24:09 *** Arveen has joined #openttd
20:43:11 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #6885: Feature: [NewGRF] Increase size of persistent storage to 256. https://github.com/OpenTTD/OpenTTD/pull/6885#issuecomment-417951104
20:47:37 *** Stimrol has quit IRC
20:54:12 *** KouDy has joined #openttd
20:58:25 *** Progman has joined #openttd
21:05:36 *** gelignite has quit IRC
21:09:37 *** KouDy has quit IRC
21:15:57 <DorpsGek_II> [OpenTTD/OpenTTD] frosch123 merged pull request #6886: Fix: Variable 0x85 had no bounds checks. https://github.com/OpenTTD/OpenTTD/pull/6886
21:15:57 <DorpsGek_II> [OpenTTD/OpenTTD] frosch123 pushed 1 commits to master:
21:15:57 <DorpsGek_II> - Fix: Variable 0x85 had no bounds checks. (by frosch123)
21:15:58 <DorpsGek_II> https://github.com/OpenTTD/OpenTTD/commit/6391d4927744
21:22:30 <frosch123> hmm, dg2 does not report about approval
21:23:09 <Samu_> vehicles in the way are annoying
21:23:19 <Samu_> especially when I am trying to remove a station
21:25:06 <nielsm> my best suggestion is that you try to restructure your code into assembling a list of actions to be performed, so it can retry actions later if they fail once
21:27:57 <nielsm> for instance, an entry in that list could contain fields like: actual action to perform, number of times attempted, excepted cost, deadline for when it must be done by, reference to internal goal the action is part of (i.e. route build)
21:28:43 <nielsm> the internal goal thing could be used for backing out of a failed build attempt and develop an alternate plan
21:28:46 <nielsm> and more
21:28:46 *** Wormnest has joined #openttd
21:31:17 <DorpsGek_II> [OpenTTD/OpenTTD] michicc merged pull request #6885: Feature: [NewGRF] Increase size of persistent storage to 256. https://github.com/OpenTTD/OpenTTD/pull/6885
21:31:18 <DorpsGek_II> [OpenTTD/OpenTTD] michicc pushed 1 commits to master:
21:31:18 <DorpsGek_II> - Feature: [NewGRF] Increase size of persistent storage to 256. (by michicc)
21:31:18 <DorpsGek_II> https://github.com/OpenTTD/OpenTTD/commit/4b0b4e06435b
21:38:29 <Samu_> oh, fixes!
21:40:20 <Samu_> nielsm: that is a lot of stuff
21:41:52 <Samu_> i'm gonna do what I've seen everywhere else in the code, try for 500 times to remove the station. If it still fails, well.... leave it
21:42:12 <Samu_> guess it's not the best solution
21:42:56 <Samu_> or do the way i do for airports
21:43:07 <Samu_> every loop look for empty stations and remove them
21:45:08 <Samu_> the route manager dude however might break, i still don't quite understand how LuDi is keeping everything tracked down
21:50:37 <andythenorth> ooh
21:50:39 <andythenorth> 10 PRs open
21:50:44 <andythenorth> not bad
21:51:19 *** john-aj has joined #openttd
21:51:25 <frosch123> still, noone wants to review stuff
21:51:40 <andythenorth> there's a fear factor to reviewing eh
21:51:52 <peter1138> I guess OpenTTD is dead then.
21:51:58 <andythenorth> nobody wants to get yelled at
22:03:52 *** john-aj has quit IRC
22:04:13 *** Supercheese has quit IRC
22:06:38 *** sla_ro|master has quit IRC
22:11:12 *** nielsm has quit IRC
22:22:44 *** andythenorth has quit IRC
22:48:34 *** frosch123 has quit IRC
22:57:59 *** sim-al2 has joined #openttd
23:04:31 *** KouDy has joined #openttd
23:44:25 *** Wacko1976 has quit IRC
23:51:38 <Samu_> how do i remove an item from an array
23:57:04 <Samu_> inside a for cycle in the same array, not possible?
23:57:30 *** Wormnest has quit IRC
23:58:06 <Samu_> halp! :) i'm new to arrays
23:58:34 <Samu_> for(local i = 0; i < routeManager.m_townRouteArray.len(); ++i) {
23:59:34 <Samu_> i do some checking and I find a m_townRouteArray[i] that is of no use, I wanna remove it, while inside the for cycle, is that possible? or is it gonna ruin something?