Config
Log for #openttd on 18th February 2020:
Times are UTC Toggle Colours
00:06:22  *** elliot[m] has joined #openttd
00:06:59  *** pina[m] has joined #openttd
00:07:53  *** tokai|noir has joined #openttd
00:07:53  *** ChanServ sets mode: +v tokai|noir
00:09:20  *** magdalena[m] has joined #openttd
00:10:55  *** yur3shmukcik[m] has joined #openttd
00:13:47  *** vanessa[m] has joined #openttd
00:13:52  *** ciet[m] has joined #openttd
00:15:03  *** tokai has quit IRC
00:15:05  *** paulus[m] has joined #openttd
00:16:46  *** natmac[m] has joined #openttd
00:17:53  *** iarp[m] has joined #openttd
00:27:31  *** Compu has joined #openttd
00:29:48  *** buggeas40d[m] has joined #openttd
00:33:47  <Eddi|zuHause> weird, i could load the cities skylines save yesterday, but that exact same savegame now throws simulation errors on load
00:40:37  *** amal[m] has joined #openttd
00:40:58  *** fjodor[m] has joined #openttd
00:41:25  *** osvaldo[m] has joined #openttd
00:43:10  *** ircer[m] has joined #openttd
00:45:53  *** dag[m] has joined #openttd
00:49:18  *** olivier[m] has joined #openttd
01:04:57  *** Flygon has joined #openttd
01:06:51  *** khavik[m] has joined #openttd
01:09:12  *** ist5shreawf[m] has joined #openttd
01:09:59  *** Corns[m] has joined #openttd
01:11:08  *** ad5twoknebor[m] has joined #openttd
01:11:13  *** twom[m] has joined #openttd
01:13:08  *** arron[m] has joined #openttd
01:14:51  *** pothyurf[m] has joined #openttd
01:15:43  *** Heiki[m] has joined #openttd
01:16:30  *** albert[m] has joined #openttd
01:18:56  *** cawal[m] has joined #openttd
01:21:03  *** robert[m]1 has joined #openttd
01:21:55  *** jact[m] has joined #openttd
01:26:32  *** natalie[m] has joined #openttd
01:27:03  *** nartir[m] has joined #openttd
01:33:54  *** lapav[m] has joined #openttd
01:34:00  *** jeeg[m] has joined #openttd
01:48:12  *** UncleCJ[m] has joined #openttd
01:53:59  *** patricia[m] has joined #openttd
02:02:44  *** labs[m] has joined #openttd
02:02:50  *** yoltid[m] has joined #openttd
02:06:24  *** nolep[m] has joined #openttd
02:07:31  *** karoline[m] has joined #openttd
02:08:33  *** Wormnest has quit IRC
03:03:28  *** Wormnest has joined #openttd
03:23:02  *** D-HUND has joined #openttd
03:26:28  *** debdog has quit IRC
03:55:05  *** glx has quit IRC
04:09:38  *** Wormnest has quit IRC
07:13:05  *** andythenorth has joined #openttd
07:21:04  <andythenorth> should I join reddit? :P
07:35:45  *** WormnestAndroid has quit IRC
07:36:01  *** WormnestAndroid has joined #openttd
07:49:44  *** cHawk_ has joined #openttd
08:11:21  *** adikt- has joined #openttd
08:15:30  <Eddi|zuHause> 5 years ago? maybe
08:16:21  <andythenorth> currently recommending disabling 90º turns to make pathfinding more reliable
08:16:27  <andythenorth> empirically, the opposite is true
08:16:50  <andythenorth> https://www.reddit.com/r/openttd/comments/f571ub/hello_new_players_go_to_settings_disable_90_turns/
08:17:29  <Eddi|zuHause> for ships it should probably be disabled
08:17:32  *** adikt has quit IRC
08:17:38  <andythenorth> no they get stuck
08:17:42  <andythenorth> unless we fixed that
08:17:45  <andythenorth> maybe we fixed that
08:18:30  <Eddi|zuHause> yeah, not awake yet, i meant the opposite
08:19:04  <andythenorth> with 90º disabled, occasionally a lost train will run into a terminus station that is too short for it
08:19:07  <andythenorth> then it can never leave
08:19:22  <andythenorth> with 90º enabled, it will turn on the crossing in front of the station
08:20:41  <Eddi|zuHause> but if 90° is enabled, it might prefer going over that crossing, instead of turning around on the platform
08:20:52  <Eddi|zuHause> which causes unnecessary traffic
08:20:59  <Eddi|zuHause> and potential deadlocks
08:21:01  *** andythenorth has quit IRC
08:21:26  *** andythenorth has joined #openttd
08:21:31  <Eddi|zuHause> which is, i believe, what the person meant
08:21:45  <andythenorth> swings, roundabouts
08:22:04  <Eddi|zuHause> roundabouts are terrible
08:22:15  <andythenorth> so are swings
08:22:15  *** adikt-- has joined #openttd
08:22:37  <Eddi|zuHause> no idea what you mean by that
08:23:22  <andythenorth> https://en.wiktionary.org/wiki/swings_and_roundabouts
08:23:28  <andythenorth> english colloquialism
08:24:50  <Eddi|zuHause> then i don't agree with you.
08:25:23  <andythenorth> you're favouring 90º disabled?
08:25:31  <Eddi|zuHause> for trains? yes
08:25:52  <Eddi|zuHause> typically, the game behaves better when there's less options
08:26:44  <andythenorth> so the conclusion is, I shouldn't join reddit
08:28:29  <Eddi|zuHause> the more options a train has to choose, the more likely it'll pick a disruptive choice, because something wasn't properly modeled as a pathfinder penalty
08:28:30  *** adikt- has quit IRC
08:29:22  <Eddi|zuHause> like, if you have parallel tracks, don't put in X-crossings so "trains can bypass breakdowns"
08:30:28  <Eddi|zuHause> because a) the pathfinder cannot distinguish normal trains from broken down trains, and b) the pathfinder has no concept of blocking other incoming trains
08:33:20  *** andythenorth has quit IRC
08:38:05  *** andythenorth has joined #openttd
08:51:20  <DorpsGek_III> [OpenTTD/nml] nielsmh commented on issue #80: openttd_version: OpenTTD var 21/1A result has changed since OpenTTD moved to git https://git.io/JvchK
08:56:41  <DorpsGek_III> [OpenTTD/nml] andythenorth commented on issue #80: openttd_version: OpenTTD var 21/1A result has changed since OpenTTD moved to git https://git.io/JvchK
09:00:02  <DorpsGek_III> [OpenTTD/nml] andythenorth commented on issue #80: openttd_version: OpenTTD var 21/1A result has changed since OpenTTD moved to git https://git.io/JvchK
09:00:03  <DorpsGek_III> [OpenTTD/nml] andythenorth closed issue #80: openttd_version: OpenTTD var 21/1A result has changed since OpenTTD moved to git https://git.io/JvchK
09:00:54  <andythenorth> newgrf for 1.9.0 almost complete :D https://wiki.openttd.org/NewGRF_Specification_Status
09:15:00  <andythenorth> hmm
09:15:16  <andythenorth> a [n% full load] order would ease ship design :P
09:15:42  <andythenorth> trying to provide a range of ideal capacities from 40t to 800t is an arse
09:15:52  <andythenorth> but % load has been rejected multiple times
09:16:05  <andythenorth> oof
09:17:46  *** andythenorth has quit IRC
09:25:28  *** tokai has joined #openttd
09:25:28  *** ChanServ sets mode: +v tokai
09:26:01  *** andythenorth has joined #openttd
09:32:18  *** tokai|noir has quit IRC
09:50:06  <Eddi|zuHause> i don't think %-load has been rejected per se, it's just embedded into the whole "order UI is horribly overloaded already" problem
10:16:57  *** tokai|noir has joined #openttd
10:16:57  *** ChanServ sets mode: +v tokai|noir
10:23:53  *** tokai has quit IRC
10:48:55  *** Wormnest has joined #openttd
10:57:27  *** mczapkie has joined #openttd
11:00:35  <mczapkie> Hello, I would like to notify, that hg@hg.openttdcoop.org doesn't respond...
11:00:58  <mczapkie> TWIC
11:01:02  *** mczapkie has quit IRC
11:03:15  <LordAro> planetmaker: ^
11:05:24  *** Lejving_ has joined #openttd
11:10:46  *** Lejving has quit IRC
11:23:53  *** andythenorth has joined #openttd
11:31:33  *** Smedles has quit IRC
11:33:47  *** Smedles has joined #openttd
11:35:08  *** andythenorth has quit IRC
11:36:00  *** andythenorth has joined #openttd
11:41:33  *** Wormnest has quit IRC
12:33:45  *** Smedles has quit IRC
12:34:29  *** Smedles has joined #openttd
12:48:17  *** tokai has joined #openttd
12:48:17  *** ChanServ sets mode: +v tokai
12:55:12  *** tokai|noir has quit IRC
12:55:55  *** andythenorth has quit IRC
13:15:09  *** Samu has joined #openttd
13:21:13  *** spnda has joined #openttd
13:41:08  *** Flygon has quit IRC
13:55:36  <Samu> https://github.com/OpenTTD/OpenTTD/issues/8001 i found some issue
13:55:59  <Samu> it adds a penalty when a ship is in the docking tile
13:56:55  <Samu> means that it's going to increase the number of node searchs needlessly
13:58:35  <Samu> the ship isn't even close to the destination when the pathfinder makes the search
13:59:07  <Samu> the penalty could be obsolete when the ship arrives closer
13:59:14  *** tokai|noir has joined #openttd
13:59:14  *** ChanServ sets mode: +v tokai|noir
14:00:35  <LordAro> Samu: i noticed that too - it definitely seemed to be doing the pathfinding more often than necessary
14:01:52  <Samu> i think the 90 degrees as penalties are also affecting it
14:01:57  <Samu> let me tests
14:03:30  <spnda> So uh, what is a spritelayout from NML in NFO? I can't find much if any reference to it... Also I saw that  Airports use tilelayout. Do Objects, Industries, Houses or anything else  use that?
14:06:03  *** tokai has quit IRC
14:07:06  *** andythenorth has joined #openttd
14:13:04  <Samu> 10222 (14119 with curve penalties) rounds from A to B, 14479 (22078 with curve penalties) rounds from B to A
14:13:14  <Samu> regardless, this ship would be lost
14:13:19  <Samu> with a limit of 10000 rounds
14:13:28  <Samu> on that savegame
14:14:25  <spnda> andythenorth: yesterday you said "needs to follow industries and objects imho". Could you share a example of a multi tile/single tile object/industry in NML? I just want to look at something to get some ideas.
14:18:12  *** gnu_jj has quit IRC
14:19:35  <Samu> it's funny
14:19:57  <Samu> when the ship pathfinds from B to the ship depot, it only needs 7856 rounds
14:20:37  <Samu> but when it pathfinds from B to A, skipping the ship depot, it needs more than 10000
14:21:32  <Samu> 22075
14:22:56  <Samu> distance from depot to A is mere 5 tiles
14:23:22  <Samu> but the number of rounds searches goes up from 7856 to 22075, that's weird
14:24:28  <andythenorth> spnda: full FIRS? https://www.tt-forums.net/viewtopic.php?p=1228740#p1228740
14:24:46  <andythenorth> for single tile, general store, hardware store
14:24:57  <andythenorth> multi-tile: builders yard, recycling yard
14:24:59  <spnda> Oh I had no idea you were on github now
14:25:05  <andythenorth> yes
14:25:11  <andythenorth> https://github.com/andythenorth/firs
14:25:23  <andythenorth> you might just want the generated nml though
14:26:06  <andythenorth> the bigger FIRS industries sometimes have horrible complexity in the spritelayouts
14:26:20  <andythenorth> you might want to ignore those, lots of ternary checks for snow, land slope etc
14:26:28  <andythenorth> forest is a prime example of madness :P
14:27:02  *** D-HUND is now known as debdog
14:27:42  <planetmaker> ty @ LordAro
14:27:49  <spnda> You've got the generated NML anywhere?
14:28:02  <spnda> Oh I am blind. Found it
14:31:16  *** gnu_jj has joined #openttd
14:36:03  <Samu> there is a bug somewhere related to docking tiles
14:36:14  <Samu> the penalties are weird
14:36:40  <Samu> if it is a dock it needs 22075 search nodes
14:36:57  <Samu> but if in place of a dock it is a ship depot, it only needs 8230 rounds
14:37:04  <Samu> same tile
14:38:40  *** tokai has joined #openttd
14:38:40  *** ChanServ sets mode: +v tokai
14:39:00  <Samu> gonna try with a buy instead of ship depot
14:39:03  <Samu> buoy
14:39:12  *** supermop_work_ has joined #openttd
14:39:56  <Samu> 8231 with buoy
14:41:41  <Samu> i place a dock in front of the buoy and bam... now it requires 22075 nodes
14:41:48  <Samu> rounds*
14:42:08  <Samu> and the ship is still going to the buoy
14:42:16  <Samu> must check code brb
14:42:38  <FLHerne> Samu: Are you putting the dock and buoy so they have exactly the same destination tile?
14:42:45  <Samu> yes
14:42:49  <spnda> andythenorth: Hmm, industries use industry tiles, objects don't... I kinda want to go the way objects are done, though. How do objects do it?
14:42:53  <FLHerne> (bearing in mind that docks now have more than one possibly)
14:44:09  <FLHerne> spnda: https://www.tt-wiki.net/wiki/NMLTutorial/Object_graphics ?
14:44:13  <Samu> i know but, going from 8230 rounds to 22075 is a huge difference imo
14:44:26  <Samu> considering it's exactly the same destination
14:44:50  <spnda> FLHerne: Oh that looks quite helpful.
14:45:01  <spnda> Didn't know objects do it with a switch... interesting
14:45:36  <spnda> Oh not a switch...
14:45:40  *** tokai|noir has quit IRC
14:45:46  <FLHerne> spnda: The switch is for the different orientations
14:45:53  <spnda> Yeah just noticed that
14:46:44  <FLHerne> I don't know how you've implemented it with roadstops
14:47:17  <spnda> I haven't, that's the thing
14:47:35  <spnda> And I've only ever made trains and roadvehicles with NML, so I have no idea how others work
14:49:19  <FLHerne> I guess you want similar behaviour to rail stations, which don't actually exist in NML yet :/
14:49:27  <FLHerne> There's a draft spec https://newgrf-specs.tt-wiki.net/wiki/NML:Stations
14:51:25  <FLHerne> Hm, looks like that uses tilelayouts, which seems a bit pointless for road stops
14:51:42  <spnda> why though?
14:51:46  <spnda> I thought of tilelayouts too
14:52:39  <FLHerne> They've only ever got one tile, unless you plan to change that?
14:53:03  <spnda> Well, it'd be an idea to maybe make multi tile stops
14:56:11  <spnda> But I am still not sure if that's actually a good idea or if it's necessary-
14:58:54  <planetmaker> right, ssh access to repos should work again
15:01:43  <FLHerne> spnda: I'm not convinced they're worth having, but could be wrong
15:02:06  <spnda> Not really, but it's been an idea that came up
15:11:37  *** nielsm has joined #openttd
15:14:38  <Eddi|zuHause> so i spend half an hour fiddling with CSUR, and immediately get to the limitations of it... i don't think this is the right thing for me...
15:19:08  <spnda> Actually, I think I'll just make this single tile, eventhough I am sure there'll be some developers who would make awesome multi tile stations.
15:21:13  *** supermop_work_ has quit IRC
15:29:04  <Samu> 8235 with a count of 0
15:31:04  <Samu> https://github.com/OpenTTD/OpenTTD/blob/4552b17691fa7c4f1fdb4ca7652ca48278a68fec/src/pathfinder/yapf/yapf_ship.cpp#L288-L293
15:31:49  <Samu> just being a docking tile it adds a 300 cost to the path
15:32:10  <Samu> enough to increase 8235 to 22075
15:32:13  <Samu> rounds
15:32:50  <Samu> what to do?
15:32:57  <Eddi|zuHause> i'm definitely of the opinion that there should be multi-tile road stations, but they only make sense if there are also ... *cough* ... state machines
15:35:28  <spnda> Eddi|zuHause: what do you really mean with that?
15:36:23  <Eddi|zuHause> state machines are what guides airplanes on the airport (where can you land, where are the loading spots, how can you taxi, is the taxiway empty)
15:36:39  <spnda> so... waypoints
15:36:40  <Eddi|zuHause> they could also be used to guide road vehicles on the road stop
15:36:43  <Eddi|zuHause> no
15:36:52  <spnda> oh like entry paths
15:36:55  <spnda> "special roads"
15:37:02  <Eddi|zuHause> yes
15:39:10  <planetmaker> is that really needed or can it not simply be like "this tile allows unloading in this direction and entry from that"
15:39:47  <planetmaker> which basically current ones do by orientation
15:40:07  <planetmaker> couldn't they be just strung together to bigger ones?
15:40:15  <spnda> Which was basically my idea. Leave their functionality as is, and just have custom sprites/sprite layouts/animations etc.
15:40:19  <spnda> Exactly what I thought
15:40:25  <Eddi|zuHause> planetmaker: i can't see that being useful for anything
15:40:45  <Eddi|zuHause> planetmaker: then you can just make individual tiles that you can place next to each other
15:40:48  <planetmaker> eh, not? Works also for stations
15:41:10  <planetmaker> you need no state machines and create nice multi-tile stuff
15:41:26  <planetmaker> special movement is not a requirement for that
15:42:01  <spnda> well, stations use waypoints
15:42:10  <Eddi|zuHause> planetmaker: i'm thinking about drive-through stations with two or more parallel loading stops (instead of two in opposite direction)
15:42:21  <spnda> that would be good, yeah
15:42:22  <planetmaker> there are waypoints, but rail stations are not rail waypoints
15:42:26  <Eddi|zuHause> and more sensible tram turning loops
15:42:45  <Eddi|zuHause> i'm not talking about waypoints at all.
15:42:47  <planetmaker> Eddi|zuHause, yes, I see and know what you mean. That definitely would open new possibilities (and requires state machines).
15:43:07  <planetmaker> But I see that as no way a requirement for multi-tile road stations. They simply could function like multi-tile train stations
15:44:05  *** Wormnest has joined #openttd
15:44:15  <spnda> Put two next to each other and the dev would need to check if there's neighbours and adapt.
15:44:42  <planetmaker> (and I do believe both approaches can co-exist)
15:46:03  *** tokai|noir has joined #openttd
15:46:03  *** ChanServ sets mode: +v tokai|noir
15:53:27  *** tokai has quit IRC
15:56:49  <Eddi|zuHause> planetmaker: i didn't say it's a requirement. just a very strong "would be nice to have"
16:18:31  <DorpsGek_III> [OpenTTD/OpenTTD] kiwitreekor opened pull request #8008: Feature: Double-click to rename vehicle https://git.io/Jv4id
16:24:34  *** tokai has joined #openttd
16:24:34  *** ChanServ sets mode: +v tokai
16:26:26  <Samu> I have an idea to improve 8001
16:27:38  <spnda> So for single tile stop, should I just do "default: set_rs_default;" and do "spriteset (set_rs_default, "img.png") { 16_view_template(0, 0) }"?
16:27:44  <spnda> Or should I have some layouts or something
16:28:06  <Samu> seems to need the same treatment as road vehicles approaching their destination
16:28:17  <Samu> not sure how that one was exactly solved, but...
16:28:42  <Samu> it's kind of related
16:30:55  <Samu> testing this atm https://pastebin.com/AFrYvAm7
16:31:06  <Samu> replacing this https://github.com/OpenTTD/OpenTTD/blob/4552b17691fa7c4f1fdb4ca7652ca48278a68fec/src/pathfinder/yapf/yapf_ship.cpp#L288-L293
16:31:18  *** tokai|noir has quit IRC
16:32:04  <Samu> i used a distance of less than 8 when ships are approaching
16:32:08  <Samu> docks
16:32:23  <Samu> to start counting the penalties
16:33:07  <Samu> now i'm getting 8300 rounds instead of 22000...
16:33:12  <Samu> whereabouts
16:36:56  <DorpsGek_III> [OpenTTD/OpenTTD] ldpl commented on pull request #8008: Feature: Double-click to rename vehicle https://git.io/Jv4Pr
16:38:57  *** tokai|noir has joined #openttd
16:38:57  *** ChanServ sets mode: +v tokai|noir
16:45:52  *** tokai has quit IRC
16:53:42  <Samu> unsure of my approach, to be honest
17:06:22  <Samu> what's the command to force push?
17:06:32  <Samu> system forgot it post format
17:06:39  <Samu> git push --force ?
17:07:03  <Eddi|zuHause> spnda: you should still have spritelayouts, so you can compose graphics from multiple sprites (stop sign, shed, whatever)
17:07:06  *** cHawk_ has quit IRC
17:11:53  <nielsm> instead of state machines for custom road stops, how about lane layouts, I think you can describe that with 8 bits for a tile
17:13:39  <nielsm> 2 bit for direction the lanes go in (N-S, E-W, NE-SW, NW-SE), 1 bit for each lane which direction it has, and 2 bits for each lane to decide whether it accepts cars, trams, both, or none
17:13:50  <nielsm> and then you can invoke pathfinding on that
17:14:08  <nielsm> actually maybe that's not the right thing to do now I think about it
17:14:11  <nielsm> scrap that!
17:15:03  <DorpsGek_III> [OpenTTD/OpenTTD] SamuXarick opened pull request #8009: Change #8001: Don't add docking tile cost when ships are still too far from their destination https://git.io/Jv41T
17:15:42  <nielsm> (it doesn't allow for internal junctions)
17:16:30  <planetmaker> Road stops are somewhat more complicated than train stations:
17:16:52  <planetmaker> * drive-through (which has 2 lanes with common orientation).
17:17:12  <planetmaker> * terminal which has an entry and place(s) where to stop with an orientation
17:17:21  *** tokai has joined #openttd
17:17:21  *** ChanServ sets mode: +v tokai
17:18:27  <nielsm> yeah I suppose someone would want to make freight terminals where trucks back into an unloading bay
17:18:47  <Samu> who's gonna test 8009 LordAro ?
17:19:01  <Samu> FLHerne,
17:19:24  <Samu> im worried about one thing, about deadlock ships
17:19:36  <Samu> station spreaded docks
17:19:49  <Samu> and that penalty making the ship turn around
17:20:09  <Samu> back and forth, but im unsure if that's going to happen, but it's what's worrying me
17:24:13  *** tokai|noir has quit IRC
17:32:57  <spnda> Eddi|zuHause: Though I still haven't really understood how spritelayouts are handled by the game (or loaded). Any references?
17:33:14  <Eddi|zuHause> spnda: sorry, not the right person to ask that
17:33:29  <spnda> ok,  I'll search further
17:34:44  <Eddi|zuHause> nielsm: yeah, proper backing up instead of this weird spinny thing
17:34:55  <peter1138> Industry Tiles or House Tiles...
17:38:13  <FLHerne> spnda: I think spritelayouts correspond fairly directly to a varaction2
17:38:27  <FLHerne> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2 and https://newgrf-specs.tt-wiki.net/wiki/VarAction2Advanced
17:41:10  *** Progman has joined #openttd
17:42:21  <DorpsGek_III> [OpenTTD/OpenTTD] kiwitreekor commented on pull request #8008: Feature: Double-click to rename vehicle https://git.io/Jv4MJ
17:48:22  <DorpsGek_III> [OpenTTD/nml] andythenorth commented on pull request #85: Change: industry tiles and houses now support 16 accepted cargos https://git.io/Jv4Ms
17:48:31  <andythenorth> not a review :P
17:48:39  <andythenorth> that needs a review though :)
17:48:42  <andythenorth> BIAB
17:48:43  *** andythenorth has quit IRC
17:48:48  *** sla_ro|master has joined #openttd
17:49:44  <peter1138> FLHerne, yeah. But the good thing is all the "hard work" there is already done.
18:00:38  *** frosch123 has joined #openttd
18:03:18  *** Wormnest has quit IRC
18:05:02  *** WormnestAndroid has quit IRC
18:05:11  *** WormnestAndroid has joined #openttd
18:13:04  *** Wolf01 has joined #openttd
18:13:40  *** glx has joined #openttd
18:13:40  *** ChanServ sets mode: +v glx
18:23:57  <glx> #7998 is weird, I fail to see how it's possible
18:27:57  <LordAro> getting companyhq of nonexistent company?
18:28:36  <_dp_> but it checks for invalid id first
18:28:38  <glx> maybe, but ResolveCompanyID() should take care of that
18:28:43  <LordAro> yeah..
18:28:53  <frosch123> i think the problem is the CompanyID enum
18:28:55  <glx> and it does the exact same test as the assert
18:28:56  <frosch123> it is defined twice
18:29:03  <frosch123> probably one is signed, the other unsigned
18:29:08  <frosch123> so the -1 is broken inbetween
18:29:32  <LordAro> frosch123: that is the case for all the script stuff :p
18:29:41  <LordAro> wish there was a better way than redefining everything..
18:29:46  <_dp_> also can fail if _current_company somehow got corrupted
18:30:09  <frosch123> TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ; <- that line is nonsense
18:30:19  <frosch123> "company" is already a CompanyId, just in a different namespace
18:30:36  <frosch123> and ::CompanyId is defined as byte (probably new since 1.10)
18:30:45  <glx> yeah in this file sometimes it's ::CompanyID, sometimes CompanyID
18:31:11  <LordAro> yeah, that seems like a good bet to me
18:31:17  <frosch123> glx: can you check the disassembly in msvc?
18:31:24  <frosch123> whether there is a byte cast
18:31:40  <glx> I can try
18:32:15  <frosch123> also ScriptCompany::ResolveCompanyID does two different casts
18:32:16  <glx> anyway there are really some inconsistencies in casts in this file
18:32:25  <frosch123> the one to IsValidID is different to the one in return
18:32:39  <LordAro> sounds like a bit of a mess
18:33:50  <frosch123> most casts cast to ::Company, only the cast in GetCompanyHQ lacks the ::
18:34:35  <frosch123> GetPresidentGender as well
18:34:48  <glx> CompanyID is ScriptCompany::CompanyID for intellisense
18:35:51  <frosch123> well, half of the calls to ::Company::Get cast to ::CompanyID, the other half to CompanyID
18:36:44  *** supermop_work_ has joined #openttd
18:36:49  <frosch123> it is also full with casts to the same type :p
18:38:04  <glx> https://github.com/OpenTTD/OpenTTD/blob/49d2a07f667b8e9a8d984b35b2a41302c70c3c1e/src/script/api/script_company.cpp#L103 <-- should be ScriptCompany::CompanyID in the signature
18:38:23  <frosch123> glx: LordAro: I am pretty sure you can reproduce it with AICompany::GetCompanyHQ(256)
18:38:48  <glx> that's easy to test indeed
18:38:54  <frosch123> ResolveCompanyID will cast the 256 to 0, think it is a valid company, and still return 256
18:39:35  <LordAro> now i'm looking at the squirrel generation
18:39:43  <LordAro> 500 line awk script is horrifying
18:39:56  <frosch123> just look at ResolveCompanyID, it's easy
18:40:03  <frosch123> it fails for 256
18:40:09  <LordAro> that said, the fact that someone translated it to vbs is worse
18:40:09  <_dp_> ResolveCompanyID should probably return ::CompanyID
18:40:20  <_dp_> also -1 in enums doesn't seem to be a good idea :p
18:40:25  <frosch123> yes, and it should reject 256
18:40:33  <glx> LordAro: API generation ?
18:40:34  <LordAro> _dp_: definitely not ones defined to be bytes :p
18:40:36  <LordAro> glx: yeah
18:40:42  <glx> I redone it for cmake
18:41:10  <LordAro> i was wondering if some doc comments (or similar) could be used instead of just redefining all the functions and types
18:41:20  <_dp_> LordAro, well, technically here it's 0xFF in the one that defined as byte...
18:41:27  <glx> and in cmake I made it happen on build
18:41:32  <LordAro> _dp_: well indeed
18:41:37  <_dp_> LordAro, and that's exactly the problem xD
18:44:24  <frosch123> i am preparing a pr
18:44:47  *** andythenorth has joined #openttd
18:49:52  <andythenorth> what's this Github inbox thing?
18:50:02  * andythenorth standard reaction to anything new: what's this crap? :P
18:50:10  <glx> replacement of notifications
18:50:24  <Eddi|zuHause> i'm starting to get the hang of this CSUR thing, but there still are some problematic limitations/glitches
18:50:24  <glx> requires more micromanagement
18:50:46  <andythenorth> oof fake email crap
18:50:48  <andythenorth> I hate that
18:51:02  * andythenorth opts out of the beta
18:52:27  <andythenorth> double-click rename eh?
18:52:29  <glx> of course I'm testing in 1.10 with a test AI expecting 1.11
18:52:34  * andythenorth increases the number of things to not give a fuck about :P
18:53:18  <DorpsGek_III> [OpenTTD/OpenTTD] frosch123 opened pull request #8010: Fix #7998: Crash when scripts tried to access companies with invalid IDs. https://git.io/Jv4y9
18:53:26  <glx> let's restart openttd after modifying the AI
18:56:47  <glx> frosch123: indeed AICompany.GetCompanyHQ(256); crashes
18:57:16  <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #8010: Fix #7998: Crash when scripts tried to access companies with invalid IDs. https://git.io/Jv4yN
18:57:25  <glx> I'll test your PR after dinner
18:58:15  <andythenorth> frosch123: I may be imagining, did you have an idea for improving whitespace for ships? https://dev.openttdcoop.org/attachments/download/9504/sam-names.png
18:58:20  * andythenorth hasn't checked logs
18:58:32  <andythenorth> someone talked about it last year
18:58:55  <DorpsGek_III> [OpenTTD/OpenTTD] frosch123 commented on pull request #8010: Fix #7998: Crash when scripts tried to access companies with invalid IDs. https://git.io/Jv4yA
18:59:50  <frosch123> edited comment with some addition, if you already read it
19:03:01  * andythenorth wonders about half-size ships in buy menu
19:03:23  <frosch123> i thought you already did that
19:03:27  <andythenorth> https://dev.openttdcoop.org/attachments/download/9506/sam-half-zoom.png
19:03:29  <frosch123> or was it pikka with planes?
19:03:35  <andythenorth> I think pikka has done it somewhere
19:03:46  <andythenorth> we do it with some airports also
19:04:04  <frosch123> well, with your gui zoom they are normal size now :p
19:04:24  *** WormnestAndroid has quit IRC
19:04:24  *** adikt-- has quit IRC
19:04:24  *** ad5twoknebor[m] has quit IRC
19:04:25  *** rubenwardy has quit IRC
19:04:25  *** crem has quit IRC
19:04:25  *** dwfreed has quit IRC
19:04:25  <frosch123> you should consider adding the original sprites as 2x zoom sprites
19:04:33  <andythenorth> hmm, I could literally make half-size a parameter option :P
19:04:44  <frosch123> double the sprites
19:04:49  *** adikt-- has joined #openttd
19:04:56  <andythenorth> oof
19:05:21  <andythenorth> this is just procrastination from https://wiki.openttd.org/NewGRF_Specification_Status
19:05:30  *** WormnestAndroid has joined #openttd
19:05:30  *** ad5twoknebor[m] has joined #openttd
19:05:30  *** rubenwardy has joined #openttd
19:05:30  *** crem has joined #openttd
19:05:30  *** dwfreed has joined #openttd
19:05:32  <andythenorth> "Action 7/9 condition 0F..12" what even means? :)
19:06:50  *** crem has quit IRC
19:06:50  *** WormnestAndroid has quit IRC
19:06:50  *** rubenwardy has quit IRC
19:06:50  *** ad5twoknebor[m] has quit IRC
19:06:50  *** dwfreed has quit IRC
19:07:47  *** WormnestAndroid has joined #openttd
19:07:47  *** ad5twoknebor[m] has joined #openttd
19:07:47  *** rubenwardy has joined #openttd
19:07:47  *** crem has joined #openttd
19:07:47  *** dwfreed has joined #openttd
19:08:37  <andythenorth> checks for labels defined?
19:09:33  <frosch123> glx: btw. it also crashes/not crashes as expected before/after fix on linux
19:09:49  <frosch123> andythenorth: the intention is probably the same as for railtypes
19:10:29  <frosch123> vehicle grf checks whether a road/tramtype is defined, to pick which type to assign to its vehicles
19:10:51  <frosch123> though it's probably redundant by now, there are so many compatible/equivalent propertiers, that noone has to check single labels
19:11:25  <andythenorth> but we need it for consistency?
19:12:07  <frosch123> railtype authors are weirdos, if you need different tracks for 25/50/75 kmh, you also need that test probably :p
19:12:19  * andythenorth trying to find how nml does it for railtypes
19:13:09  <frosch123> https://newgrf-specs.tt-wiki.net/wiki/NML:Builtin_functions <- railtype_available, cargotype_available
19:13:16  <andythenorth> railtype_available
19:13:20  <andythenorth> oh ok yes
19:13:41  <andythenorth> builtin_roadtype_available seems to be there
19:13:59  <andythenorth> checks 0x0fF
19:14:01  <andythenorth> 0x0F
19:14:05  *** crem has quit IRC
19:14:05  *** WormnestAndroid has quit IRC
19:14:05  *** rubenwardy has quit IRC
19:14:05  *** ad5twoknebor[m] has quit IRC
19:14:05  *** dwfreed has quit IRC
19:14:11  <andythenorth> builtin_tramtype_available checks 0x11
19:14:39  <frosch123> it only needs one of the pairs, the other one is the inverse, which nml can do itself
19:15:28  *** WormnestAndroid has joined #openttd
19:15:28  *** ad5twoknebor[m] has joined #openttd
19:15:28  *** rubenwardy has joined #openttd
19:15:28  *** crem has joined #openttd
19:15:28  *** dwfreed has joined #openttd
19:15:40  * andythenorth looking for the openttd implementation 
19:15:44  <andythenorth> I have NFI how this stuff works :)
19:16:20  <andythenorth> ok they come in pairs I see
19:16:21  <andythenorth> ish
19:16:26  *** crem has quit IRC
19:16:26  *** WormnestAndroid has quit IRC
19:16:26  *** rubenwardy has quit IRC
19:16:26  *** ad5twoknebor[m] has quit IRC
19:16:26  *** dwfreed has quit IRC
19:16:33  <frosch123> i fixed them last month or so, they were broken in ottd :)
19:17:54  *** WormnestAndroid has joined #openttd
19:17:54  *** ad5twoknebor[m] has joined #openttd
19:17:54  *** rubenwardy has joined #openttd
19:17:54  *** crem has joined #openttd
19:17:54  *** dwfreed has joined #openttd
19:20:12  * andythenorth looks for them
19:20:24  <andythenorth> oops, JGR isn't the correct place to look
19:20:34  * andythenorth too many openttd checkouts
19:22:26  <andythenorth> ok found them
19:24:03  * andythenorth wonders whether they are railtypes, rail types, or rail_types or track_types
19:24:11  <andythenorth> probably consistency doesn't matter much
19:24:17  <andythenorth> just confusing having to pick one every time :P
19:25:21  <frosch123> i stated using "track type" when referring to all three rail/road/track types
19:25:33  *** crem has quit IRC
19:25:33  *** WormnestAndroid has quit IRC
19:25:33  *** rubenwardy has quit IRC
19:25:33  *** ad5twoknebor[m] has quit IRC
19:25:33  *** dwfreed has quit IRC
19:25:42  <frosch123> i am probably not consistent with space/underscore/nospace
19:25:46  *** WormnestAndroid has joined #openttd
19:25:46  *** ad5twoknebor[m] has joined #openttd
19:25:46  *** rubenwardy has joined #openttd
19:25:46  *** crem has joined #openttd
19:25:46  *** dwfreed has joined #openttd
19:26:27  <frosch123> i see why it's named "synthon", not "synchron"
19:27:59  *** crem has quit IRC
19:27:59  *** WormnestAndroid has quit IRC
19:27:59  *** rubenwardy has quit IRC
19:27:59  *** ad5twoknebor[m] has quit IRC
19:27:59  *** dwfreed has quit IRC
19:28:19  <andythenorth> I wonder about refactoring nml to track_type in more places
19:28:44  <andythenorth> I hate that there are two symbols resolving to 0x4A
19:28:58  *** WormnestAndroid has joined #openttd