IRC logs for #openttd on OFTC at 2020-01-18
            
00:00:03 *** andythenorth has left #openttd
00:07:36 *** crazystacy has joined #openttd
00:07:44 <crazystacy> the openttd ai api is decidedly wonky
00:07:47 <crazystacy> the site i mean
00:08:33 <glx> blame doxygen ;)
00:09:02 <crazystacy> >:(
00:09:12 <crazystacy> i'll doxx him
00:09:35 <crazystacy> this is where he lives: https://docs.openttd.org/ai-api/annotated.html
00:09:42 <Eddi|zuHause> why did i not play baba is you before?
00:09:53 <Eddi|zuHause> it's been in my steam suggestions for ages
00:11:41 *** Samu has quit IRC
00:15:32 <crazystacy> tell me about it
00:15:57 *** hythlodaeus has quit IRC
00:16:46 *** Wolf01 has quit IRC
00:37:10 *** Progman has quit IRC
00:40:51 *** crazystacy has quit IRC
01:36:58 *** y2kboy23_ has joined #openttd
01:41:43 *** y2kboy23 has quit IRC
01:58:12 *** sla_ro|master has quit IRC
02:21:20 *** Wormnest has joined #openttd
02:42:07 *** WormnestAndroid has quit IRC
02:42:30 *** WormnestAndroid has joined #openttd
02:42:39 *** Wormnest_ has joined #openttd
02:49:28 *** Wormnest has quit IRC
02:50:32 *** WormnestAndroid has quit IRC
02:50:54 *** WormnestAndroid has joined #openttd
03:03:11 *** snail_UES_ has joined #openttd
03:13:52 *** Pikka has joined #openttd
03:13:58 *** Wormnest_ has quit IRC
03:14:21 *** Thedarkb has quit IRC
03:20:51 *** mindlesstux_ has joined #openttd
03:23:05 *** ToBeFree has quit IRC
03:28:51 *** HerzogDeXtEr has quit IRC
04:09:23 *** debdog has joined #openttd
04:12:42 *** D-HUND has quit IRC
04:45:07 *** WormnestAndroid has quit IRC
04:45:12 *** WormnestAndroid has joined #openttd
05:03:22 *** glx has quit IRC
05:04:20 *** Wormnest_ has joined #openttd
05:16:58 *** Wormnest_ has quit IRC
06:29:16 *** snail_UES_ is now known as Guest14004
06:29:16 *** snail_UES_ has joined #openttd
07:34:53 *** snail_UES_ has quit IRC
09:25:44 *** andythenorth has joined #openttd
09:26:26 <andythenorth> huzzah
09:27:24 <Pikka> o/
09:30:19 <andythenorth> seems I can upgraded my CivilAI savegame to 32 :)
09:31:00 <andythenorth> Pikka: does it understand vehicle current reliability?
09:31:51 <Pikka> not in any meaningful way
09:32:05 <andythenorth> I have breakdowns off, I was wondering about turning it on :P
09:32:15 <Pikka> do it
09:32:23 <andythenorth> they're running some very old trains though
09:32:35 <Pikka> it shouldn't be
09:33:07 <Pikka> only if it's taking a long time to do things... how long it takes to plan a long route is currently the biggest problem the AI has, it can be several years
09:33:10 <Pikka> during which it does nothing else
09:33:25 <Pikka> that's the big thing that needs addressing
09:33:32 <andythenorth> 57 year old train
09:33:36 <andythenorth> 40 year lifespan
09:33:58 <andythenorth> allowing though that this game all the AIs have crashed twice while it was on ffwd
09:33:59 <Pikka> what's the AI doing? What does the debug window show?
09:34:26 <andythenorth> currently I've just reloaded the save, so they're making notes
09:34:41 <andythenorth> they've only had 3 months of game
09:34:50 <Pikka> ya. it'll get to replacing them then
09:35:19 <Pikka> normally it's fine. I always play with reduced breakdowns on
09:35:22 <andythenorth> the colour schemes are so rad, tests the Horse sprites a lot
09:35:34 <Pikka> o/
09:37:05 <andythenorth> it's very confused by my high speed electric trains
09:37:19 <andythenorth> it will have no idea how to build them
09:37:31 <Pikka> how do they work?
09:39:27 * andythenorth trying to remember :P
09:39:28 <andythenorth> code knows
09:40:12 <andythenorth> there's double headed electric engine with relatively low power and very high speed
09:40:31 <andythenorth> and then dedicated articulated coaches (16/8) which gain power when attached to engine
09:40:50 <andythenorth> for some reason it builds the engine, then attaches nothing, leaves it sitting in depot
09:40:54 <andythenorth> multiple AIs are doing this
09:41:23 <Pikka> hmm
09:41:35 <andythenorth> there's no way to teach it to build the right coaches
09:41:44 <Pikka> maybe
09:41:46 <andythenorth> I expected it to run around with milk tankers or something :)
09:41:55 <Pikka> is this in the current version? what year?
09:42:51 <andythenorth> 'Helm Wind' 1990 or 'Brenner' 2020 https://firs-test-1.s3.eu-west-2.amazonaws.com/iron-horse/docs/html/tech_tree_table_red.html
09:44:36 <Pikka> passenger trains it's building them for?
09:45:34 <andythenorth> not sure :)
09:45:37 <andythenorth> I'll check the route
09:45:58 <andythenorth> yes
09:46:03 <andythenorth> oh but one of them has built it
09:46:06 <andythenorth> with correct coaches also
09:46:22 <andythenorth> wonder if the others just crashed during the build
09:47:12 <Pikka> https://i.imgur.com/JGz9WUc.png seems to work here
09:47:22 <Pikka> yes, I'd say those were the cause of the crash
09:47:30 <Pikka> it was when it tried to build a mailvan for them, but couldn't find one
09:47:40 <andythenorth> yup
09:47:42 <andythenorth> no mailvan
09:48:04 <andythenorth> should I add 186mph mailvan? o_O
09:48:12 <andythenorth> was going to do it for French Horse TGV
09:48:13 <andythenorth> :P
09:48:22 <Pikka> only if you want to. it's fine without? :P
09:48:26 <andythenorth> super!
09:48:28 <andythenorth> I won't
09:49:52 *** nielsm has joined #openttd
09:51:20 <andythenorth> yo nielsm
09:51:50 <nielsm> morning
09:53:50 <andythenorth> Pikka so fix route pathfinding, make it do FIRS Steeltown, profit!
09:53:52 <andythenorth> it's pretty nice
09:54:06 <andythenorth> then you can do EuroTrainsRevivalSet
09:54:07 <Pikka> o/
10:22:43 <peter1138> Hi
10:22:50 <peter1138> I had breakfast about 30 minutes ago.
10:22:59 <peter1138> And then I just had a biscuit with my coffee. Oh dear.
10:29:18 <peter1138> Hmm, warnings in squirrel about using std::move.
10:31:08 *** Progman has joined #openttd
10:38:21 <peter1138> Now I remember why I had Pulseaudio installed on Windows. Audio for Linux.
10:39:31 <peter1138> Hmm, rebased newgrf-docks. Let's see...
10:39:54 <andythenorth> I should have coffee
10:39:59 <andythenorth> with more coffee
10:41:47 *** zvxb has quit IRC
10:45:12 <peter1138> It runs, it doesn't crash.
10:45:14 <peter1138> Ship it?
10:46:49 <peter1138> (It's definitely not ready)
10:54:16 <andythenorth> PR I can test
10:54:23 <andythenorth> with my slow ass local build
10:54:43 * andythenorth wonders if the farm can build me a binary of a PR :P
11:00:21 <LordAro> peter1138: i thought we fixed the warnings in squirrel
11:00:32 <LordAro> andythenorth: yes, it can
11:00:41 <LordAro> but i don't know how
11:00:44 <andythenorth> pls moar docks https://dev.openttdcoop.org/attachments/download/9619/moar-docks-pls.png
11:00:53 <LordAro> TB needs to press some buttons, probably
11:01:01 <andythenorth> also this is ass :D https://dev.openttdcoop.org/attachments/download/9539/Docky_McDockface.png
11:02:12 <andythenorth> maybe I could make my local build run faster
11:05:45 *** crazystacy has joined #openttd
11:07:49 <peter1138> LordAro, you have, I hadn't rebased :-)
11:08:08 <LordAro> :)
11:08:12 <TrueBrain> hmm .. why is it so difficult to estimate with git what it is going to do with certain commands ... need to experiment ...
11:08:31 *** Wolf01 has joined #openttd
11:11:55 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkmY
11:27:06 <andythenorth> nielsm: [this is a terrible idea] if we restricted max depth for enclosed bodies of sea (no route to map edge), and industries could read max depth for an area of sea
11:27:18 <andythenorth> FIRS could stop spawning ports into small landlocked seas :P
11:31:08 <nielsm> it'll be difficult to keep track of I think, unless you just make a (potentially very expensive) query function
11:35:41 <nielsm> (read: I can't think of a good iterative algorithm that can provide correct results within reasonable time, on large maps, and can handle being run across game ticks where the map might change between)
11:36:17 <nielsm> (and is also not memory hungry)
11:43:28 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkYe
11:45:09 <andythenorth> nielsm: we have lots of free bits in water?
11:46:59 <nielsm> sure but I'd have to spend 16 bits to implement the ideas I have, and that's still a lot
11:49:49 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkYm
11:51:02 <nielsm> my idea to do it without much performance impact and having constant-time lookup: store a "distance to map edge" value for every sea tile, in the tile loop set it to one less than the max of all neighbors; tiles on the edge get a fixed value of the 2x (or so) the longest map edge length
11:51:38 <nielsm> that should result in sea tiles with outside connection having positive value, and sea tiles without eventually getting zero after being cut off
12:01:27 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkY8
12:01:38 <TrueBrain> it is so difficult to test stuff with gitttt :(
12:26:42 *** sla_ro|master has joined #openttd
12:37:41 <crazystacy> andythenorth, i love the ports in lakes
12:37:59 <crazystacy> what is the "player base" of openttd now compared to 2009?
12:38:03 <crazystacy> (that is when i first tried it)
12:39:18 <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkOT
12:41:41 <nielsm> nobody knows :)
12:41:58 <nielsm> there isn't any good way to know how many are playing ottd
12:42:12 <crazystacy> i have very little memory of it back then except the actual game
12:42:24 <crazystacy> can't recall how many people played online
12:43:37 *** sla_ro|master has quit IRC
12:47:11 <crazystacy> how about chat events for AIs?
12:55:12 <Pikka> would be fun ;)
12:56:39 <crazystacy> well somewhere it said it's good to ask before adding something :P
12:58:16 <crazystacy> there's no way to create an empty AIStationList? i have to create it and go in and empty it? :P
13:00:11 <Pikka> an empty list is just a list
13:00:21 *** Thedarkb has joined #openttd
13:00:40 <crazystacy> ok. seems like it. cause the API said AIList.AddValue takes two ints
13:00:56 <Pikka> AddItem?
13:01:12 <crazystacy> https://docs.openttd.org/ai-api/classAIList.html
13:01:17 <crazystacy> yes
13:01:21 <Pikka> yes
13:01:40 <Pikka> a list always contains items with an associated value
13:01:58 <Pikka> so if you're just interested in the items you need to give them a dummy value, eg 0
13:02:25 <crazystacy> that is curious
13:02:30 <crazystacy> so it's a map with Station : int ?
13:02:51 <Pikka> the value is so you can sort the list to find the item you want
13:03:21 *** Wormnest_ has joined #openttd
13:04:12 <crazystacy> ok
13:18:24 <crazystacy> hm. when i AddItem to my list, it is not there the next time i call this method
13:20:04 <crazystacy> nvm
13:23:06 <Pikka> k :)
13:23:16 <peter1138> When your git commits contain lots of WIP...
13:32:31 <andythenorth> nielsm: could we just store an index of all water tiles that have a route to map edge, calculated once at game start?
13:33:03 <nielsm> hmm not sure that's a good idea
13:33:22 <andythenorth> probably not, most of mine aren't :)
13:33:33 <andythenorth> what's the downside?
13:34:12 <nielsm> player expectations, "I connected this lake to the ocean with a canal, why can't I build a port industry in it?"
13:34:37 <andythenorth> oh yes
13:34:38 <nielsm> and also "lol I cut this piece of water off but can still build port industries in i"
13:34:45 <andythenorth> I had already discounted the canal case
13:35:33 <andythenorth> I thought I had solution for 'map changed' but no
13:35:46 <andythenorth> I was going to propose looking up neighbouring tiles in the index
13:35:57 * andythenorth must to chores :)
13:36:59 <nielsm> chores, yes... laundry needs doing soon or I will have trouble
13:41:57 *** Wormnest_ has quit IRC
13:45:10 <nielsm> anything you do has to deal with stupid situations like https://0x0.st/zFQ2.png
13:45:35 <nielsm> and you can imagine even longer spiral situations
13:48:43 *** WormnestAndroid has quit IRC
13:49:04 *** WormnestAndroid has joined #openttd
13:50:03 *** HerzogDeXtEr has joined #openttd
13:53:09 <crazystacy> well typically you don't have *ports* up canals?
13:54:16 <FLHerne> crazystacy: There are some quite large ports up canals ;-)
13:54:26 <FLHerne> (and used to be more)
13:59:17 <crazystacy> ok :P
13:59:55 <crazystacy> is there some easy way to get the individual station platforms from AI? or do i have to go there and search them out/
14:00:36 <nielsm> there isn't really anything that keeps track of "platforms"
14:01:14 <crazystacy> ok. but i can finda station, then inspect the tiles where it is to see how the platforms look?
14:01:22 <FLHerne> Salford Quays used to be huge (and they're currently building/planning a new container terminal a bit further down)
14:01:25 <nielsm> that should be possible
14:01:37 <crazystacy> either that, or save every station i create
14:01:48 <crazystacy> save information about*
14:02:10 <crazystacy> isn't salford that town in that song
14:02:19 <FLHerne> Which song?
14:02:22 <crazystacy> dirty old town
14:02:34 <andythenorth> nielsm: I'm wondering if there's a 'good enough' heuristic that approximates the size of the enclosed area
14:02:45 <andythenorth> absolute connection to map edge isn't necessary
14:02:59 <FLHerne> Apparently so
14:03:38 <nielsm> well you coud probably make a tile-count-limited flood fill
14:04:26 <nielsm> i.e. it searches for having at least N reachable water tiles, and if it finds that number or reaches an edge water tile succeeds
14:04:41 <nielsm> that should be reasonably bounded in execution time
14:05:02 <Pikka> crazystacy, are you writing an AI?
14:05:06 <crazystacy> yes
14:05:26 <crazystacy> do i have to put x = null; in class ABC { x = null; constructor () { x = 123; }} ?
14:05:53 <nielsm> I believe yes, to have it declared as a field of the class
14:05:59 <crazystacy> ok
14:06:23 <_dp_> some random sampling should be decent for area approximation
14:06:53 <andythenorth> if it occasionally fails on pathological cases, like a lake with weird islands in it
14:06:56 <andythenorth> probably fine tbh
14:07:17 <andythenorth> it's eye candy improvement to industry placement, not critical
14:07:48 <andythenorth> @calc 32^2
14:07:48 <DorpsGek> andythenorth: Error: Something in there wasn't a valid number.
14:07:55 <andythenorth> @calc 32 * 32
14:07:55 <DorpsGek> andythenorth: 1024
14:08:03 <crazystacy> what does a newgrf have access to when it's placing industries?
14:08:08 <crazystacy> is it gamescript?
14:08:26 <andythenorth> @calc 32 * 84
14:08:26 <DorpsGek> andythenorth: 2688
14:08:33 <nielsm> https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Industry_location_permissibility_.2828.29
14:08:40 <nielsm> newgrf is arcane :D
14:08:53 <andythenorth> for FIRS, it probably wants about 2048 water tiles in a lake before allowing ports
14:09:02 <crazystacy> aha. there is an AITileList_StationType
14:09:04 <andythenorth> I've got one in my current game on about 2.5k tiles
14:09:20 <crazystacy> i am sure i saw one in a tiny lake :P
14:09:32 <andythenorth> it happens often, it looks stupid
14:10:22 <andythenorth> https://dev.openttdcoop.org/attachments/download/8416/small_seas.png
14:12:08 <crazystacy> that looks like the screen from some tactical nuke control panel
14:12:17 <crazystacy> don't nuke salford
14:13:05 <andythenorth> so how long to search for 2048 contiguous tiles, then return true or false?
14:13:47 *** Flygon has quit IRC
14:14:43 <nielsm> hmm worst case you have to visit 8192 tiles or a little more, I think, if all the tiles are in a row in the worst possible pattern for the search order
14:15:06 <nielsm> and then you're affected by constants that depend on the total map size due to memory cache lines
14:16:23 *** mikegrb has joined #openttd
14:17:22 <nielsm> maybe I should go forward with NoLandscapeArray ideas
14:17:46 <nielsm> move the landscape to a bunch of blocks instead, that will potentially give more memory locality for looking at tiles near each other
14:17:51 <crazystacy> isn't is 2048 * 3 if you mean it has to check each adjacent tile for water?
14:17:59 <crazystacy> - in a straight line
14:18:15 <nielsm> right, yeah
14:18:37 <crazystacy> i was thinking about keeping a list of "bodies" of water and update them whenever you terraform
14:18:50 <crazystacy> if the tile you lower is touching 2 bodies, you can add them together, etc
14:18:54 * andythenorth looks for some known method
14:19:01 <nielsm> that'll require some funky algorithms/data structures I think
14:19:04 <andythenorth> it's just like a contiguous flood fill
14:19:15 <crazystacy> it does remind me of a data structure, not sure which
14:19:19 <crazystacy> i think some set type
14:19:20 <nielsm> that kind of things you could do research on as a computer scientist
14:19:23 <andythenorth> photoshop does it for pixels :P
14:19:34 <andythenorth> https://en.wikipedia.org/wiki/Flood_fill
14:20:02 <crazystacy> i don't know if you are wanting to go in there and really jam your hands into the landscape code but
14:20:03 *** glx has joined #openttd
14:20:03 *** ChanServ sets mode: +v glx
14:20:47 <andythenorth> hmm http://www.adammil.net/blog/v126_A_More_Efficient_Flood_Fill.html
14:23:06 <_dp_> dsu is a good structure for fast joining
14:23:15 <_dp_> not so much for splits though
14:25:40 <crazystacy> DSU was the one
14:28:01 <crazystacy> well the only point was that it would be a constant time operation to check which body we are in and get the attributes of it (map edge-connected, landlocked, whatever). and only have to do flood fills when the world is changed
14:28:03 <andythenorth> needs to be fast enough to run as an industry tile var during industry creation cb
14:28:16 <andythenorth> subsequent calls on related tiles could maybe be cached :P
14:28:25 <crazystacy> after mapgen you wouldn't have to do any flood filling until someone changes the map
14:31:16 <nielsm> hmm... I'm thinking whether the way I make industry placement check callback access water depth right now is really the right way
14:31:42 <andythenorth> o_O
14:32:00 <nielsm> same as the height/slope var, give a +-7 tiles x/y offset to look at a tile and get its depth
14:32:32 <nielsm> but maybe the better would be to just check all tiles in the selected layout for depth and offer a var with the max/min depth found in the covered tiles
14:33:22 <andythenorth> I see no problem with that
14:33:41 <andythenorth> I wouldn't design industries where different tiles have different depth requirements
14:33:42 <andythenorth> others might
14:34:02 <nielsm> industry tiles on the map don't store depth either, so the depth-for-tile var wouldn't be usable after construction either, but storing the min/max depths as a property in the industry structure would allow grf to check it later
14:34:17 <nielsm> and could make restoring the water when the industry is removed easier
14:34:20 <andythenorth> can depth be changed under the industry?
14:34:33 <nielsm> not right now
14:35:28 *** crazystacy has quit IRC
14:35:54 <andythenorth> can't see why it would be needed
14:36:31 *** Pikka has quit IRC
14:41:34 *** Samu has joined #openttd
14:43:18 <Samu> hi
14:46:57 *** Thedarkb has quit IRC
14:48:23 *** sla_ro|master has joined #openttd
14:53:26 *** crazystacy has joined #openttd
14:53:37 <crazystacy> class A { function b () {} } b is static?
14:53:55 <crazystacy> ok i will read the manual :p
14:55:22 <nielsm> read the pdf version of the squirrel language reference, the html version has terrible formatting
14:56:24 *** Wormnest_ has joined #openttd
14:56:26 <crazystacy> yeah i noticed
14:56:38 <crazystacy> it had to touch the screen with my nose to read the text
15:07:00 *** MarkS- has joined #openttd
15:08:15 <MarkS-> Hello, what is the best documentation (example/howto if possible) to follow to create some own/custom newgrf? I couldn't find information about how to do it
15:09:08 <nielsm> if what you want to make can be made with NML, that's probably the best place to start
15:12:18 <Samu> found a nasty very buggy behaviour about my permanent rivers :p
15:12:43 <Samu> if there was a ship on the river and u build a dock there, BAM ship! lol
15:12:56 <Samu> buried below the dock
15:13:05 <crazystacy> nice
15:13:14 <crazystacy> the griefing continues
15:13:28 <crazystacy> tbh that needs to be a patch. OpenTTD: Battleships
15:13:35 <Samu> then openttd crashes because pathfinder complains
15:13:41 <crazystacy> remov eit
15:14:52 <Samu> i'm still not sure where i place this piece of code
15:14:54 <Samu> if (IsRiver(tile) && _game_mode == GM_NORMAL && !_settings_game.construction.dynamite_river && !_cheats.magic_bulldozer.value) {
15:14:54 <Samu> return CommandCost();
15:14:54 <Samu> }
15:15:30 <Samu> can't be inside DC_EXEC
15:15:35 <Samu> can't be outside it
15:15:51 <Samu> if it's inside, it will complain about costs not matching
15:15:58 <Samu> DC_TEST vs DC_EXEC
15:16:15 <Samu> if it's outside, I'm making it not even go through DC_EXEC
15:21:37 <crazystacy> what is TileIndex? len 2 array?
15:21:58 <crazystacy> or just an int?
15:25:55 <DorpsGek_III_> [OpenTTD/OpenTTD] SamuXarick updated pull request #7937: Build on competitor canal https://git.io/JvUIQ
15:26:34 <Samu> now it ensures there's no ship on the tile
15:26:38 <Samu> hue
15:26:50 <Samu> the order of these checks seriously matter
15:26:59 <crazystacy> yay
15:27:13 <crazystacy> next stable release i'll go on reddit vanilla and cover the world in canals
15:27:17 <crazystacy> they'll fear my canals.
15:29:02 *** Thedarkb has joined #openttd
15:31:08 * andythenorth sleepy
15:33:44 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7937/files#diff-b09dd8e9871f743c088cfb195f08f7faR621
15:33:52 <Samu> now it's located just before DC_EXEC
15:33:59 <MarkS-> nielsm: thank you for the NML pointer (reading about it)
15:39:29 <Samu> i need to make sure i can pass INVALID_OWNER to MakeWaterKeepingClass
15:39:46 <Samu> it should never happen, but who knows...-
15:40:02 <Samu> im a terrible coder yet
15:40:20 <Samu> I can't pass* terrible typo
15:43:53 <Samu> funny, I just tested and I'm really passing INVALID_OWNER to it, lol I wonder how's it dealing with it atm
15:45:00 *** Pikka has joined #openttd
15:48:41 <crazystacy> hmm. does anyone else use squirrel.vim for Vim?
15:49:04 *** Wormnest_ has quit IRC
15:54:46 *** Mazur has joined #openttd
16:00:46 <Samu> it's handling it really well actually
16:00:56 <Samu> in short, doesn't even look at the owner
16:03:49 <Samu> AIs are squirrels
16:05:36 <Samu> must check what kind of owner does it get with original code
16:09:25 <Samu> heh, original code gets Company 1 as owner, but then it also doesn't do anything with it
16:11:16 <Samu> so, in short... whatever owner it's there, as long as it's not canal, doesn't matter
16:11:24 <Samu> my code is thus, fine
16:59:13 <crazystacy> that AI script debug red font is a pleasure to read...
17:00:13 <Samu> god damn visual studio, don't force me to buy an SSD
17:00:24 <peter1138> It doesn't make it any faster...
17:00:52 <Samu> i see dockingtile code is in my way now
17:01:05 <peter1138> That's positive.
17:03:26 <Samu> im not sure how to handle that bool remove
17:03:34 <Samu> if i am to keep rivers
17:05:21 *** crazystacy has quit IRC
17:07:24 <_dp_> damn, I can fix sprite sorter being cubic but apparently it's comparisons that usually take the most time and they're quadratic already
17:08:12 *** Thedarkb has quit IRC
17:10:07 <peter1138> I'm sure "that bool remove" means something to someone, but not to me.
17:12:29 <andythenorth> is it nap time?
17:12:38 <peter1138> Isn't it always?
17:13:01 <andythenorth> my nap skills are poor
17:13:06 <andythenorth> I do it wrong
17:17:08 *** crazystacy has joined #openttd
17:17:27 <crazystacy> north == -1:-1 or?
17:17:46 <crazystacy> RAILTRACK_NE_SW // Track along the x-axis (north-east to south-west)
17:17:50 <crazystacy> surely that is along the Y axis
17:18:04 <crazystacy> if NE is 0:-1 and SW is 0:1
17:23:48 <Samu> i hear my HDD doing rararararraaraararararara
17:24:57 <peter1138> It's 2020, why would you not have an SSD anyway?
17:25:14 <Samu> im poor
17:25:38 <Samu> and i don't want a 256 gb SSD or 512
17:25:42 <Samu> i only settle with a 1 tb
17:27:28 <crazystacy> you can do the classic 50 gb ssd + big HDD
17:27:33 <crazystacy> put OS on ssd and files on HDD
17:29:47 <Samu> https://pastebin.com/1vRWN7T8 dockingtile versus restoring river when demolishing canal
17:29:53 <Samu> peter1138,
17:30:27 <Samu> MakeRiver has a SetDockingTile
17:30:49 <Samu> it would be weird to have it RemoveDockingTile afterwards
17:30:53 <Samu> but i'm not sure
17:33:30 *** Pikka has quit IRC
17:55:22 *** Thedarkb has joined #openttd
18:01:45 *** Thedarkb has quit IRC
18:23:33 <crazystacy> tunnels crossing each other is an amazing cheat
18:23:37 <crazystacy> was the original TTD like that?
18:26:31 <peter1138> Mandalorian is quite good.
18:27:33 <crazystacy> it is very good
18:27:51 <andythenorth> is it the Dark Tower, but in Star Wars?
18:28:01 <nielsm> crossing tunnels was never possible in vanilla TT
18:28:01 * andythenorth reading about it
18:28:17 <nielsm> was added by ttdpatch relatively early
18:29:05 <crazystacy> was ttdpatch before openttd?
18:29:10 <nielsm> yes
18:29:16 <crazystacy> cause i saw on its feature page it had lots of fancy features openttd also has
18:29:17 <crazystacy> ah ok
18:30:06 <peter1138> Well. It's got Baby Yoda. And droids.
18:30:39 <andythenorth> I failed at napping
18:31:37 <crazystacy> peter1138, did you see the mudhorn yet?
18:34:40 <peter1138> I've not watched it all yet.
18:39:53 <crazystacy> ok :P
18:48:24 *** Heili has joined #openttd
18:58:29 *** Heiki is now known as Heisi
18:58:29 *** Heili is now known as Heiki
19:01:15 *** snail_UES_ has joined #openttd
19:04:49 <andythenorth> hi snail_UES_
19:05:06 <snail_UES_> hey andythenorth
19:21:21 <Samu> what's your decision on 7944/7946
19:22:49 <Samu> I believe I got my Permanent Rivers ready, but is depending 7946 whether it's going to be merged
19:23:04 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/Jvk40
19:27:01 <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/Jvk42
19:29:52 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/Jvk4V
19:35:11 <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 commented on pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/Jvk4K
19:45:33 <TrueBrain> glx: I am not really worried about the commits in the pull-request itself, more about how many commits they are behind master .. can be tricky to find how high fetch-depth you need to find the commit in the master-tree
19:46:06 <glx> well the commits in the pull request are needed for the commit check :)
19:46:26 <TrueBrain> yeah, but you can't tell if they are part of the master, till you also have seen the history of master
19:46:37 <TrueBrain> so you need to increase the depth of both
19:46:59 <TrueBrain> too bad the merge commit doesn't tell FROM where it started
19:47:19 <glx> working from the merge I can easily get the list
19:47:49 <TrueBrain> not sure what you mean, but fiddle away :)
19:48:01 <TrueBrain> what a good alternative might be, to simply use shallow-since, and set it to one week or so
19:48:15 <TrueBrain> and just bail out if someone makes a PR that is older than 1 week on the master
19:48:26 <TrueBrain> that could nicely ask for a rebase :D
19:49:07 <glx> what about very old PRs still up-to-date with master ?
19:49:10 <TrueBrain> hmmmmmm ... why not use the GitHub API, I wonder ...
19:49:38 <TrueBrain> don't know why I didn't think of that earlier ... GitHub does all this complex logic for us
19:51:49 <TrueBrain> we can do two things: port that script to work directly on the GitHub API, or use the GitHub API to get the parent of the first commit in the PR :)
19:51:54 <TrueBrain> the latter is the easiest, I guess
19:56:35 <peter1138> Did we cmake yet?
20:00:39 <TrueBrain> documentation for GraphQL is ..... special
20:03:21 <TrueBrain> curl ... https://api.github.com/graphql -d '{"query": "query { repository(owner: \"OpenTTD\", name:\"OpenTTD\") { pullRequest(number: 7270) { commits(first: 1) { nodes { commit { parents(first: 1) { nodes { oid } } } } } } } }"}' | jq .data.repository.pullRequest.commits.nodes[0].commit.parents.nodes[0].oid
20:03:27 <TrueBrain> well, it does fit on a single line, I guess
20:05:15 <TrueBrain> owh, this can be done easier
20:07:57 *** crazystacy2 has joined #openttd
20:14:07 *** crazystacy has quit IRC
20:19:21 *** crazystacy2 has quit IRC
20:34:17 *** syr has quit IRC
20:34:48 *** syr has joined #openttd
20:38:05 <TrueBrain> glx: https://github.com/TrueBrain/OpenTTD/pull/10/checks?check_run_id=396991152
20:38:26 <TrueBrain> the only drawback is, that if someone pushes new commits BEFORE the curl has taken place, it can report on the wrong set of data
20:38:31 <TrueBrain> but ... yeah ...
20:39:02 <TrueBrain> runs in 10 seconds :o
20:39:07 <TrueBrain> that is a huge improvement over the current :P
20:41:48 <TrueBrain> owh, I think I need to fetch one more commit
20:41:58 <TrueBrain> as otherwise the diff of the first commit is not possible ofc :D
20:42:07 <TrueBrain> or is it ..
20:44:06 <TrueBrain> no, it is not :D
20:44:08 <TrueBrain> makes sense
20:51:03 <DorpsGek_III_> [OpenTTD/workflows] TrueBrain opened pull request #2: Fix: also support the 'new_pullrequest' trigger https://git.io/JvkBX
20:51:30 <DorpsGek_III_> [OpenTTD/workflows] TrueBrain merged pull request #2: Fix: also support the 'new_pullrequest' trigger https://git.io/JvkBX
20:53:25 <DorpsGek_III_> [OpenTTD/OpenTTD] TrueBrain opened pull request #7948: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvkBQ
21:08:03 *** crazystacy2 has joined #openttd
21:15:32 <Samu> what is newgrf_canal.cpp ? I suppose I need to add some functionality there ?
21:18:36 <TrueBrain> @random yes no
21:19:09 <glx> the filename seems explicit to me :)
21:21:13 <Samu> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Canals
21:23:07 <Samu> this link doesn't work http://projects.tt-forums.net/projects/ttdpatch/repository/revisions/2367/entry/trunk/patches/water.asm#L879
21:24:25 <TrueBrain> https://thislinkdoesntworkeither.com/
21:32:32 *** Mazur has quit IRC
21:35:04 <Samu> it's here: https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf_canal.cpp#L76
21:36:32 <glx> the link won't help you, it's a asm source file :)
21:42:24 <glx> Samu: https://github.com/ttdpatch/ttdpatch/blob/a88a0bf794ed0f085f7cd8fba682d060ab4789c9/patches/water.asm#L879
21:42:36 <glx> but as said it's probably unreadable for you :)
21:43:41 <Samu> eww i see
21:44:03 <snail_UES_> so andythenorth, done any extra work on your steamers yet?
21:44:10 <andythenorth> nah
21:44:29 <andythenorth> 42 other trains to draw first :P
21:44:43 <andythenorth> done any french diesel/electrics yet?
21:45:01 <snail_UES_> wow! 42 more engines to add to your set? :O
21:45:21 <snail_UES_> nope not yet. I guess I’m going to do steamers only for the next couple of years…
21:45:31 <snail_UES_> I’ve got a ton to draw (or fix) and I want to get the hang of it
21:47:16 <andythenorth> 42 is mostly wagons :P
21:47:29 <andythenorth> I am considering Euro Horse :P
21:47:44 <snail_UES_> Continental European trains?
21:47:51 <andythenorth> yep, mixed up
21:48:31 <snail_UES_> it’d be hard to make a “balanced” set. Each player would like to have trains from their country :p
21:48:41 <andythenorth> it's ok, I'm only designing for one player :P
21:48:47 <snail_UES_> hahaha
21:48:52 <andythenorth> Nez cassés
21:48:55 <andythenorth> TGV poste
21:48:58 <andythenorth> Krokodil
21:49:09 <snail_UES_> “best of breed”?
21:50:07 <andythenorth> probably
21:50:15 <snail_UES_> you could put a “basic block” of French and German trains, plus some Italian and Swiss electrics, Dutch MUs...
21:50:41 <snail_UES_> early Austrian steamers are cool too
21:52:30 <andythenorth> I could include that high-speed SNCF freight train that uses covered vans at 125mph or so
21:52:38 <andythenorth> not le post TGV, there's another one :P
21:52:56 <snail_UES_> is there one? do you have a link?
21:54:33 <Samu> i'm completely clueless about NewGRF code
21:54:37 <Samu> feels like a new world
21:56:35 <andythenorth> snail_UES_: MVGV 200 (Messagerie à Grande Vitesse )
21:57:03 <andythenorth> https://www.youtube.com/watch?v=StCiMfC_RNU
21:57:12 <andythenorth> the speed it passes other freight trains...
21:58:07 <andythenorth> https://www.cheminots.net/forum/topic/5936-le-mvgv-un-train-pas-comme-les-autres/
22:01:56 <snail_UES_> well but it’s not freight, it’s mail
22:02:55 <andythenorth> makes sense
22:03:05 <andythenorth> my translator suggested parcels/ packages
22:03:39 <snail_UES_> yep…
22:07:34 *** crazystacy has joined #openttd
22:09:16 <peter1138> OpenTTD or... Heretic in GZDoom?
22:09:55 *** crazystacy has quit IRC
22:10:21 <crazystacy2> messagerie lol
22:10:25 <crazystacy2> that's a great wor
22:10:26 <crazystacy2> d
22:12:24 <andythenorth> peter1138: both?
22:12:50 <peter1138> I need to let my dinner settle before multitasking
22:31:21 *** andythenorth has quit IRC
22:34:29 *** andythenorth has joined #openttd
22:34:31 <andythenorth> oops I forgot to have chocolate
22:34:56 <peter1138> Solid or liquid?
22:35:09 <peter1138> Have you got an array of Apple Pro Display XDR yet?
22:36:03 <andythenorth> ouch
22:36:12 <andythenorth> solid
22:36:16 <DorpsGek_III_> [OpenTTD/OpenTTD] JMcKiern opened pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window. https://git.io/Jvk0Y
22:37:27 <peter1138> Hugh :-)
22:39:45 <peter1138> I could have chocolate. I had banana and blueberries.
22:44:18 <peter1138> 71% dark from... Aldi :p
22:47:11 <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro approved pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window. https://git.io/Jvk02
22:47:30 *** snail_UES_ has quit IRC
22:47:43 <LordAro> wish we had some sort of compile time thing for providing the correct number of parameters to strings
22:48:27 *** Wolf01 has quit IRC
22:48:29 <milek7_> runtime assert wouldn't be more doable?
22:48:38 <LordAro> well, perhaps
22:48:57 <LordAro> but that's harder to confirm correctness
22:48:59 <DorpsGek_III_> [OpenTTD/OpenTTD] JMcKiern commented on pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window. https://git.io/Jvk0i
22:52:06 <TrueBrain> LordAro: LGTM might allow to validate these things
22:52:41 <TrueBrain> Needs some preprocessing, but possibly it can be done
22:54:22 *** andythenorth has quit IRC
22:55:52 <peter1138> Compile-time would depend on the string being constant, which isn't always the case.
22:58:07 <TrueBrain> Not sure if that is true. But we first need to be able to load our project in LGTM to experiment :)
22:58:33 <TrueBrain> Hurry up with 1.10! :p :p
23:01:10 *** andythenorth has joined #openttd
23:05:54 <DorpsGek_III_> [OpenTTD/OpenTTD] nielsmh merged pull request #7949: Fix #7927: Incorrect resolution shown in "Hugh screenshot" query window. https://git.io/Jvk0Y
23:05:55 <DorpsGek_III_> [OpenTTD/OpenTTD] nielsmh closed issue #7927: Giant screenshot warning reports incorrect dimensions of screenshot https://git.io/Jvfoi
23:05:55 <crazystacy2> hm. maybe i'm better off just using an AI library right away. would save time. anyone have a recommendation?
23:09:40 <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro commented on pull request #7947: Fix #7945: Add cost of clearing the sloped tile when placing a dock https://git.io/JvkEg
23:12:32 <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro commented on pull request #7890: Fix #6452: Reset only editable and visible settings from GUI https://git.io/JvkEw
23:13:06 *** sla_ro|master has quit IRC
23:13:29 <LordAro> andythenorth: feel like playing with #7886 at all?
23:14:59 * andythenorth looks
23:15:07 <DorpsGek_III_> [OpenTTD/OpenTTD] glx22 updated pull request #7943: Move commit checker from Azure Pipelines to Github Actions https://git.io/JvTY7
23:15:58 *** nielsm has quit IRC
23:22:13 <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro requested changes for pull request #7886: Group management enhancements https://git.io/Jvkuv
23:25:49 <DorpsGek_III_> [OpenTTD/OpenTTD] LordAro requested changes for pull request #7859: Feature #7756: Allow server to supply a reason to kicked/banned clients https://git.io/Jvkum
23:26:48 <peter1138> Hi
23:26:52 <LordAro> o/
23:26:56 <peter1138> So...
23:26:57 <peter1138> I have master...
23:27:00 <peter1138> Now what?
23:27:25 <LordAro> https://github.com/OpenTTD/OpenTTD/pulls/PeterN ?
23:32:49 <peter1138> Anything more pressing?
23:33:15 <LordAro> ¯\_(ツ)_/¯
23:33:22 <peter1138> Hmm, just finished off some nuts... you can tell I stopped carolie counting... :s
23:33:24 <LordAro> one of those is milestoned for 1.10...
23:33:44 <peter1138> Eh, that's the one that causes performance issues for some.
23:35:05 <TrueBrain> glx: guess we need to battle which solution is best :p guess others have to be the judge :D
23:35:13 <glx> hehe
23:35:54 <glx> for now I use depth 3 but it can be increased
23:36:00 <TrueBrain> Mine depends on their API, yours can hammer their server for a while
23:36:27 <glx> depth 3 is ok for PR with only 1 commit
23:36:38 <TrueBrain> And on a recent master
23:36:59 <glx> https://github.com/glx22/OpenTTD/pull/1/checks?check_run_id=397090674
23:37:03 <TrueBrain> I am most worried about that btw
23:37:09 <glx> this test is not on latest master
23:37:59 <glx> but as it's using the merge it's always on latest master, unless it's not mergeable and github tells it
23:38:31 <TrueBrain> There can be many commits before deepen gives a hit
23:39:11 <glx> deepen just adds commits
23:40:14 <TrueBrain> deepening
23:40:19 <TrueBrain> some letters fell off there
23:40:53 <glx> git rev-list --reverse HEAD^..HEAD^2 should take care of that
23:41:01 <TrueBrain> not what I mean
23:41:10 <TrueBrain> it can take a long time before it read enough commits to find a common point
23:41:24 <glx> deepen doesn't search for common point
23:41:52 <glx> it just increase depth
23:41:56 <TrueBrain> I love how sometimes we can talk to each other, but not understand what we are saying :)
23:42:21 <TrueBrain> your while loop, is trying to find a common parent, right?
23:42:59 <glx> no, my loop just search for the full commit list as given by git rev-list
23:43:28 <TrueBrain> that is what it is executing
23:43:30 <TrueBrain> but it is doing something
23:43:40 <TrueBrain> your comment suggests it is finding a common parent of HEAD^1 and HEAD^2
23:44:46 <glx> the check for parent is just to check we are not on a grafted one
23:44:55 <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements https://git.io/Jvkzt
23:45:04 <glx> my comment is probably not good :)
23:45:16 <TrueBrain> that can be the other conclusion, yes ;)
23:46:20 <TrueBrain> so what is it doing? (and don't tell me the actions you perform; I want to know what you think it is doing)
23:46:35 <TrueBrain> because "search for full commit list" is not something I can proces :D
23:46:54 <TrueBrain> you have 2 parts of a tree, ^1 and ^2 .. what are you doing to them :)
23:47:14 <LordAro> https://github.com/OpenTTD/OpenTTD/pull/7886#discussion_r368252857 is there a better way to strip out a string's size formatting?
23:48:21 <DorpsGek_III_> [OpenTTD/OpenTTD] stormcone commented on pull request #7886: Group management enhancements https://git.io/Jvkzc
23:49:06 <glx> part ^1 is the latest master, ^2 is the merged branch
23:50:09 <glx> in an unshallowed checkout git log or git rev-list shows all commits from ^2 on top of ^1
23:51:02 <glx> basically without specifying a range you get merge, PR commits list, master commits list
23:51:57 <glx> in shallowed checkout each list can be incomplete
23:52:44 <glx> log shows merge, PR commit 1, PR commit 2 [grafted], master commit 1, master commit 2 [grafted]
23:53:42 <glx> so with rev-list HEAD^..HEAD^2 I get PR commit1, PR commit 2
23:54:24 <glx> the loop checks the latest commit on the list is not a grafted one
23:54:44 <TrueBrain> okay, so maybe you did not realise this, but basically you are looking for the first parent they have in common :)
23:55:23 <TrueBrain> (as soon as the parent of the inner rev-list last entry (or first as you reversed it) is valid, that is the first parent of both master and the pull-request)
23:55:40 <TrueBrain> the problem is, one of your assumptions is not correct: a merge does not do: merge, PR, PR, master, master
23:55:47 <TrueBrain> it can as well do: merge, master, master, master, PR, PR
23:55:52 <TrueBrain> 7270 is a nice example where this happens
23:56:08 <TrueBrain> and the older a pull-request is, the longer the list is
23:56:24 <TrueBrain> so my worry is, that you are not only deepening to get through the PR commits, but also a part of the master list
23:56:28 <glx> oh I can test that locally
23:56:34 <TrueBrain> I just did ;)
23:56:37 <glx> I just need to get the merge SHA
23:56:54 <TrueBrain> git -c protocol.version=2 fetch --no-tags --prune --depth=3 origin refs/pull/7270/merge
23:57:06 <TrueBrain> but okay, your rev-list entries can be replaced with "git merge-base FETCH_HEAD^ FETCH_HEAD^2"
23:57:19 <TrueBrain> as it does exactly what you invented yourself :D Check for the first common parent :P
23:57:28 <TrueBrain> (even the result is the same :D)
23:57:47 <LordAro> what does protocol.version=2 do?
23:57:51 <TrueBrain> new git protocol
23:57:57 <TrueBrain> allows more stuff
23:58:04 <TrueBrain> in this case not needed; but needed for some new commands
23:58:22 <TrueBrain> https://git-scm.com/docs/protocol-v2
23:58:24 <TrueBrain> pretty neat
23:58:39 <TrueBrain> (lot faster)
23:58:43 <DorpsGek_III_> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7890: Fix #6452: Reset only editable and visible settings from GUI https://git.io/JvkzM
23:59:44 <TrueBrain> glx: between 12 and 15 depth, 7270 finds the first parent. The PR is only 9 commits (and it fetches 27 commits at that point in time)