IRC logs for #openttd on OFTC at 2019-01-31
            
00:00:03 <andythenorth> but I will dream of AIs
00:00:07 <andythenorth> do AIs dream of AIs?
00:00:13 <andythenorth> sheep AIs?
00:00:40 <Samu> so many ideas
00:01:02 <glx> some random time is added to start_date IIRC, so indeed if you add a special value like 0, you could make it start immediately
00:02:12 <andythenorth> sounds like vehicles :P
00:02:25 <andythenorth> let's add a framework!
00:02:29 <Samu> i was never a fan of that random deviation thing
00:02:32 <andythenorth> for start dates on generic objects!
00:02:39 <andythenorth> isn't that how enterprise software works?
00:02:56 <supermop_work__> late for climbing, no?
00:03:39 <Samu> but 0 could me a special case
00:03:39 <andythenorth> finished at 21.30 or something
00:03:41 <andythenorth> dunno
00:03:57 <andythenorth> what's needed here is more bed
00:03:59 <andythenorth> bye
00:03:59 *** andythenorth has left #openttd
00:04:14 <Samu> let me write down my TODO
00:08:39 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7084: Change: AI/GS Config GUI overhaul https://git.io/fhDT9
00:16:20 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z opened pull request #7147: Change: Synchronize randomness in vehicle introduction… https://git.io/fhDkW
00:16:30 <Eddi|zuHause> someone want to test that?
00:26:38 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhDIU
00:28:01 <peter1138> Bah, I was peckish after cycling this evening, and so... pecked too much :/
00:30:01 <Eddi|zuHause> bon apetit
00:30:14 <peter1138> Yea!
00:34:02 <Eddi|zuHause> there's this historic anecdote according to which Frederic the great sent this picture to voltaire https://wikimedia.org/api/rest_v1/media/math/render/svg/89d77e0dbaf57fbbaf77d2dfcd1cde28e19c97b5 and voltaire answered "Ga"
00:36:55 <Eddi|zuHause> (you're supposed to read that as "s sous p a cent sous six" and "g grand a petit", or "A souper a Sanssouci?" "j'ai grand appetit")
00:37:48 <Eddi|zuHause> also, your build failed
00:38:21 <Eddi|zuHause> lots of trailing whitespace
00:38:44 <Eddi|zuHause> in saveload.h
00:40:36 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
00:41:08 <Samu> I need to add 1 more tick delay for AIs before they start
00:41:40 <Samu> with a start_date = 0, all AIs can start in 15 ticks
00:41:56 <Samu> not exactly at the same time, but almost
00:43:10 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
00:43:54 <Samu> for a start_date = x, the delay is 1 + AI::GetStartNextTime() * DAY_TICKS;
00:44:11 <Samu> 75 ticks for 1 day, 129 for 2 days, etc..
00:44:19 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/fhDLL
00:44:22 <peter1138> Running ai/regression/tst_regression... passed!
00:44:24 <peter1138> :D
00:44:48 <Samu> @calc 74 * 2
00:44:48 <DorpsGek> Samu: 148
00:44:54 <Samu> meh, 149 then
00:45:28 <Samu> or maybe not, i can make this better
00:49:32 <Samu> getstartnexttime = 0 ? 1 : getstartnexttime :)
00:53:00 <Samu> trying a while
00:57:59 <Samu> alright, just made them all start exactly in the same tick
00:58:16 <Samu> now need to take care of that random deviation
01:00:57 <glx> that looks like max(getstartnextime, 1)
01:04:40 <peter1138> Gotta say, the current method of setting delay is a pain in the bum.
01:04:55 <peter1138> Individually per slot :/
01:16:09 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
01:19:34 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7086: Change #6173: Update SDL driver to use SDL 2.0 https://git.io/fhamZ
01:19:49 <peter1138> clang++ works better than clang ;p
01:24:48 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhDIU
01:30:56 *** supermop_work__ has quit IRC
01:31:27 <Samu> https://paste.openttdcoop.org/pdfskp6jj
01:32:32 <Samu> maybe it shouldn't even set the setting
01:33:01 <Samu> no need to create a Parameter entry
01:33:12 <Samu> hmm must investigate
01:36:17 <LordAro> peter1138: i wasn't aware there were any differences between clang & clang++
01:37:14 <peter1138> Well the former won't compile C++ code :-)
01:37:15 *** ANIKHTOS has joined #openttd
01:37:28 <ANIKHTOS> happy new year to all
01:37:41 <LordAro> peter1138: that's ...not right?
01:39:52 <peter1138> That's what I thought.
01:40:11 <peter1138> Hmm, I should probably get an early night, but it's a bit late for that.
01:47:32 *** Eddi|zuHause has quit IRC
01:47:58 *** Eddi|zuHause has joined #openttd
01:48:15 *** Thedarkb-X40 has joined #openttd
01:51:06 *** Pikka has joined #openttd
01:52:47 *** Thedarkb-T60 has quit IRC
02:00:23 *** ANIKHTOS has quit IRC
02:07:50 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels https://git.io/fhDOM
02:09:52 <Eddi|zuHause> how crazy is it to rebase a pr onto another pr?
02:11:08 <glx> I once merged a PR into another because I needed it for a test
02:11:30 <Eddi|zuHause> nnyby: ships vs bridges were always a bit off. you sure these issues have anything to do with each other?
02:13:13 <Samu> just discovered something strange
02:14:05 <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/ai/ai_gui.cpp#L387
02:14:25 <Samu> what is strcmp supposed to do
02:15:17 <LordAro> Samu: aha, that's a good one
02:15:24 <Samu> also, lines 391, 392 and 393 are never called
02:15:35 <Samu> put a breakdown there, it never reached it
02:15:50 <LordAro> look up the return values of strcmp
02:16:07 <LordAro> and remember how integers evaluate to booleans
02:16:21 <LordAro> it's not a great way of using strcmp
02:16:29 <LordAro> as it leads to confusing like this :p
02:18:32 <nnyby> Eddi|zuHause: no, i'm not sure. may be unrelated
02:19:53 <Samu> what about lines 391...
02:21:06 <Samu> http://www.cplusplus.com/reference/cstring/strcmp/
02:23:04 <Samu> it returns 0, !0 = true then
02:23:28 <Samu> still doesn't explain why lines 391 aren't reached
02:30:00 <glx> tried with a config item not being "start_date" ?
02:30:47 <Samu> yes, clueless plus, many of them, 15 ais
02:30:48 <glx> and with no descriptin ?
02:31:17 <Samu> oh, don't tell me it's that
02:31:20 <Samu> let me check
02:31:46 <glx> the code tell me it's probably the part you are missing in your test cases
02:32:33 <Samu> the description for start_date is empty
02:33:04 <Samu> ah, i see
02:33:07 <glx> yes but start_date doesn't go to line 391
02:33:31 <Samu> i think there's only an AI that fits into this category
02:33:33 <Samu> WmDOT
02:33:44 *** snail_UES_ has joined #openttd
02:34:19 <glx> usually reading the code helps a lot to understand how things are supposed to work ;)
02:34:30 <Samu> oops, apparently not
02:34:47 <Samu> is it even possible to create non descripted parameters?
02:35:05 <glx> just set the description to "" I think
02:35:38 <Samu> let me edit the minimalgs brb
02:37:30 <glx> because description is required, but can be an empty string
02:38:56 <Samu> aha, reached it!
02:39:04 <Samu> description = ""
02:39:43 <glx> see, read the code, it tells you what you need to reach a specific section
02:41:24 <Samu> i am worried that "start_date" could be a GS parameter
02:41:45 <Samu> hmm
02:41:58 <glx> it's probably ignored
02:42:13 <Samu> how to properly identify an AI
02:44:28 <Samu> looks like it's not
02:45:16 <Samu> https://imgur.com/xF9wN0F
02:45:34 <Samu> I didn't even describe it
02:45:42 <Samu> description = "", but still got that
02:47:08 <glx> with a breakpoint you can check the value of config_item.description
02:48:01 <glx> hmm description is not the problem
02:48:44 <glx> because it displays STR_AI_SETTINGS_START_DELAY, that means description is empty
02:49:16 <Samu> yes, but ... i mean, it's a GS
02:49:21 <Samu> it shouldn't happen
02:49:30 <glx> but that also means name is "start_date"
02:49:58 <Samu> i can fix it apparently
02:50:11 <Samu> just need to ensure the slot which it belongs
02:50:25 <glx> no need to fix
02:51:19 <glx> for me it's ok to get the default string for a setting named "start_date" if no description is provided
02:52:36 <glx> if the GS wants another description for this setting it can provide it, it just need to be non empty
02:53:07 <Samu> the way it is described...
02:53:16 <Samu> "this AI"
02:53:18 <Samu> hmm
02:53:47 <Samu> GS's dont even start, would be weird lol
02:54:49 <Samu> in the other function is where i have to properly identify this as an AI
02:55:16 <Samu> "start_date" and strempty is not garanteed i'm checking an AI parameter
02:56:27 <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/script/script_config.cpp#L132
02:56:46 <Samu> over here, I'm trying to create a special case for the date being 0
02:56:52 <Samu> dont want random deviation to occur
02:57:47 <Samu> only random deviation for values > 0
03:44:04 <Samu> error C2248: 'ScriptInfo::engine': cannot access protected member declared in class 'ScriptInfo'
03:44:12 <Samu> what does it mean protected... bah
03:44:19 <Samu> it's there!
03:46:03 <Samu> char *scanner = this->info->engine->APIName;
03:46:06 <Samu> doesn't work
03:46:17 <Samu> but it's the correct path
04:28:39 *** Samu has quit IRC
04:39:14 <DorpsGek_II> [OpenTTD/OpenTTD] PikkaBird opened issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDCG
04:40:37 *** debdog has joined #openttd
04:41:38 <Pikka> that was a fun morning, trying to figure that one out :)
04:47:04 *** HerzogDeXtEr has joined #openttd
04:48:09 *** D-HUND has quit IRC
04:51:30 <Eddi|zuHause> Pikka: i'd say that's not a bug, but you had an inaccurate extrapolation of the way TTDPatch did it
04:51:49 <Eddi|zuHause> Pikka: var 80 is not in the specs, anyway
04:52:35 <Eddi|zuHause> Pikka: the tile coordinates in OpenTTD work like (y << map_x) | x
04:59:19 <Eddi|zuHause> Pikka: so you need to treat var 80 as D sized, and shift by the map size to get the Y coordinate
04:59:33 <Eddi|zuHause> Pikka: there's a variable for map size, but i don't remember where
05:11:43 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDWc
05:21:32 *** HerzogDeXtEr has quit IRC
05:27:01 <Eddi|zuHause> Pikka: so to make sense of var 80 (for towns, industries, and maybe some other things) you need the X bits of patch variable 13 https://newgrf-specs.tt-wiki.net/wiki/ReadingPatchVariables
05:29:06 <Pikka> I see. and mask out some bits for the X value on smaller maps :)
05:29:42 <Pikka> or, for whichever dimension is smaller on non-square maps
05:29:45 <Pikka> thanks
05:30:08 <Eddi|zuHause> Pikka: doesn't matter which one is bigger, the X/Y bits of that are the correct ones
05:31:16 <Pikka> I think I get it... I'll have to experiment. and then document it once I've got it down? it is a useful var for house sets, as it's the only way to get relative position within a town
05:31:50 <DorpsGek_II> [OpenTTD/OpenTTD] PikkaBird commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDlG
05:32:01 <Eddi|zuHause> Pikka: you need to replicate the TileX and TileY functions from https://github.com/OpenTTD/OpenTTD/blob/ba38a7ca652c00a1d0851f4d97f0b7d360df853c/src/map_func.h#L207
05:33:57 <Pikka> it's a dword, containing however many bits it needs for X, then however many it needs for Y?
05:34:32 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels https://git.io/fhDlW
05:34:39 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDl8
05:34:47 <Eddi|zuHause> Pikka: yes
05:35:19 <Eddi|zuHause> Pikka: you should forget about var 81, it won't be meaningful and is only provided for backwards consistency
05:38:11 <Pikka> for sure
05:44:25 <Eddi|zuHause> getting the Y value should be easy, just shift by "X"+6, isolating the X value might be trickier, depends on your grf-wizardry to construct the correct mask
05:44:59 <Eddi|zuHause> (for a 256 map, "X" will be 2)
05:45:48 <Eddi|zuHause> dunno if you can abuse action6 to vary the shift/mask of a varaction2
05:46:28 <Eddi|zuHause> since map size won't magically change after game creation, it should be somewhat safe to do
05:47:07 <Pikka> I'm sure you could, but just doing it with var2 chains is probably easier.
05:48:30 <Pikka> and thanks to persistent storage you can do it once for each town and save the value, you don't have to do it every time you want to check a coord
05:51:33 <glx> the mask is easy to do, it's just (2^X)-1
05:52:18 <Eddi|zuHause> glx: yes, but it would take me a few minutes to conjure up the correct NFO incantation to get that
05:52:42 <glx> true
05:54:06 <Eddi|zuHause> glx: doesn't make it easier that you need to fit the magic +6 in there as well
05:54:11 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels https://git.io/fhDlj
06:05:29 *** snail_UES_ has quit IRC
06:18:07 *** glx has quit IRC
07:15:16 <peter1138> 01:09 < Eddi|zuHause> how crazy is it to rebase a pr onto another pr?
07:15:52 <peter1138> yeah, not crazy at all.
07:24:49 <Pikka> they don't call him crazy Eddi for nothing
07:26:03 <peter1138> 16 bits for X and 16 for Y would be simpler, but also then someone would cry when map sizes higher than 65535 don't work.
07:26:55 <peter1138> You can always request new variables, I guess.
07:27:17 <Pikka> it was a faff, but I got it working, thanks Eddi :)
07:43:29 <peter1138> GarryG manages to make a .rar file which I can't open on Linux.
07:45:20 <peter1138> Ah, I need to add the "non-free" packages :/
07:49:28 <peter1138> Hmm, an industry called "Country Village"
07:50:11 <peter1138> World map needs to be tweaked.
07:58:30 <Eddi|zuHause> <peter1138> 16 bits for X and 16 for Y would be simpler, but also then someone would cry when map sizes higher than 65535 don't work. <-- patch var 13 breaks long before that
07:59:02 <Eddi|zuHause> also, you can't iterate over the map like we do currently if you introduce gaps after every row
07:59:04 <peter1138> I'm not going to look that up.
07:59:29 <Eddi|zuHause> peter1138: i linked it earlier, but it's a giant bitstuffing brainfuck
07:59:55 <peter1138> And I meant just as variable available to NewGRF, not changing how the game work.
08:00:17 <Eddi|zuHause> peter1138: just add two 40+ vars for X and Y then
08:00:27 *** sla_ro|master has joined #openttd
08:01:10 <Eddi|zuHause> or add builtin newgrf ops for TileX and TileY
08:01:11 <Pikka> but then all the clever nfo I just wrote would be worthless :)
08:07:31 <peter1138> And wouldn't work in previous versions.
08:08:43 <Eddi|zuHause> the way patch var 13 and tileindex works hasn't changed in forever
08:14:42 <Eddi|zuHause> git blame says the code for patch var 13 was last touched in 2008
08:15:34 <peter1138> Uh
08:15:50 <peter1138> My comment was clearly in reference to adding variables or ops.
08:16:00 <Eddi|zuHause> yes
08:17:12 <peter1138> Also it's -6
08:17:37 <peter1138> -6 deg C :/
08:18:06 <Eddi|zuHause> it seems warmer here
08:47:19 *** Thedarkb-X40 has quit IRC
09:10:12 *** andythenorth has joined #openttd
09:10:21 <peter1138> Hi
09:10:24 <andythenorth> y
09:10:26 <andythenorth> o
09:10:51 <andythenorth> I might start an NRT game soon
09:11:01 <peter1138> Should I commit nrt fixes separately, or squash them every time?
09:11:16 <andythenorth> _/\o/\_
09:11:17 <peter1138> I'm thinking separately, and then squash when we're ready later.
09:11:18 <andythenorth> dunno
09:11:22 <andythenorth> ok
09:11:35 <peter1138> Otherwise it'll get difficult to track changes, obviously.
09:11:39 <andythenorth> shows what changed recently yes
09:11:48 <andythenorth> so what we need now is an NRT nightly again
09:11:53 <peter1138> ;)
09:12:22 <peter1138> Ok, I will force-push these changes, future changes will be non-force pushed, except for rebases of course.
09:12:46 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
09:13:47 <peter1138> I'm also compiling with -Werror now :)
09:15:29 <andythenorth> I have so many warnings, I think that would never finish :P
09:16:02 <peter1138> It would definitely finish with -Werror, but it wouldn't complete the compile.
09:16:24 <andythenorth> yes what you said
09:16:43 <peter1138> Hmm, maybe I should set up an NRT server.
09:16:47 <peter1138> That's a good idea.
09:17:06 <peter1138> Then I don't have to worry about nightly revision compatibilies.
09:19:14 *** andythenorth has quit IRC
09:19:46 <peter1138> I see!
09:20:39 <peter1138> Oh, it compiled an ancient version. Hmm.
09:21:15 *** andythenorth has joined #openttd
09:21:21 <andythenorth> disconnected why? :P
09:21:32 <peter1138> Ah "git reset --hard origin/nrt-block" is quite simple to force an update.
09:21:45 <andythenorth> git reset --hard is my favourite command
09:21:58 <peter1138> I accidentally built an ancient version of nrt :/
09:22:01 <andythenorth> oops
09:22:13 <andythenorth> I accidentally wasn't running my "don't sleep network" app :P
09:22:14 <Eddi|zuHause> anyone remind me why we're discarding the CI builds instead of having them available to test stuff with?
09:22:28 <andythenorth> probably nobody made it do that?
09:22:47 <andythenorth> also, possibly, infosec
09:23:00 <peter1138> Eddi|zuHause, because it's not set up to do that.
09:23:00 <andythenorth> allowing binary distribution from any PR is.....curious
09:23:51 <peter1138> It's not one of TrueBrain's itches, so someone else has to set it up. But still nobody else knows how it works and fits together.
09:24:19 <LordAro> i think it is one of his itches, actually
09:24:28 <peter1138> Yay, nrt-block server running!
09:24:36 <peter1138> Some NewGRFs might be useful, I suppose.
09:24:42 <LordAro> he just wants it to be "approved" first (for infosec reasons)
09:25:22 <LordAro> (the method in which it gets approved is aa yet unclear)
09:25:24 <LordAro> moin
09:26:00 <andythenorth> peter1138: add some newgrfs
09:26:11 <andythenorth> there was a Hog somewhere
09:26:40 <andythenorth> oh here https://www.tt-forums.net/viewtopic.php?f=33&t=75637
09:27:00 <andythenorth> can't get it in bananas, because no way to distribute WIP grfs :P
09:28:26 <peter1138> Hmm
09:28:30 <peter1138> Feature request!
09:31:57 <LordAro> add it to the bananas2 spec :p
09:32:53 <andythenorth> maybe I should find my Hog repo
09:32:57 <andythenorth> oof
09:33:34 <andythenorth> need to give a test case for this https://github.com/OpenTTD/OpenTTD/pull/7118
09:39:55 <andythenorth> 49 warnings on compile
09:39:57 <andythenorth> 'probably fine'
09:45:05 <LordAro> the languages, probably
09:46:48 <andythenorth> mac stuff I think
09:46:59 <andythenorth> bunch of deprecation warnings
09:47:03 <andythenorth> warning about libs
09:49:12 <LordAro> ah yeah
09:49:39 <andythenorth> dunno if the azure mac build shows them
09:50:25 <LordAro> usually does
10:01:44 <peter1138> I think it does, yes.
10:01:58 <planetmaker> moin
10:02:36 <planetmaker> <andythenorth> can't get it in bananas, because no way to distribute WIP grfs :P <-- depends. You can force certain OpenTTD version requirements
10:02:54 <planetmaker> so if we have properly named test builds... that would be feasible
10:10:44 <Pikka> mmm, nrt
10:11:37 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDwq
10:11:38 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes https://git.io/fhDCG
10:12:43 <Pikka> thanks peter
10:13:10 <peter1138> LordAro, planetmaker, I guess if we were to start doing official test builds of stuff, we might want it to be a branch within the official repo rather than an external PR.
10:14:13 <peter1138> I guess the review & approve requirement can be disabled for non-master.
10:15:20 <peter1138> That auz industries NewGRF is... Hmm. The graphics are very familiar.
10:16:28 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7136: Sprite sorting issue with FIRS https://git.io/fhDww
10:17:52 <peter1138> Hmm, 6music, LBC or my own collection?
10:18:49 <peter1138> Ok, gone with the latter.
10:19:49 <planetmaker> peter1138, I think that's two different pair of shoes. For big features one might want separate branches hosted in our repo. Yet even for PRs it makes sense to have them accessible
10:19:58 <peter1138> planetmaker, okay.
10:20:26 <peter1138> If we selectively make PR builds available, then I see no need for feature branches in the main repo.
10:21:40 <planetmaker> true, usually that won't be necessary
10:22:09 <planetmaker> and tbh, it should usually not matter either whether a working branch resides in our repo, or say, yours. Or andys. or whoever created it
10:22:18 <peter1138> Yeah :)
10:23:08 <peter1138> Although with NRT I was wondering which to consider canonical. I ended up pushing to all, but if I'm doing more changes I will not push to Andy's as that'll keep badgering CI.
10:23:15 <peter1138> I mean, I guess that's what CI is for, but still.
10:23:33 <planetmaker> yeah
10:24:29 <planetmaker> without clear borders, I'd consider openttd-side branches for nrt, or maybe yesterday's addition of trbr (?)... big enough to have a lot of commits and to warrant a lot of work from possibly a number of people
10:24:51 <planetmaker> and wanted-enough features. Let's say: we move it to us, when we decide that we want such feature :P
10:25:55 <peter1138> so, subsidiaries/infrastructure sharing next eh? :)
10:26:25 <planetmaker> Let's add a branch for each "yeah, that might be nice"-feature ;)
10:26:29 <LordAro> nah, timetables
10:26:38 <peter1138> We have timetables
10:26:55 <peter1138> Hmm, where should I post my list of things which I'd like to do but haven't got around to yet.
10:27:11 <peter1138> I mostly mean things that are already in the game but could do with tweaking.
10:27:18 <peter1138> Like the mini-map window needs some love.
10:27:36 <LordAro> 1.9 Roadmap
10:27:37 <LordAro> :p
10:27:59 <peter1138> Hmm, where is it, Wiki?
10:28:18 <LordAro> i imagine it doesn't exist at all
10:28:21 <peter1138> Oh.
10:28:30 <LordAro> don't think there's been a roadmap since 1.0
10:28:56 <peter1138> Yay, found my wiki password.
10:29:12 <peter1138> Well, I can post it to my own page I guess.
10:29:21 <LordAro> there's also a todo list page
10:30:10 * andythenorth wonders how many nml coders there are
10:30:40 <LordAro> 27
10:31:04 <peter1138> https://wiki.openttd.org/Peter1138/Towngrowth_Challenge
10:31:05 <peter1138> LOL
10:31:17 <andythenorth> megalol
10:31:20 <peter1138> I wonder how much of that is implementable with NewGRF and GS these days.
10:31:31 <andythenorth> probably most
10:31:46 * andythenorth trying to figure out how to do some kind of reference.grf
10:31:58 <peter1138> This dates to 2007, when we didn't full (or any?) industry support.
10:32:14 <andythenorth> newgrf stuff, both openttd and nml kind of lacks reference cases
10:32:35 <andythenorth> means someone has to make a grf, usually a patch of their existing project
10:32:39 <peter1138> https://wiki.openttd.org/images/f/fc/UnderlayTiles.png
10:32:39 <andythenorth> then distribute in forums
10:32:49 <peter1138> Quality graphics. I should make a baseset out of it.
10:33:07 <peter1138> IIRC it was done with... Sketchup, which got Googled.
10:33:47 <peter1138> NewGardens
10:33:49 <peter1138> Hmm
10:34:00 <peter1138> I think that may have been a real-world thing, haha.
10:35:57 <planetmaker> he... I guess your TC can be done *completely* in GS and NewGRf meanwhile
10:36:28 <peter1138> It wasn't even mine, I just liked the idea at the time.
10:36:44 <peter1138> And yes, I'm sure that is implemented already.
10:36:48 <planetmaker> there are such goal servers around for years
10:36:51 <peter1138> Yeah
10:36:58 <peter1138> Probably patched servers though, you know what people are like.
10:37:10 <planetmaker> maybe
10:38:03 <planetmaker> http://openttd.btpro.nl/index.php/30-btpro-openttd-client-talk/3040-how-to-apply-patch-to-sourcode-linux <-- he... must be
10:40:09 <peter1138> Yeah.
10:41:22 <peter1138> Why bother improving the game for everyone when you can keep your own changes and be exclusive.
10:43:26 <planetmaker> the most popular one has some stuff in proper repos https://github.com/ropenttd
10:46:20 <peter1138> JGR's has a lot of nice stuff but it's almost impossible to disentangle.
10:46:50 <planetmaker> yes... though it's all in a git repo. So one could get the related changesets. But not the related fixes easily
10:49:03 <peter1138> I believe he maintains things in branches.
10:49:16 <peter1138> But with his saveload changes, it's difficult.
10:49:39 <planetmaker> yes... but I understand why he did those...
10:49:43 <planetmaker> somewhat at least
10:49:58 <peter1138> I don't mean they're bad.
10:50:07 <peter1138> Just makes things trickier to merge.
10:50:22 <peter1138> Speaking of which, I have a PR open about saveload
10:50:32 <planetmaker> yes
10:57:02 <andythenorth> saw that
11:07:41 <peter1138> Ooh my Garmin has a software update. I wonder what'll break.
11:09:06 *** sla_ro|master has quit IRC
11:09:56 <peter1138> Changes made from version 3.20 to 3.30:
11:09:56 <peter1138> Changes to support manufacturing
11:09:57 <peter1138> Hmm
11:09:59 <peter1138> Well..
11:10:07 <peter1138> Ah, I was on 3.00
11:10:10 <peter1138> Add manual elevation calibration feature
11:10:17 <peter1138> Useful, because mine has been wrong for about a year.
11:14:03 * andythenorth still watching the steel mill film
11:14:06 <andythenorth> 5 mins at a time
11:31:33 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7147: Change: Synchronize randomness in vehicle introduction… https://git.io/fhDX6
11:35:49 <peter1138> I have a patch that adds a property to synchronise introduction dates, but I think it's either backwards or not flexible enough.
11:36:15 <andythenorth> I haven't tested it, but Eddi's idea appeals
11:36:19 <peter1138> But I think that offers better control while still having randomness.
11:36:34 <andythenorth> my use case is distorted
11:36:34 <peter1138> Oh yeah game seed, so it's still random.
11:36:49 <andythenorth> I have vehicles appearing and disappearing when I reload_newgrfs
11:36:54 <andythenorth> in same savegame, PITA
11:37:45 <andythenorth> kinda want a random range prop
11:37:50 <andythenorth> signed
11:37:56 <andythenorth> or signed result :P
11:37:57 <andythenorth> hmm
11:40:35 <peter1138> How about my non-animated locks patch?
11:40:52 <peter1138> Ships stopping to go up/down instead of ... going up a water slope.
11:40:55 <andythenorth> meh
11:41:11 <andythenorth> how many ships in the lock at once?
11:41:23 <peter1138> No limit.
11:41:29 <peter1138> That's a whole other change.
11:41:36 <andythenorth> more ship nerfs? :|
11:41:40 <peter1138> Quite :/
11:41:47 <andythenorth> uphill rivers
11:42:04 <peter1138> It's not that bad, ships are already slow so it doesn't slow them that much.
11:42:11 <peter1138> Except hovercraft I guess.
11:42:33 <andythenorth> hoverzellepins
11:42:35 <peter1138> https://www.youtube.com/watch?v=sD4oOe-8Bk8
11:42:40 <andythenorth> where is Pikka ?
11:42:41 <peter1138> So 5 years ago.
11:42:44 <peter1138> Err
11:42:45 <peter1138> So56 years ago.
11:42:47 <peter1138> Err
11:42:49 <peter1138> So 6 years ago.
11:43:04 <andythenorth> it does kind of look nice eh
11:43:16 <andythenorth> that water slope though
11:43:16 <peter1138> Could be... an option?
11:43:34 <peter1138> Hmm
11:43:37 <andythenorth> newgrf locks, state machines
11:43:57 <peter1138> How about drawing some graphics... Hmm..
11:44:15 <peter1138> Hmm, no.
11:44:20 <peter1138> That means only 1 ship at a time. :/
11:44:58 <peter1138> The cheap way to do it is to put a building in front of the slope.
11:46:16 <andythenorth> :P
11:46:22 <andythenorth> nice hax
11:56:16 <Pikka> mmm hoverzellepins
12:00:54 <andythenorth> mmm river generator
12:01:01 <andythenorth> I tried to haxor it, but it broke
12:07:59 <Heiki> https://www.karjalainen.fi/uutiset/uutis-alueet/maakunta/item/208380 (news item stating that the ice road across a nearby lake has not yet been officially opened) – useless idea for OpenTTD: make water freeze every winter so that ships get stuck but road vehicles can use it :D
12:08:46 <andythenorth> I even drew sprites for that somewhere
12:09:37 <peter1138> Heiki, only in arctic, yeah? :p
12:09:51 <peter1138> ICE ROAD TRUCKERS
12:10:15 <Heiki> tropical ice road
12:10:16 <andythenorth> just make frozen lakes a thing
12:10:20 <andythenorth> and quicksand
12:10:28 <andythenorth> add a new disaster
12:10:44 <andythenorth> we don't have enough disasters
12:11:12 <peter1138> Most people turn them off?
12:11:16 <andythenorth> I do
12:11:20 <andythenorth> they're kind of lame
12:11:24 <peter1138> The UFO ones get ridiculous, the others are okay.
12:11:30 <andythenorth> maybe I turn breakdowns on again
12:11:35 <andythenorth> now they're fixed
12:11:44 <peter1138> Are they fixed?
12:12:06 <andythenorth> I haven't tested yet :D
12:12:09 <andythenorth> I hope so
12:12:55 <peter1138> Were they broken?
12:13:07 <andythenorth> RVs couldn't find depots
12:13:12 <andythenorth> pathfinder faff
12:13:19 <andythenorth> so they just broke a lot
12:13:20 <Heiki> breakdowns make things somewhat more interesting, but most disasters are plainly annoying
12:13:34 <andythenorth> reduced speed limit on ice road
12:13:46 <peter1138> Disasters are meant to keep you on your toes
12:13:58 <andythenorth> game gets quite monotonous otherwise
12:13:59 <peter1138> I wonder how AI deals with them...
12:14:06 <andythenorth> bit of micro-management is useful
12:14:13 <peter1138> Is it lunch time yet?
12:14:17 <andythenorth> ages ago
12:14:49 <andythenorth> the most excitement I get is when a train gets stuck in a PBS block
12:15:02 <andythenorth> and I build my networks all interconnected for $reasons
12:15:10 <andythenorth> so everything eventually deadlocks
12:16:54 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhDyC
12:17:30 <peter1138> Interconnected is more funner.
12:25:01 <andythenorth> groups then
12:25:03 <andythenorth> for 2.0?
12:25:12 <andythenorth> (buy menu)
12:25:13 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhDSf
12:27:04 <andythenorth> India Horse http://www.railpictures.net/photo/685798/
12:29:27 <andythenorth> eggs?
12:31:05 <planetmaker> hm... tt-f has cert issues?
12:32:09 <planetmaker> Das Zertifikat ist am 31. Januar 2019, 12:04 abgelaufen. Die aktuelle Zeit ist 31. Januar 2019, 12:31. Fehlercode: SEC_ERROR_EXPIRED_CERTIFICATE
12:32:19 <planetmaker> expired 30 minutes ago
12:33:22 <andythenorth> letsencrypt?
12:39:38 <andythenorth> when I said 'eggs' I meant mostly 'butter'
12:40:53 <orudge> planetmaker: blargh, it's meant to restart nginx, but it seems doesn't
12:41:56 <orudge> Ah, no, something else has cause an issue
12:45:18 <orudge> Should be fixed now
12:45:33 <planetmaker> yay :)
12:47:07 *** Pikka has quit IRC
13:12:36 *** Samu has joined #openttd
13:22:36 *** gelignite has joined #openttd
13:27:40 <peter1138> Hmm, so if a road/tram type has an introduction date set, should it always be available, regardless of, say, any trams being available in the game?
13:28:52 <andythenorth> can never remember that
13:29:24 <andythenorth> any answer I give is pulled out of my ass and probably wrong :P
13:29:28 <peter1138> :D
13:29:38 <andythenorth> spec seems to know https://newgrf-specs.tt-wiki.net/wiki/Action0/Railtypes#Vehicle_and_Railtype_availability
13:29:42 <peter1138> I guess the question is will any become available.
13:29:58 * andythenorth sometimes wonders if railtypes was all wrong :P
13:30:01 <andythenorth> railwrongs
13:30:29 <peter1138> A railtype is introduced, if at least one of the following conditions is met:
13:30:34 <andythenorth> that
13:30:36 <peter1138> The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.
13:30:54 <peter1138> So according to that, the answer is yes.
13:31:01 <andythenorth> I am going to move the railtypes I need into Horse grf, and hope it all goes away :P
13:31:11 <andythenorth> bad behaviour
13:31:13 <peter1138> Don't be silly.
13:31:20 <peter1138> What problem do you have that you can't solve?
13:31:25 <andythenorth> none :)
13:31:31 <andythenorth> railtypes totally work for my case
13:31:34 <peter1138> Good.
13:31:39 <peter1138> I'm talking about road/tram types, here.
13:32:03 <peter1138> It's way more likely there are no trams available because there are no default trams.
13:32:07 <andythenorth> isn't it
13:32:13 <andythenorth> will we ever fix that?
13:32:26 <peter1138> It's not a bug, so no.
13:32:26 <andythenorth> 2.0
13:32:52 <andythenorth> just make copies of the default buses that run on non-electrified tram tracks
13:32:59 <andythenorth> beep beep
13:33:28 <andythenorth> did it snow yet?
13:33:59 <peter1138> Not even then.
13:33:59 <peter1138> Nearly lunch time.
13:34:10 <andythenorth> clearly
13:35:03 <andythenorth> also this enterprise software won't make itself
13:35:04 <peter1138> Not yet.
13:35:11 <peter1138> No, no copies of default buses.
13:35:31 <andythenorth> players will just have to use terrible grfs
13:35:54 <andythenorth> or even good ones
13:36:04 <peter1138> Think of the mess it would cause loading old savegames.
13:36:31 <peter1138> You can't change NewGRFs mid game because it causes issues.
13:36:39 <peter1138> Btw lol we added some vehicles lols
13:36:54 <peter1138> I'm going to eat my salad early.
13:37:11 <andythenorth> now I am hungry :P
13:41:04 <peter1138> Hmm, it's no good, there's no protein in it.
13:44:01 <peter1138> Oh, I forgot chutney :/
13:48:46 <peter1138> Maybe we should special case it to if there are no trams then no tramtypes will become available.
13:49:01 <peter1138> Or possibly no compatible trams
13:49:02 <andythenorth> well we could
13:49:16 <andythenorth> do we still provide tramtypes by default?
13:49:30 <peter1138> only the 1, and only if trams are loaded
13:49:46 <peter1138> it's only when introduction date is used that an issue occurs
14:05:10 *** Flygon has quit IRC
14:09:32 *** snail_UES_ has joined #openttd
14:22:32 <Samu> while (bla) {
14:22:33 <Samu> or
14:22:37 <Samu> while(bla) {
14:23:32 <planetmaker> haha, andythenorth :) railtype != cargo. You're absolutely right :)
14:24:05 <andythenorth> we are ahead for once :)
14:24:08 <Samu> why is it some times with a space, and some other times without?
14:25:17 <peter1138> Samu, without for function calls, with for C/C++ keywords.
14:25:52 <peter1138> You shouldn't find a while( in our code, but it's not impossible.
14:28:11 <Samu> weird rules
14:28:28 *** snail_UES_ has quit IRC
14:29:11 <peter1138> Sensible rules.
14:32:51 <Samu> gonna PR something soon
14:32:57 <Samu> watch out
14:34:59 <peter1138> If it's a fix for a "while(" ... :D
14:35:28 <peter1138> Squirrel's code uses while(, but we can ignore that.
14:41:54 <andythenorth> lunch
14:44:33 <peter1138> Again.
14:44:42 <peter1138> Late for you?
14:47:22 <planetmaker> "while (bla) {" is our chosen style while "while(bla) {" is either an oversight or - as peter says - in imported the squirrel part.
14:54:20 <andythenorth> anyone approved the livery UI yet? o_O
14:54:48 <andythenorth> https://github.com/OpenTTD/OpenTTD/pull/7108
14:55:05 <andythenorth> review is all well and good, but at some point stuff needs to go to nightlies
14:55:12 <andythenorth> players find stuff
14:56:13 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements. https://git.io/fhyeV
14:56:35 <planetmaker> meh... always I find the comment button but not the review buttn :|
14:56:39 <andythenorth> me too :D
14:56:55 <andythenorth> github quirks
14:57:01 <peter1138> You need to view changed files.
14:57:11 <peter1138> "Files changed"
14:57:20 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker approved pull request #7108: Feature: Group liveries, and livery window usability enhancements. https://git.io/fhyeP
14:57:46 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker merged pull request #7108: Feature: Group liveries, and livery window usability enhancements. https://git.io/fhK9F
14:58:12 <planetmaker> incredible... I need to look at code to review it :D
14:58:48 <peter1138> It's nice to have every bug ironed out, but realistically it needs some players to come along and actually use stuff to find many corner cases.
14:59:09 <andythenorth> +1
14:59:11 <planetmaker> +1
14:59:30 <andythenorth> do we cut the release manually by picking selected commits still?
14:59:39 <andythenorth> or do we just tag master?
14:59:40 <planetmaker> there's also no shame really in additional fix-up commits like with the autoreplace for more cargoes
14:59:58 <planetmaker> that's a question for TB @ andy
15:00:12 <andythenorth> used to be we picked commits?
15:00:26 <andythenorth> at work we tag master, so merging broken to master is very very NO
15:00:55 <planetmaker> it used to be: we branch-off from dev. Do some commits which set the branch (or rather also update trunk to be the next major version)
15:01:18 <planetmaker> and then tag from the newly-created (or existing) release branch
15:01:37 <planetmaker> before tagging the changelog etc were updated
15:01:59 <planetmaker> in the release branch. Which subsequently got merged-back into master
15:02:31 <Eddi|zuHause> <andythenorth> I have vehicles appearing and disappearing when I reload_newgrfs <- that should be gone with my change
15:02:33 <peter1138> andythenorth, broken master vs small bug that rarely happens is kinda different.
15:02:46 <peter1138> Eddi|zuHause, that's why he mentioned it.
15:03:12 <planetmaker> my suggestion is to basically keep this procedure to create release-branches and tag from there the actual releases
15:03:57 <andythenorth> no need for more change at the moment
15:04:02 <andythenorth> plenty of change to handle
15:04:16 <planetmaker> what would be the alternatives and what would/could one gain?
15:04:41 <planetmaker> an alternative is to basically not make any minor versions anymore and just regularily tag master for a release
15:04:49 <andythenorth> that basically
15:04:57 <andythenorth> whatever's in master is what ships
15:05:08 <andythenorth> it's not clearly better
15:05:13 <peter1138> Is my saveload enum change ever a big no-no or viable?
15:05:30 <peter1138> If it's viable, would be nice to have it before we merge many more savegame bumps.
15:05:36 <planetmaker> it basically can be done with the branch and tag mechanism, too. No-one says how many bug-fix and beta and rc tags we need to make
15:06:05 <planetmaker> peter1138, from what I read through the patch yesterday: I like it.
15:06:16 <planetmaker> makes maintaining versions for new patches much easier
15:06:22 <Eddi|zuHause> i'd suggest merging it sooner rather than later
15:06:31 <planetmaker> and removes magic (saveload revision) numbers
15:07:39 <planetmaker> I actually wonder whether beyond that we should adopt more of the savegame version stuff from jgr (in a 2nd optional step)
15:08:19 <Samu> this is called every tick, wondering if the code could be improved https://paste.openttdcoop.org/pnhvryzz0
15:08:43 <Eddi|zuHause> i haven't looked at how JGR did things, but keeping saveload compatibility between patchpack versions always was a tricky subject
15:09:05 <Eddi|zuHause> ... while also continuing to support loading trunk games
15:09:17 <Samu> the maybestartnewcompany could fail, right? hmm
15:10:01 <planetmaker> Eddi|zuHause, he seems to have found a solution for exactly that
15:10:38 <peter1138> planetmaker, yeah, that's the thing, but it's a major step further.
15:10:45 <planetmaker> from what I understand he introduced a chunk for loading PP data not found in trunk - so not dirtying the trunk chunks with PP variables
15:11:09 <peter1138> planetmaker, problem is it touches pretty much all of the saveload code again.
15:11:12 <planetmaker> absolutely, peter. A big step further. And not an alternative to your change. Just something beyond it
15:11:43 <Samu> maybestartnewcompany could return true or false
15:11:51 <Samu> for better control
15:12:03 <planetmaker> it's a one-time change... is that really a problem to touch that code and replacing magic numbers with enum entries?
15:12:04 <peter1138> If I rebase nrt now, I'll have to do the saveload changes twice, that's all :)
15:13:01 <planetmaker> all future patches which change / add saveload settings will profit when being merged
15:13:47 <peter1138> planetmaker, there is the difference that the "to" variable is not exclusive (so you say which revision removes this entry, rather than the last revision that contains it)
15:13:55 <peter1138> Everything else is pretty much search & replace.
15:15:00 <peter1138> is not -> is now
15:15:08 <peter1138> big difference heh
15:16:07 <peter1138> The only use we had for it being inclusive is you could remove stuff from future savegames but not "waste" a bump.
15:16:34 <peter1138> But I think that is pretty rare and probably a bad thing to do.
15:16:43 <planetmaker> well. We might waste about a handful of saveload revisions. Nothing I'm scared about.
15:16:47 <peter1138> I think we'll probably have made changes before we get to 65535 revisions.
15:17:24 <peter1138> Also, I'd just like to see SLV_ROADTYPES ;)
15:17:55 <planetmaker> at the current rate we have another 600 years of saveload revisions ;)
15:18:50 <planetmaker> 6000
15:19:01 <peter1138> We actually had a few years of no bumps, or rather only bumping for a release.
15:19:15 <peter1138> We've had quite a few bumps in the past few months, however.
15:19:23 <planetmaker> if we're 10x as wasteful now, it's 600 years. Enough for me at least ;)
15:19:47 <planetmaker> our children can fix-up the saveload mess we might create
15:19:57 <peter1138> :D
15:20:45 <peter1138> So it turns out my exception handling stuff I was working on wasn't working because... I... er... hadn't wrapped my method with it.
15:21:00 <peter1138> Now I need to figure out if that was deliberate or an oversight.
15:25:42 <Samu> https://paste.openttdcoop.org/pyhn8n1nz turned maybestartnewcompany into a bool
15:26:37 <Samu> it was a void
15:27:42 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7147: Change: Synchronize randomness in vehicle introduction… https://git.io/fhyfF
15:30:56 <Eddi|zuHause> <planetmaker> Eddi|zuHause, he seems to have found a solution for exactly that <-- like i said, i haven't looked at JGR's approach, but older patchpacks usually did that by using trunk saveload revision + X as kind of a "buffer", and then dropped loading of significantly older patchpack saves as trunk moved into this buffer
15:31:00 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker requested changes for pull request #7068: Add: smart town name first steps - #7037 https://git.io/fhyJc
15:31:13 <Eddi|zuHause> i kinda always wanted to use the "minor savegame version" instead
15:31:40 <Eddi|zuHause> which is some leftover thing from ancient times, but has been always 0 in trunk for most of the time
15:33:27 <Eddi|zuHause> just the usual response to that was "DON'T TOUCH THAT"
15:33:50 <andythenorth> bonfire
15:36:09 <peter1138> Minor doesn't really help though.
15:36:40 <peter1138> Maybe I should look at JGR's saveload changes again. It might be more feasible now, IIRC it required some C++ features.
15:36:41 *** Arveen has joined #openttd
15:37:19 <planetmaker> nothing > c++11
15:37:33 <planetmaker> that's his explicit compiler setting
15:38:21 <peter1138> Yes, we didn't require it back when I last looked :)
15:40:08 <peter1138> Hmm, problem is his saveload stuff has merges with our master.
15:40:44 <peter1138> Usual problem :(
15:40:46 *** synchris has joined #openttd
15:42:18 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyUY
15:42:31 <Samu> tada!
15:42:44 <Samu> review asap
15:43:00 <peter1138> git log --author "j.g.r" is kinda useful, though.
15:45:39 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyUX
15:45:56 *** nielsm has joined #openttd
15:49:16 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyTU
15:52:53 <Samu> I need a way to make sure the parameter start_date really belongs to an AI and not to a GS
15:52:59 <Samu> how would I do that?
15:53:20 <Samu> (without touching everything)
15:54:18 *** supermop_work has joined #openttd
15:54:40 <supermop_work> yo
15:54:45 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyTr
15:55:17 <peter1138> I thought GS didn't have start_date as a parameter?
15:55:38 *** supermop_work_ has joined #openttd
15:56:15 <Samu> they can have it
15:56:22 <Samu> i tried yesterday with glx
15:56:36 <peter1138> Also, does C++ allow runtime checking of types? I can't remember, I'm used to C# :D
15:56:47 <peter1138> Cos you use AIConfig for AIs, and GameConfig for GS
15:56:56 <peter1138> You could at least initialise is_ai based on that.
15:57:01 <peter1138> Or
15:57:14 <peter1138> Have a virtual method in each that returns true/false depending.
15:57:29 <peter1138> Similar to how our drivers return static values.
15:57:32 <milek7> https://en.cppreference.com/w/cpp/language/typeid
15:57:35 <peter1138> if this->is_ai
15:57:44 <peter1138> Then it would not need passing around everywhere
15:59:00 <peter1138> milek7, Hmm, not clear how to do "typeid(x) is AIConfig"
15:59:44 <peter1138> Seems the examples only compare one instance to another, rather than just a type.
15:59:57 <milek7> maybe typeid(x) == typeid(AIConfig)
16:02:09 <Samu> a GS author can create a start_date parameter with description = ""
16:02:30 <Samu> openttd picks it up
16:02:35 <peter1138> if (typeid(this) == typeid(AIConfig *))
16:02:35 <peter1138> Ooh.
16:02:41 *** supermop_work has quit IRC
16:03:00 <peter1138> So you could drop ALL the is_ai crap and use that condition.
16:03:05 <peter1138> #include <typeinfo>
16:03:26 <peter1138> If that's a no-go, then using virtual overrides is a nicer solution.
16:03:41 <peter1138> is_ai is just cruft that, especially passing it around everywhere.
16:04:30 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhykr
16:05:18 *** glx has joined #openttd
16:05:18 *** ChanServ sets mode: +v glx
16:06:13 *** sla_ro|master has joined #openttd
16:07:53 <Samu> identifier AIConfig is undefined :|
16:08:02 <Samu> typeid(this) == typeid(AIConfig *)
16:08:27 <peter1138> Huh.
16:08:29 <Samu> gonna try building
16:08:35 <Samu> see if it's just intellisense being dumb
16:10:19 <Samu> well, it built
16:10:28 <Samu> let's see what the breakdown do in that part
16:10:52 <peter1138> Patch should be a lot smaller with that :-)
16:11:03 <peter1138> If it works.
16:11:45 <Samu> ‡ type_info::operator== returned false bool
16:11:49 <Samu> boo
16:12:53 <glx> dunno if it's been already said, but start_date exists only for AI and it's auto added to the settings list by openttd
16:14:49 <Samu> ‡ __std_type_info_compare returned 1 int
16:14:55 <Samu> returned 1
16:15:03 <Samu> 1 == 0 is false
16:15:06 <Samu> returns false
16:15:07 <Samu> why
16:15:21 <peter1138> Can you output typeid(this).name and typeid(AIConfig *).name
16:15:30 <milek7> just guessing, but maybe typeid(*this) == typeid(AIConfig)
16:15:31 <peter1138> maybe typeid(this) returns ScriptConfig *
16:15:48 <peter1138> milek7, maybe!
16:16:00 <Samu> let' seee
16:16:37 <peter1138> milek7, very good point.
16:17:14 <peter1138> Also try "typeid(this) == typeid(AIConfig)" but you'd need to include headers for aiconfig then.
16:17:32 <peter1138> Probably no problem.
16:17:57 <glx> including headers of the derived class in the base class ?
16:18:11 <peter1138> I know :/
16:18:28 <Samu> typeid(*this) == typeid(AIConfig) - error C2027: use of undefined type 'AIConfig'
16:18:33 <glx> maybe just a minimal forward declaration of the derived class
16:18:34 <Samu> doesnt build
16:18:38 <peter1138> "but you'd need to include headers for aiconfig then."
16:18:52 <Samu> where is
16:19:00 <Samu> hmm wait
16:19:02 <peter1138> glx, hmm. It's not a pointer though, so I don't think so.
16:20:11 <Samu> ah, included it
16:20:14 <Samu> it builds now, let's see
16:20:18 <peter1138> this->SetSetting((*it).name, is_ai && StrEmpty((*it).description) && strcmp((*it).name, "start_date") ? r : (value != 0) ? max(1, r) : 0);
16:20:28 <peter1138> You know
16:20:31 <peter1138> Come to think of it
16:20:36 <peter1138> That whole line is pretty horrible :p
16:21:03 <peter1138> Why can't it be 0 there?
16:21:30 <andythenorth> planetmaker: fancy cleaning up forum stickies a little bit? o_O
16:21:38 <Samu> yees!!! it works
16:21:40 <Samu> returned 0
16:21:44 <Samu> 0 == 0 is true
16:21:48 <Samu> thx
16:22:27 <Samu> i want random deviation to occur for dates 1-3600
16:22:32 <Samu> but not for 0
16:23:03 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyLs
16:23:14 <peter1138> Samu, yes, but that's not what this particular line is handling.
16:23:50 <peter1138> Bah, I misread the old line :p
16:23:58 <peter1138> So it always sets a random start date.
16:24:47 <peter1138> if random_deviation is 0 it won't do the setting.
16:24:55 <peter1138> if start_date is 0 is random_deviation not 0?
16:26:21 <glx> by default it's 60 for start_date, but it should be possible to change that before setting the start_date
16:26:28 <Samu> gonna make it clearer to read
16:27:08 <andythenorth> hmm
16:27:30 <glx> this->ClearConfigList(); <-- this line will reset all start_date elements but keep the start_date value
16:27:37 <andythenorth> manually set buy + run costs for 286 trains?
16:27:47 <peter1138> andythenorth, yes, that's normal.
16:27:51 <andythenorth> or continue using an algorithm which doesn't give results I want :P
16:27:55 <andythenorth> very labour saving
16:27:58 <andythenorth> but wrong
16:28:07 <peter1138> andythenorth, add some random_deviation
16:28:16 <andythenorth> on compile?
16:28:22 <andythenorth> every release is slightly different?
16:29:02 <peter1138> :D
16:29:14 <Samu> strcmp((*it).name, "start_date") this is the confusing function
16:29:21 <peter1138> Use action 6 to set it based on game seed!
16:29:30 <peter1138> strcmp is not confusing
16:29:35 <Samu> returns 0 when it's start_date
16:29:37 <peter1138> yes
16:29:42 <peter1138> That's what strcmp does.
16:30:22 <peter1138> The strcmp() function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
16:30:56 <glx> strcmp("a", "b") returns -1
16:31:13 <glx> strcmp("b", "a") returns 1
16:31:22 <glx> very simple to understand
16:31:31 <Samu> if (typeid(*this) == typeid(AIConfig) && StrEmpty((*it).description) && strcmp((*it).name, "start_date")) {
16:31:50 <glx> missing !
16:31:50 <Samu> if is ai config, description is empty and not a start_date
16:31:58 <Samu> use r
16:32:02 <glx> ah right then
16:32:39 <andythenorth> oof BBL
16:32:40 *** andythenorth has left #openttd
16:32:42 <planetmaker> andythenorth, later tonight maybe
16:33:03 <glx> but just checking for "start_date" should be enough, as only AIs have "start_date"
16:33:09 <Samu> i think it's correct the way I have, but very confusing
16:33:19 <Samu> because of that strcmp
16:33:32 *** Jortuny has joined #openttd
16:34:14 *** strawbs89 has joined #openttd
16:35:18 <peter1138> glx, indeed.
16:35:38 <Samu> maybe strcmp((*it).name, "start_date") != 0 would be less confusing?
16:36:01 <peter1138> (value != 0) ? max(1, r) : 0)
16:36:03 <peter1138> Hmm
16:36:03 <strawbs89> hi all i have a problem, i am trying to build a tourist centre in my game but it keeps tellin me to build on sloped land and build in forest now i am building in forest and i am building trying to build it on sloped land but it still wont work
16:36:15 <peter1138> I see.
16:36:26 <planetmaker> why... do AIs need to start at day 0 instead of 1? Just to piss-off the player? :P
16:36:42 <Samu> to make them all compete fairly
16:36:43 <peter1138> planetmaker, day 0 is a special case
16:36:50 <planetmaker> for...?
16:36:56 <Samu> ai competitions
16:36:58 <peter1138> planetmaker, makes it start with no randomization added
16:37:04 <peter1138> I can understand that
16:37:04 <glx> strawbs89: ECS industries require very specific lands, there's a wiki showing that somewhere
16:37:31 <strawbs89> oh brill glx could you link me please
16:38:24 *** ChanServ sets mode: +v DorpsGek
16:38:24 *** ChanServ sets mode: +v planetmaker
16:38:24 *** ChanServ sets mode: +v orudge
16:38:53 <glx> https://www.tt-wiki.net/wiki/ECS_Town_Vector._Tourists_centre
16:38:59 <planetmaker> is there any randomness with AI dates? I thought that was only with vehicle introduction dates
16:39:09 <strawbs89> oh ta fella thats great
16:40:29 <glx> start_date + (rand(60 * 2) - 60)
16:41:04 <Samu> https://paste.openttdcoop.org/p6opfmlwu
16:41:06 <Samu> got this atm
16:43:24 <Samu> oh, right, gotta remove the is_ai from everywhere now
16:46:36 *** sla_ro|master has quit IRC
16:46:36 *** tokai|noir has quit IRC
16:46:36 *** Heiki has quit IRC
16:46:36 *** TinoDidriksen has quit IRC
16:46:36 *** Speedy` has quit IRC
16:46:36 *** OsteHovel has quit IRC
16:46:36 *** Markk has quit IRC
16:46:36 *** zuzak has quit IRC
16:46:36 *** Exec has quit IRC
16:46:36 *** tyteen4a03 has quit IRC
16:46:36 *** Osai has quit IRC
16:46:36 *** Hirundo has quit IRC
16:46:36 *** Sheogorath has quit IRC
16:46:36 *** eirc has quit IRC
16:46:36 *** tneo has quit IRC
16:46:36 *** avdg has quit IRC
16:46:36 *** michi_cc has quit IRC
16:46:36 *** Terkhen has quit IRC
16:46:36 *** TrueBrain has quit IRC
16:46:36 *** XeryusTC has quit IRC
16:46:36 *** Webster has quit IRC
16:46:36 *** ^Spike^ has quit IRC
16:46:36 *** Hazzard has quit IRC
16:48:36 <strawbs89> ok so i'v read the wiki how do i get those land signs that i gotta place
16:48:59 <glx> buy land
16:49:26 <glx> but it's not really mandatory
16:49:27 <strawbs89> what, in game its self or build scenrio
16:49:53 <planetmaker> you don't need to buy the land. It just needs to be shaped exactly like shown
16:50:04 <planetmaker> It's just means to illustrate the footprint of the castle
16:50:25 <strawbs89> no no i'm gonna do the casino tourist centre as shown on the wiki
16:50:38 <planetmaker> then... replace castle by casino.
16:50:42 <planetmaker> doesn't change the answer
16:51:16 <glx> Samu: can't you just check if name is "start_date" and current value is 0 and not add random in this case ?
16:51:44 *** sla_ro|master has joined #openttd
16:51:44 *** tokai|noir has joined #openttd
16:51:44 *** Heiki has joined #openttd
16:51:44 *** TinoDidriksen has joined #openttd
16:51:44 *** Speedy` has joined #openttd
16:51:44 *** OsteHovel has joined #openttd
16:51:44 *** avdg has joined #openttd
16:51:44 *** eirc has joined #openttd
16:51:44 *** michi_cc has joined #openttd
16:51:44 *** Hazzard has joined #openttd
16:51:44 *** tneo has joined #openttd
16:51:44 *** TrueBrain has joined #openttd
16:51:44 *** Webster has joined #openttd
16:51:44 *** Sheogorath has joined #openttd
16:51:44 *** XeryusTC has joined #openttd
16:51:44 *** Osai has joined #openttd
16:51:44 *** Terkhen has joined #openttd
16:51:44 *** coulomb.oftc.net sets mode: +vvov tokai|noir michi_cc Terkhen Terkhen
16:51:44 *** ^Spike^ has joined #openttd
16:51:44 *** Hirundo has joined #openttd
16:51:44 *** Markk has joined #openttd
16:51:44 *** zuzak has joined #openttd
16:51:44 *** Exec has joined #openttd
16:51:44 *** tyteen4a03 has joined #openttd
16:52:22 *** WWacko1976-work has quit IRC
16:53:49 <peter1138> He's worried that a game script might use a setting called "start_date"
16:54:01 <glx> but that can't happen
16:54:04 <peter1138> ^
16:54:23 <glx> at worse we can prevent it in AddSettings
16:54:24 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7114: NPF bails out when source tile is also a destination tile https://git.io/fhymP
16:54:41 <glx> even AI should not create this setting themselves
16:54:43 <planetmaker> and... would it matter? A GS wanting to start an AI is a totally legit action, is it?
16:55:04 <planetmaker> but it just needs to call like 'start_ai' and then it starts. No questions asked
16:55:08 <Samu> im not sure GS's can start companies themselves
16:56:12 <Samu> doesn't seem like they can, but i'm not too familiar with GS'es
16:56:58 <Samu> their api
16:58:05 <planetmaker> indeed I don't see that in the API description. Sad :)
16:59:39 <glx> seems it cannot remove company either ;)
16:59:46 <peter1138> Well, we don't need GS improvements, we just need to allow AIs to cheat!
16:59:54 <planetmaker> also sad
17:00:10 <Samu> hehe
17:00:18 <planetmaker> I wonder whether you're serious or not, peter :)
17:00:29 <Samu> /* allow multiple AIs to possibly start in the same tick */
17:00:29 <Samu> } while (AI::GetStartNextTime() == 0);
17:00:34 <Samu> good enough comment?
17:00:37 <peter1138> planetmaker, we had an argument here a couple of days ago where someone wanted to allow the AI to cheat.
17:00:47 <peter1138> "because players can"
17:00:53 <planetmaker> he
17:01:07 <planetmaker> well... Add a AI-cheat gamescript :)
17:01:19 <planetmaker> the GS can cheat money to the AI and so on
17:01:31 <peter1138> The other argument was GS was useless because you can only have 1 of them
17:01:52 <planetmaker> well... I am still not sure I actually like the "only one GS" approach
17:02:01 <planetmaker> I can see benefit in both answers
17:02:12 <peter1138> Yes, same.
17:02:44 <peter1138> So it was a guy wanting to let AIs cheat, fighting against us saying "improve GS instead"
17:02:58 <peter1138> fun :D
17:03:04 <planetmaker> sounds fun
17:04:03 <planetmaker> but really... a GS should be able to invoke an AI company. And to delete one either at its own discretion
17:04:05 <glx> and it's possible to have more than 1 GS anyway, just merge them
17:04:14 <planetmaker> Scenarious would definitely profit from such functionality
17:04:42 <Samu> adding comments is not my specialty :|
17:04:53 <planetmaker> glx, yes... but "just merge them" is easier said than done and makes composition of nice stuff like with newgrfs impossible
17:04:55 <Samu> ok, gonna submit again
17:05:31 <Samu> must rebase -i and fixup
17:05:40 <Samu> grr
17:06:00 *** Wormnest has joined #openttd
17:06:22 <planetmaker> e.g. with NewGRFs I choose my favourite station, vehicle and industry and objects newgrfs - and combine them modularily
17:07:10 <planetmaker> with GS I cannot choose a citybuilder GS and combine that with a "random disasters" GS
17:07:23 <Samu> the currently selected base graphics set is missing 4 sprites? what?
17:08:40 <glx> group liveries in master Samu
17:09:44 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyUY
17:10:17 <Samu> changed the order of that check, hope i didn't break it lol
17:10:44 <Samu> i probably broke it
17:10:57 <Samu> will check later
17:10:59 <strawbs89> rite one more question, which ECS Town Vector Does This Tourist info work with cos i keep getting an error about the ecs town vector
17:11:36 <planetmaker> strawbs89, depends probably on what that error is. My crystal ball is sadly broken for decades
17:13:33 <strawbs89> this is what im getting fatal newgrf error
17:14:06 <planetmaker> then obviously that NewGRF doesn't work
17:14:20 <strawbs89> ok which one does
17:14:31 <planetmaker> and it will probably tell you which and why it does
17:15:06 <planetmaker> like the screenshot you posted in forums tells exactly the URL in the error - which is where to look to explain the message
17:15:35 <strawbs89> i typed that url in and its giving me an error for that page
17:17:53 <planetmaker> Indeed. You should tell the author of that NewGRF.
17:18:59 <strawbs89> see https://bundles.openttdcoop.org/firs/releases/readme.txt 404 not found
17:20:15 <glx> is mixing FIRS and ECS supported ?
17:20:29 <planetmaker> not at all
17:20:59 <planetmaker> if you simply removed the mutual exclusion checks, the industries and cargoes would simply explode
17:21:43 <strawbs89> but when you goto the online content downloader theres two town vectors
17:22:04 <glx> https://bundles.openttdcoop.org/firs/releases/LATEST/readme.txt <-- try this one
17:22:50 <planetmaker> https://bundles.openttdcoop.org/firs/releases/LATEST/docs is the better URL
17:22:58 <glx> indeed
17:23:25 <glx> and https://bundles.openttdcoop.org/firs/releases/LATEST/docs/html/code_reference.html#incompatible-grfs
17:23:27 <planetmaker> I know no or very few NewGRF which has a nicer documentation. Maybe ECS has similar
17:23:41 <planetmaker> but not auto-generated from source :P
17:25:13 <glx> so I guesse ECS Town is disabled by FIRS
17:25:27 <planetmaker> it probably disables itself
17:25:39 <planetmaker> or FIRS disables itself. Whatever gets the first try
17:25:57 <glx> anyway it's not really an error
17:26:04 <glx> works as intended
17:26:07 <planetmaker> but... the first answer in forums was already "do not use both NewGRF"
17:32:02 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhysi
17:38:04 <peter1138> Yeah as glx says, I'm sure it could be a lot simpler
17:38:11 <peter1138> No need to do any of the typeid checking.
17:38:47 <peter1138> And also thinking about it, I think that's a bad idea anyway. I prefer to see virtual overrides, like we already use.
17:40:30 <glx> indeed, like it's done for AIConfig::GetSetting(const char *name)
17:40:59 <glx> there it does special treatment for start_date
17:42:01 <glx> something like get value of start_date, call default randomise, set start_date to 0 if it was 0 before the call
17:42:40 <glx> clean and easy
17:42:49 <Samu> back
17:43:13 <Samu> got this atm https://paste.openttdcoop.org/pqyqwtopp
17:43:17 <Samu> horizontal coding
17:43:57 <planetmaker> you really like long and complex conditions
17:45:15 <Samu> becomes shorter, less repetitive :(
17:45:35 <planetmaker> but read what was said here above
17:45:38 <Samu> this->GetSetting((*it).name) still repeats
17:46:06 <Samu> what's a virtual override?
17:47:29 <glx> check ScriptConfig::GetSetting(), ScriptConfig::SetSetting(), AIIConfig::GetSetting() and AIConfig::SetSetting()
17:49:01 <glx> you can do something similar for AddRandomDeviation()
17:51:13 <glx> I even wrote the algo 2 lines before your "back"
17:52:36 <Samu> what about game_script.cpp? it doesn't have these
17:52:45 <glx> doesn't need it
17:53:12 <glx> GameConfig just use ScriptConfig
17:53:44 <glx> it's the magic of objects :)
17:54:18 <Samu> too magic i can't even see what happens
17:56:04 <glx> when you call a virtual function on a object it first checks if the object defines the function, if not it checks the parent, if not it checks the parent of parent, .... once found it execute the function
17:57:33 <glx> and if you can still call the parent function from the child function if needed
17:58:01 <glx> like it's done in GetSetting() and SetSetting()
17:58:29 <Samu> hmm let's see
17:58:44 <Samu> /* virtual */ void AddRandomDeviation();
17:58:51 <Samu> virtual is just the comment
17:59:19 <glx> in ai_config.cpp yes, it's just a reminder
17:59:43 <glx> but the base class must have the virtual keyword
18:02:44 <Samu> where is the virtual keyword?
18:04:01 <Samu> ah found it
18:04:10 <Samu> in script_config.hpp
18:04:23 <strawbs89> ok i don't know if this can be done but when i load my game i goto newgrf settings and it comes up as custom how can i change this to my name
18:04:34 <Samu> virtual void AddRandomDeviation();, like this
18:04:58 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhynV
18:06:08 <Samu> error C3861: 'InteractiveRandomRange': identifier not found
18:06:11 <Samu> orly?
18:06:34 <Samu> in ai_config.cpp it doesn't find
18:06:41 <glx> you don't need it there anyway
18:06:53 <Samu> how come?
18:07:17 <glx> get start_date value, call parent AddRandomDeviation(), set start_date to 0 if it was 0
18:07:51 <Samu> ah
18:08:05 <Samu> ah, i need to call the origial one yet?
18:08:08 <Samu> hmm ok
18:08:09 <glx> parent AddRandomDeviation() will change start_date but you don't really care
18:08:34 <Samu> i thought i would set it up right here
18:08:37 <glx> of course you need to call it, there are other settings than start_date
18:08:46 <Samu> ah, i see
18:10:02 *** keoz has joined #openttd
18:12:31 <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhycG
18:18:00 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhycd
18:20:51 *** Tirili has joined #openttd
18:21:27 <planetmaker> "The commit history should as far as possible contain logical changes, rather than read as a developer diary." <-- nicely worded
18:25:15 <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyCr
18:27:47 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyCd
18:33:17 <Samu> can't do this ScriptConfigItemList::const_iterator it = NULL;
18:33:35 <Samu> can't set it to NULL, then what is the default value?
18:33:42 <glx> where do you need that ?
18:34:17 <Samu> https://paste.openttdcoop.org/phnzkfdkd
18:34:40 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyWg
18:34:43 <glx> you are again overthinking
18:34:50 <glx> check AIConfig::ClearConfigList()
18:35:26 <glx> you just need something like that, with an extra ==0 test before the end Set call
18:35:35 <Samu> ah
18:35:58 <Samu> easier than expected
18:36:42 <glx> you get the value, random change it, you fix it if needef
18:36:49 <glx> *needed
18:37:10 <glx> can't be easier than that
18:41:38 <Samu> it is assuming start_date parameter already exists
18:41:48 <glx> it does
18:41:53 <glx> all AIs have it
18:42:04 <glx> it's an internal settings auto added
18:42:06 <Samu> i've had troubles dealing with that
18:42:15 <Samu> sometimes it doesn't exist
18:42:30 <Samu> it has to be added
18:42:35 <Samu> let's see what happens
18:42:47 <nielsm> then those "sometimes" have to be quantified, when it that actually?
18:42:58 <nielsm> try assuming it exists and just add an assert that fails if it doesn't
18:43:09 <nielsm> if that assert triggers, then it's time to investigate why
18:43:17 *** Progman has joined #openttd
18:43:30 <glx> only time it doesn't exist means there's no script info, and that's handled by GetSetting
18:43:35 <Samu> for my ai gui big patch, i had many situations where it didn't yet exist
18:44:09 <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyll
18:44:43 <Samu> for example, let me find...
18:45:11 <glx> but the GUI works mainly with ScriptConfig, not AIConfig
18:45:40 <glx> you need to cast for it to properly handle start_date
18:45:50 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7084/files#diff-49067317702b87dfb7eb548654b76f8aR117
18:45:56 <Samu> here, when AI is stopped
18:46:13 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyl2
18:46:25 <Samu> the config slot won't have start_date yet, unless i do that Change(NULL) right there
18:46:58 <glx> not a problem
18:46:59 <Samu> an AI that is a random AI
18:47:08 <Samu> the others are fine
18:47:23 <glx> as said AIConfig::GetSetting handle that
18:48:21 <Samu> well, on master the window is closed
18:49:29 <Samu> i guess it won't get into a crash
18:49:33 <glx> and as said GUI works with ScriptConfig, you need to cast to AIConfig if you want special start_date handling
18:52:26 *** HerzogDeXtEr has joined #openttd
18:53:16 <Samu> ah, there's an assert in GetSettings
18:53:43 <glx> yes only valid setting when no info is start_date
18:53:53 <Samu> ok, it was exactly that damn assert where i was having crashes
18:54:17 <glx> because you tried to get a different setting
18:54:33 <glx> start_date is not a problem, it works
18:54:37 <Samu> no, because it was not existing yet
18:54:49 <Samu> Change(NULL) creates it
18:55:05 <glx> you fail to understand the code
18:55:32 <glx> assert(strcmp("start_date", name) == 0); <-- that means if name is not "start_date" then crash
18:55:34 <Samu> well, i dunno, change(null) solved it
18:56:09 <glx> start_date was not the problem
18:56:40 <glx> and Change(NULL) doesn't create start_date at all
18:57:00 <Samu> it does, i am sure it does
18:57:02 <glx> if removes the info
18:57:23 <glx> I'm quite sure it doesn't add any setting
18:58:21 <glx> NULL name means NULL info, NULL info means no settings
18:58:34 <Samu> NULL is the name
18:58:48 <glx> just follow the code in Change()
18:59:04 <Samu> void ScriptConfig::Change(const char *name, int version, bool force_exact_match, bool is_random)
18:59:31 <Samu> if (this->config_list != NULL) this->PushExtraConfigList();
18:59:40 <glx> and the line above
18:59:42 <Samu> it's this thing that puts the start_date into it
18:59:52 <glx> this->config_list = (info == NULL) ? NULL : new ScriptConfigItemList();
19:00:02 <glx> config_list is NULL
19:00:11 <glx> so no PushExtra
19:01:13 <glx> btw some this-> are missing in this function ;)
19:01:54 <Samu> i can help u trigger a crash because of that missing start_date
19:02:09 <glx> the code is clear, no name = no info and no config
19:02:16 <Samu> https://github.com/OpenTTD/OpenTTD/pull/7084/files#diff-49067317702b87dfb7eb548654b76f8aL115
19:02:25 <Samu> rename to InvalidateWindowData
19:02:34 <Samu> then have the AI Settings window open
19:02:41 <Samu> let a random ai start
19:02:48 <Samu> then kill it
19:02:56 <Samu> click reset button = crash
19:04:17 *** strawbs89 has quit IRC
19:04:45 <glx> but that's because it's using a wrong config
19:05:08 <glx> the problem is on the GUI side
19:05:24 <glx> not AIConfig
19:06:13 <Samu> I suppose I agree
19:07:06 <Samu> Change(NULL) has to be put somewhere though
19:07:17 <glx> yes to reset the config
19:07:43 <glx> and return to the randomAI one
19:08:19 *** andythenorth has joined #openttd
19:08:34 *** Thedarkb-T60 has joined #openttd
19:09:43 <andythenorth> well
19:10:22 <glx> when a randomAI starts, the config is changed to the started AI
19:11:12 <glx> setting is_random
19:11:34 <glx> so when it stops you have to set it back to random
19:12:21 <glx> and that's exactly what you did
19:13:27 * andythenorth nap time?
19:13:29 * peter1138 returns.
19:13:34 <peter1138> No, it's NRT TIME
19:14:03 <andythenorth> oic
19:14:19 <andythenorth> it might still be enterprise software time for me
19:14:35 <andythenorth> do I really want to read the html validator results at 18.15?
19:14:59 <nielsm> ugh html validation
19:15:11 <nielsm> I haven't done that in maybe 15 years?
19:15:24 <nielsm> (probably stopped caring)
19:15:27 <andythenorth> yours always validates? o_O
19:15:47 *** Wormnest has quit IRC
19:16:01 <nielsm> (today at work I wrote javascript that generates combined line and bar graphs in svg)
19:16:23 <andythenorth> o_O
19:17:00 *** cHawk has quit IRC
19:17:18 <peter1138> I don't bother validating HTML these days because writing correct HTML is so simple... ;)
19:17:20 <nielsm> (because I haven't been able to find any existing library to do that relibaly without adding infinite useless eyecandy features that break static rendering with wkhtmltopdf)
19:17:40 <peter1138> (Unless you're a WordPress theme developer, in which case...)
19:17:51 <peter1138> Right, what am I working on tonight?
19:17:54 <nielsm> (and also they can never be coaxed to lay out things how I actually want it)
19:18:12 <supermop_work_> nrt
19:18:36 <peter1138> Good idea!
19:18:58 <andythenorth> multi-stop-road-vehicle-docks
19:19:04 <andythenorth> where the vehicles get on ferries
19:19:24 <peter1138> No, nrt.
19:19:30 <peter1138> But docks are in my list.
19:19:37 <peter1138> There may be patches to steal for that :D
19:20:36 <andythenorth> snow for roads?
19:20:39 <andythenorth> with snowploughs?
19:20:47 * andythenorth had an evil idea
19:20:52 <peter1138> New road type: Snow.
19:21:08 <peter1138> Vehicle comes along and changes the roadtype behind it.
19:21:16 <peter1138> How about... no, but... hah.
19:21:18 <andythenorth> my idea was the same but different :P
19:21:26 <andythenorth> store a wear factor
19:21:39 <peter1138> Might have space.
19:21:42 <andythenorth> do a statistical count of vehicles passing over each tile
19:21:46 <andythenorth> or something
19:21:54 <andythenorth> some vehicles have negative wear :P
19:21:58 <andythenorth> expose it to newgrf
19:22:04 *** Gja has joined #openttd
19:22:05 <glx> then holes on the road limiting speed ?
19:22:10 <andythenorth> holes on the road
19:22:13 <andythenorth> worn out rail track
19:22:21 <andythenorth> snow increases or removes
19:22:28 <andythenorth> adjust speed limit accordingly :P
19:22:28 <peter1138> So you have to buy and run road-maintenance vehicles.
19:22:35 <andythenorth> dredging sea lanes
19:22:37 <peter1138> o_O
19:22:40 <andythenorth> yeah
19:22:47 <andythenorth> it's totally dumb
19:22:50 <peter1138> Yes
19:22:50 <andythenorth> but might be fun
19:22:59 <nielsm> how much precision do you want per tile, 8 or 16 bit?
19:23:00 <andythenorth> utterly stupid, but might look really good
19:23:07 <nielsm> (it's going to be expensive)
19:23:12 <nielsm> (in storage)
19:23:14 <peter1138> nielsm, just add a couple of 64 bit ints.
19:23:16 <andythenorth> it doesn't need much precision
19:23:36 <andythenorth> I tried to work out if we could build the graph of nodes (junctions) and edges
19:23:44 <andythenorth> then apply same wear factor to all tiles in the edge
19:23:50 <andythenorth> but eh, andythenorth :(
19:23:56 <andythenorth> stick to pixels :P
19:24:12 <Samu> oh crap, i keep forgetting my ai does reset the config immediately to random ai state
19:24:13 <andythenorth> or enterprise software
19:24:20 <Samu> master doesn't do that
19:24:21 <peter1138> Pixels.
19:24:24 <peter1138> Hmm, so.
19:24:39 <peter1138> No trams loaded, yet tram tracks are available. What now?
19:24:43 * andythenorth wants a new command, git hmm
19:24:43 <Samu> it leaves it with the old random ai config that died
19:24:51 <andythenorth> peter1138: delete it all? :P
19:25:04 <andythenorth> or more seriously
19:25:17 <andythenorth> what daft condition causes them to be available?
19:25:35 <Samu> one could configure parameters on it for nothing, because when it'd start next time, it wouldn't care what u've set, it's just gonna start another random ai
19:25:46 <Samu> i remember now
19:25:59 <andythenorth> does jenkins hate me?
19:25:59 <andythenorth> yes
19:26:08 <peter1138> andythenorth, introduction date for road types.
19:26:15 <peter1138> Which is why I was talking about that earlier.
19:26:27 <andythenorth> who set the intro date on the grf?
19:26:27 <peter1138> introduction date doesn't care if there are no vehicles available for it.
19:26:35 <andythenorth> blame the author?
19:26:44 *** Thedarkb-T60 has quit IRC
19:26:46 *** Thedarkb-T60 has joined #openttd
19:26:48 <peter1138> The feature is there, so...
19:26:53 <peter1138> I think it's fine.
19:26:59 <peter1138> It's a misconfigured game.
19:27:07 <peter1138> It is as least working better with my latest change.
19:27:17 <peter1138> Before that, the menu worked but the toolbar closed itself instantly.
19:27:20 <andythenorth> oof
19:27:21 <peter1138> > bad UI
19:27:30 <andythenorth> naughty step
19:27:30 <glx> disable in menu like rails without available engines ?
19:28:23 <peter1138> glx, even with introduction dates on the rails?
19:28:48 <Samu> ok, i'm gonna trust glx that this won't crash on master
19:28:48 <glx> no checked
19:29:37 * andythenorth waits for staging to update
19:30:28 <andythenorth> peter1138: specs say it's OR for conditions
19:30:35 <andythenorth> so yeah, it should be available
19:30:38 <andythenorth> or specs are wrong
19:30:53 * andythenorth well aware that specs are not canonical :P
19:32:06 <Samu> GameScripts don't have "start_date", so useless to check if it's a GameScript? yesterday i proved they could have it
19:32:28 <glx> they shouldn't
19:32:45 <Samu> edited minimalGS
19:32:52 <Samu> added a parameter start_date to it
19:33:00 <glx> no sane dev would add this parameter
19:33:14 <Samu> openttd picked it up and added the in-built description
19:33:54 <Samu> ok im removing the change anyway
19:34:01 <glx> anyway the default description is not a problem I think
19:34:35 <glx> if no description is provided for a potential start_date GS parameter
19:35:47 <glx> so no need to check that
19:35:51 <peter1138> if a gamescript does have a start parameter, then master will be changing it anyway
19:36:17 <peter1138> there is no need to "fix" that in a patch that's supposed to be about allowing AIs to start instantly.
19:37:06 <glx> indeed the handling for AI is done in AI class, GS are not a problem
19:40:09 <Samu> pushing with force
19:40:15 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyUY
19:40:22 <Samu> finally
19:40:52 <peter1138> You think?
19:41:47 <Samu> i think
19:42:16 <peter1138> Yes. That looks a LOT better than the original.
19:42:23 <peter1138> Welcome to C++ OOP :-)
19:43:32 <Samu> about that asynchronous thing, I have no idea
19:43:49 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhy0Y
19:44:18 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on issue #7119: Ships turning around pixel alignment https://git.io/fhy0s
19:44:36 <peter1138> Samu, it means a command is sent to the server, and you don't get a respond back about whether it actually succeeded or completed.
19:44:44 <peter1138> *response
19:45:04 <peter1138> However in this case I don't think this would be being sent from client to server anyway.
19:45:24 <glx> only server can start AIs
19:45:27 <Samu> so that means I'm lucky
19:45:30 <Samu> cool
19:45:56 <Samu> but start_date is 0
19:45:59 <Samu> why 0?
19:46:12 <Samu> 0 is a magic number
19:47:54 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7119: Ships turning around pixel alignment https://git.io/fhy0w
19:48:12 <Samu> actually there is a problem yet
19:48:20 <nielsm> on a side note, Samu I think it should be Change and not Codechange, because it's going to have user-visible effects
19:48:30 <Samu> forget about the (1-3600) range
19:48:35 <Samu> forgot*
19:48:41 <nielsm> Codechange is only for changes that jigger code around without actually having an effect on the end result
19:49:14 <peter1138> Hmm, wonder if I made a booboo on ships turning.
19:49:39 <Samu> ok, let me change that
19:49:43 <Samu> i also have something to fix yet
19:49:49 <Samu> brb
19:49:55 <peter1138> Hmm, no I remember now, it glitched both ways.
19:49:56 <peter1138> Hmm
19:52:42 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhy0N
19:55:15 *** supermop_work_ has quit IRC
19:55:19 <Samu> no glx, i forgot about max(1, the other value that could have been randomized to 0)
19:56:02 <glx> no it can't be randomised to 0
19:56:57 <glx> I think, not checked, you may be right
19:57:07 <Samu> random deviation could
19:57:08 <Samu> yeh
19:58:43 <Samu> this->SetSetting("start_date", start_date ? max(1, this->GetSetting("start_date")) : start_date);
19:59:23 <Samu> or 0
19:59:31 <Samu> this->SetSetting("start_date", start_date ? max(1, this->GetSetting("start_date")) : 0);
20:01:09 <Samu> hmm how do i rename a commit?
20:01:12 <Samu> ammend during rebase?
20:01:16 <Samu> gonna try
20:01:27 <peter1138> If it's the last commit, git commit --amend
20:01:52 <peter1138> Otherwise do an interactive rebase and follow the instructions.
20:02:41 <nielsm> interactive rebase has an instruction called 'reword', that's changing the commit message
20:02:43 <andythenorth> turning ships eh
20:02:49 <andythenorth> shave a yak?
20:02:55 <Samu> do you really want 0 instead of start_date?
20:03:41 <peter1138> I think it makes it clearer that you are explicitly setting it to 0.
20:04:04 <peter1138> Otherwise at first glance it looks like you might just be setting it to the value it already was.
20:04:13 <Samu> oki, 0
20:04:21 <peter1138> Which, yes, happens to be 0, but still.
20:04:48 <Samu> this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0);
20:07:17 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyUY
20:08:11 <peter1138> Hmm. I think you need a better comment than that.
20:08:23 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhyuU
20:08:41 <peter1138> I assume the issue now is that because you changed the min value to 0, it can now get randomized down to 0 instead of 1, right?
20:09:02 <Samu> I don't want it to be randomized to 0
20:09:36 <peter1138> I'm aware
20:09:46 <peter1138> That's why it's an issue.
20:10:34 <peter1138> Okay, is AddRandomDeviation only called for start_date?
20:10:56 <peter1138> "** Randomize all settings the Script requested to be randomized."
20:11:12 <peter1138> Hmm
20:11:18 <peter1138> Ah, I see, it's called *once*
20:11:21 <peter1138> Ignore that then :D
20:12:50 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0 https://git.io/fhyug
20:13:28 *** rm87 has joined #openttd
20:14:33 *** supermop_work has joined #openttd
20:16:43 *** supermop_work_ has joined #openttd
20:17:01 <rm87> How to get in touch with translations admin? The email I sent 5 days ago has not been answered jet.
20:17:21 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhyuF
20:18:34 <LordAro> i think planetmaker was the last person to look at that mailbox...
20:19:52 <Heiki> rm87: I sent an email in October, still waiting for an answer…
20:21:35 <rm87> Does anyone deal with the translation related issues at all or?
20:22:23 <Samu> i'm bad with comments
20:23:36 *** supermop_work has quit IRC
20:23:50 *** Sheogorath has quit IRC
20:24:47 <LordAro> rm87: translator requests go into a shared mailbox that some of the devs look at some of the time
20:25:09 <peter1138> Who though?
20:25:14 <LordAro> well, not me
20:25:17 <peter1138> Quite.
20:25:17 <LordAro> that's all i know
20:25:36 *** Sheogorath has joined #openttd
20:26:32 <peter1138> whois Heiki
20:26:42 <peter1138> Well played.
20:27:22 <peter1138> So yes, who knows.
20:28:02 <Samu> "Random deviation function could also return a value of 0, but if it wasn't 0, it means it must return a value inside interval 1-3600"
20:28:05 <Samu> terrible comment
20:28:14 <peter1138> interval?
20:28:29 <Samu> range
20:28:54 <peter1138> If start_date was not already 0, then it must be clamped to 1-3600
20:29:12 <Samu> wow, great english skills
20:29:19 <peter1138> BUT!
20:29:26 <peter1138> the code doesn't clamp it to 1-3600
20:29:33 <peter1138> It only ensures it is > 1
20:29:35 <peter1138> Which is fine.
20:30:07 <peter1138> If start_date was not already 0, then it must have a minimum value of 1
20:30:10 <peter1138> Something something something
20:30:29 <Samu> something? what else is missing
20:30:37 <peter1138> Annoying.
20:30:48 <peter1138> The clamp explains it better, but the code doesn't do that.
20:31:03 <Samu> clamp is done by SetSetting
20:31:11 <peter1138> Yes, but not here :)
20:31:28 <peter1138> If start_date was not already 0, then a minimum value of 1 must apply.
20:32:36 <Heiki> peter1138: haha
20:32:53 <Samu> /* start_date = 0 is a special case, where random deviation does not occur.
20:32:53 <Samu> * If start_date was not already 0, then a minimum value of 1 must apply. */
20:32:53 <Samu> this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0);
20:33:21 <andythenorth> I don't understand the translator thing
20:33:33 <peter1138> Samu, great.
20:33:38 <peter1138> andythenorth, which bit?
20:33:42 <andythenorth> planetmaker: how do we add translators to coop eints?
20:34:04 <andythenorth> the weird thing of improving the web translator, but not letting people in
20:34:57 *** Thedarkb1-T60 has joined #openttd
20:35:25 * andythenorth wonders if we should auth it on github, and add collaborators
20:35:38 <andythenorth> dunno eh
20:35:46 <andythenorth> also: Enterprise Software!
20:35:49 * andythenorth must busy
20:35:50 <Samu> what about the commit message itself, does it needs more editing?
20:36:24 <peter1138> I think so. It doesn't really explain it.
20:36:40 <peter1138> It prioritizes the wrong thing.
20:37:11 <peter1138> The main aim of this patch is to allow AIs to start "instantly" right?
20:37:21 <peter1138> The aim isn't to allow start_date to be 0.
20:37:23 <Samu> yes
20:37:36 <LordAro> andythenorth: i imagine there's plenty of ancient translators that don't github
20:37:42 <Samu> but but... it's part of the process
20:37:45 <peter1138> The former is achieved by the latter, the former is the goal, the latter is the method.
20:38:02 <peter1138> Yes, but prioritize the goal not the method.
20:38:16 <peter1138> (I think that's where you've been stuck on your previous changes)
20:38:54 *** Thedarkb-T60 has quit IRC
20:39:00 <Samu> i mean, the start date can still be the other values
20:39:23 <peter1138> "Change: Allow AIs to start at once, by setting their start_date to 0."
20:39:29 <Samu> but if it's 0, then all ais start right away
20:39:34 <peter1138> yes
20:39:41 <Samu> until it finds the next one with a start_date != 0
20:39:43 <peter1138> But you are still focusing on the method.
20:39:52 <peter1138> Stop focusing on the method and focus on the goal.
20:40:23 <andythenorth> let's try: cod, spaghetti, olives, butter, yellow tomatos, and lemon
20:40:27 <andythenorth> see if that works
20:40:30 <peter1138> Sounds good.
20:40:52 <andythenorth> first beer
20:40:58 <peter1138> I'm going to have chicken, courgette, aubergine, curly kale, and sweet potato.
20:40:59 <andythenorth> enterprise software can wait until tomorrow :P
20:41:05 <andythenorth> sounds nice also
20:41:13 <Samu> Change: Allow AI companies to start immediately one after the other?
20:41:23 <Samu> Change: Allow AI companies to start immediately
20:41:31 <andythenorth> am I the only person in the world making enterprise software for their own use? :P
20:42:06 <Samu> Change: Allow AI companies to start at the same time?
20:42:38 <Samu> Change: Allow AI companies to start instantly
20:44:28 <peter1138> immediately is a good word
20:45:51 *** rm87 has quit IRC
20:46:12 <peter1138> instantly might imply that started slowly, rather than delayed.
20:46:25 <peter1138> *they
20:48:25 <Samu> gonna copy paste all the comments into the commit message
20:51:10 <Samu> dang it, the bash text editor is complete trash
20:53:39 <TrueBrain> I had to cycle the old mirror; seems one of the mirror did some kind of rollback .. all kinds of files are missing in action :D
20:55:19 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyUY
20:55:23 <TrueBrain> okay .... rsync reports the files as being there
20:55:24 <TrueBrain> http says no
20:55:53 <Samu> i need a better editor when i do a git rebase -i upstream/master
20:56:17 <Samu> cant use ctrl-c/ctrl-v
20:56:23 <glx> when I installed git for windows I told it to use notepad++
20:57:53 <dwfreed> learn vim :P
20:58:25 <TrueBrain> why does rsync report 1 thing, and http the other .. hmm
21:00:59 <nielsm> oh, found out my login for the wiki
21:03:31 <nielsm> ...but that was not the wiki I was looking to log in to
21:03:41 <nielsm> still can't find a working login to the newgrf-specs wiki
21:06:14 *** Thedarkb-T60 has joined #openttd
21:06:48 <andythenorth> check the sig here https://www.tt-forums.net/viewtopic.php?f=33&t=8325
21:06:51 <andythenorth> old old
21:06:55 <andythenorth> 15 years :D
21:07:04 *** Thedarkb1-T60 has quit IRC
21:07:44 <TrueBrain> this is very odd ... files are not showing up as I expect on one of the mirrors
21:07:45 <TrueBrain> hmm
21:08:04 <andythenorth> "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
21:09:39 <FLHerne> Samu: There is no 'bash text editor'
21:10:03 <FLHerne> Samu: Applications will use whatever editor is set as $EDITOR
21:10:36 <FLHerne> (and you can set EDITOR=whatever_you_like)
21:11:06 <glx> not on windows I think
21:11:44 <glx> but there's core.editor in git config
21:15:25 <FLHerne> peter1138: I have a suspicion your ship-turning code will actually look worse in a lot of cases
21:15:51 <FLHerne> Unless it avoids doing 180° spins at docks and I've missed that
21:16:49 <FLHerne> Since FISH etc. ships are so much bigger than a tile, turning on the spot will tend to clip through docks/shore, and IME that's by far the most common case for large direction changes
21:17:10 *** Jortuny has quit IRC
21:18:58 *** Jortuny has joined #openttd
21:20:02 <andythenorth> I tested it with Sam
21:20:05 <andythenorth> looked ok to me
21:20:18 <andythenorth> compared to the instant-reverse-with-bonus-dock-overlapping
21:22:08 <peter1138> revert?
21:22:25 <andythenorth> FLHerne: you tested the PR
21:22:26 <andythenorth> ?
21:22:29 <peter1138> Cos some graphics that are too big and already glitch will glitch? :D
21:23:06 <andythenorth> eh it's in the nightly
21:23:14 <andythenorth> see what people say
21:23:54 <peter1138> True
21:26:14 <andythenorth> revert FISH
21:26:42 <peter1138> k
21:26:59 <andythenorth> I capped Sam to 128px
21:27:03 <andythenorth> less glitch more
21:31:10 *** Thedarkb1-T60 has joined #openttd
21:36:22 *** tokai has joined #openttd
21:36:22 *** ChanServ sets mode: +v tokai
21:36:36 <planetmaker> o/
21:36:47 *** Thedarkb-T60 has quit IRC
21:38:03 *** gelignite has quit IRC
21:38:08 <glx> oh no, there's a warning at https://github.com/OpenTTD/OpenTTD/blob/8e02b7952b3fa3e9caff3cc78abbe68ce0b5a63d/src/company_gui.cpp#L966
21:39:24 <glx> ##[warning]src\company_gui.cpp(966,0): Warning C4018: '>=': signed/unsigned mismatch
21:40:21 *** Gja has quit IRC
21:41:17 *** Jortuny has quit IRC
21:41:20 <Eddi|zuHause> am i the only one that thinks LiveryScheme doesn't work as a type that should be compared to a height?
21:41:32 <nielsm> it looks strange yes
21:42:48 <Eddi|zuHause> sounds like LiveryScheme is meant to be a colour?
21:43:13 *** synchris has quit IRC
21:43:24 *** tokai|noir has quit IRC
21:46:08 *** cHawk has joined #openttd
21:47:56 <Eddi|zuHause> scrolling through the diff, i'd say "livery_height" should better be called "livery_count"
21:49:29 <Eddi|zuHause> also this thing looks weird: "LiveryScheme j = (LiveryScheme)((pt.y - wid->pos_y) / this->line_height);" <-- you're calculating the position in the list by taking the pixel position, and dividing by line height?
21:50:34 *** octernion has joined #openttd
21:51:15 <peter1138> I see *now* the reviews come out...
21:55:18 <Eddi|zuHause> well, why would you do that BEFORE merging? :p
21:55:31 <peter1138> No warnings for me with clang and -Werror :/
21:56:07 <Eddi|zuHause> it's too intelligent and also checks the range of values before issuing spurious signed/unsigned warnings
21:57:30 <planetmaker> hm, translators. yes
21:57:43 <peter1138> Okay, that code hasn't actually changed since before my patch.
21:57:51 <planetmaker> i really would love to not be the only one to handle them
21:57:58 <peter1138> Only the addition of the comparison.
21:58:20 <peter1138> Yeah, livery_height is a bad name, it's the number of items shown.
21:58:46 <peter1138> Eddi|zuHause, so yes, that is how we calculate the position.
21:59:10 <glx> with the translation warnings it's easy to miss a valid warning on CI
22:00:26 <peter1138> Eddi|zuHause, however it probably can use the same method as for groups.
22:00:32 <andythenorth> snow
22:01:22 <planetmaker> and I really would like a less hassle-some way to add translators :)
22:01:59 <peter1138> planetmaker, give me information on what/how it's done then.
22:12:51 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul https://git.io/fh2dV
22:14:28 <planetmaker> https://paste.openttdcoop.org/p9frjxeqq/wfnqgv <-- that's the process
22:14:50 <Samu> start as spectator my next goal
22:17:44 *** sla_ro|master has quit IRC
22:18:02 *** octernion has quit IRC
22:20:18 <peter1138> Hmm, I just realised DMU/EMU are missing from the list
22:20:25 <peter1138> Because the default engines aren't flagged with required flags.
22:20:30 <peter1138> Is this for a reasonj?
22:20:32 <peter1138> -j
22:22:28 *** octernion has joined #openttd
22:22:44 <peter1138> It used to be multihead == DMU/EMU
22:25:05 <andythenorth> which list?
22:27:56 <peter1138> Livery list.
22:28:08 <peter1138> Strange, is_mu flag has always been set the same. Hmm.
22:28:15 <andythenorth> caboose (wagon, no cargo) is treated as pax also
22:28:18 <peter1138> Like, since 2007 when liveries were introduced.
22:28:19 <andythenorth> probs because cargo 0
22:28:25 <andythenorth> or something
22:28:26 <peter1138> andythenorth, probably. Just set a freight cargo type :p
22:28:34 * andythenorth tries
22:31:46 <andythenorth> nope
22:32:50 *** supermop_work_ has quit IRC
22:32:56 <andythenorth> oh well
22:33:27 <nielsm> hmm eints is asking me to translate STR_COLOUR_DEFAULT which does not exist in english.txt
22:33:52 <peter1138> Are you sure about that?
22:34:07 <nielsm> oh... I haven't updated in a little while
22:34:08 <nielsm> right
22:35:09 <peter1138> Castello creamy blue. Yum.
22:35:47 <peter1138> How are you meant to eat beese and chiscuits without getting horrendously fat?
22:36:51 <andythenorth> carefully
22:38:47 <Eddi|zuHause> <andythenorth> probs because cargo 0 <-- is the 0 set by property or by callback?
22:40:02 <nielsm> hmm were {STRINGn} codes also supposed to become {STRING} in translations?
22:41:50 <andythenorth> neither
22:42:10 <andythenorth> I tried changing the default cargo to a prop
22:42:44 <andythenorth> but it's behind a few layers of abstraction, might get treated as a cb
22:43:12 <peter1138> Eddi|zuHause, did you get the compiler warnings or was it just glx?
22:43:27 <glx> I noticed them on azure
22:43:34 <peter1138> Hmm.
22:43:36 <Eddi|zuHause> i don't remember any warnings
22:43:39 <peter1138> I see.
22:44:39 <glx> nielsm: yes {STRINGn} and {RAW_STRING} in english are {STRING} in translations
22:45:40 <Eddi|zuHause> nope, no warnings on master, except for the strings
22:46:05 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #6233: Lock price for when built on sloped river and bare land tiles https://git.io/fhyXb
22:46:05 <andythenorth> I have loads of mac specific warnings
22:46:07 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #6797: Interface: Fractional Scale https://git.io/fhyXN
22:49:13 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7152: Fix 23960d0f2c: Scrollbar was broken for non-group liveries. https://git.io/fhy1G
22:51:04 *** andythenorth is now known as Guest20
22:51:04 *** andythenorth has joined #openttd
22:51:09 <peter1138> Hmm, were there no default EMUs?
22:51:32 <andythenorth> the high speed trains are emus?
22:51:39 <andythenorth> eurostar, tgv
22:51:44 <andythenorth> asiastar whatever it was called
22:51:53 <peter1138> They're multihead. Is that the same thing?
22:52:26 <andythenorth> think so
22:52:36 <andythenorth> dunno
22:52:49 <andythenorth> hmm maybe not
22:52:52 <peter1138> TIM, Asiastar
22:52:55 <peter1138> SH125
22:52:58 <andythenorth> what does is_mu do?
22:53:02 <peter1138> I'd say SH125 kinda is.
22:53:10 <peter1138> andythenorth, it sets the multiunit livery flag
22:53:32 <peter1138> millennium Z1 is arguably an MU
22:53:40 <peter1138> but it's monorail :p
22:54:03 <peter1138> SH125 is the only one with capacity but that's diesel anyway.
22:54:09 *** Guest20 has quit IRC
22:55:42 <peter1138> Maybe it's time to fire up TTDPatch :D
22:56:33 <peter1138> it's obvious the manley-morel and dash are DMUs, at least
22:56:40 <peter1138> the MM even has DMU in its name :)
22:58:03 <peter1138> Hmm, azure says "11 warnings"
22:58:25 <peter1138> But I don't see them.
22:58:37 <peter1138> I saw 48 language warnings, but not compile warnings.
23:00:01 <peter1138> And I can't get the previous output since it's been merged.
23:00:35 <peter1138> Okay, I see it.
23:00:53 <peter1138> Still says 11 warnings, so that warning in the code isn't picked up.
23:01:07 <peter1138> On the other hand, the PR I ust made doesn't have that issue.
23:02:16 <peter1138> Eddi|zuHause, better code?https://github.com/OpenTTD/OpenTTD/pull/7152/files
23:04:38 *** HerzogDeXtEr has quit IRC
23:05:18 <peter1138> https://en.wikipedia.org/wiki/List_of_SNCF_classes#TGV
23:05:22 <peter1138> That says TGV is a MU
23:06:01 <andythenorth> I saw there's a flag in newgrf for MU :P
23:06:16 <peter1138> And the asiastar...
23:06:24 <peter1138> https://en.wikipedia.org/wiki/British_Rail_Class_373
23:06:31 <peter1138> Yes
23:06:37 <andythenorth> prop 27 bit 2
23:06:39 <peter1138> That flag just was never set for default vehicles.
23:07:25 <nielsm> STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team
23:07:27 <nielsm> update?
23:07:31 <peter1138> Hah
23:07:37 <peter1138> PR :-)
23:07:59 <peter1138> Are any other vehicles MUs?
23:08:06 <peter1138> Should I brave looking at toyland?
23:08:11 <andythenorth> maglev?
23:08:38 <andythenorth> is there a turner turbo thing in arctic?
23:08:41 * andythenorth could look
23:08:53 <Heiki> oh wow, translator@openttd.org just replied
23:09:01 *** urdh has quit IRC
23:09:04 <andythenorth> millenium z1
23:09:07 <Heiki> i.e. thank you, planetmaker :D
23:09:15 <planetmaker> you're welcome
23:09:22 <planetmaker> thanks for dropping by and reminding us
23:09:23 <andythenorth> turner turbo
23:09:27 <andythenorth> peter1138: ^
23:10:04 <planetmaker> the translators account was... "a bit" neglected the last half year or so. at least :|
23:10:28 <peter1138> MU? Hmm
23:10:37 <peter1138> it's multihead, but is a dmu?
23:10:55 <andythenorth> dunno :)
23:11:05 <peter1138> Hmm
23:11:07 <planetmaker> its admin interface does not exactly invoke joy in me... on the contrary
23:11:14 <peter1138> it's a *gas* multiple unit, apparently
23:11:15 <peter1138> so yes
23:11:24 <peter1138> technically not disel but stil.
23:12:42 *** urdh has joined #openttd
23:13:29 <peter1138> Hmm, the "used features" doesn't take account of "climate"
23:14:28 <andythenorth> how even is the translators account admined?
23:14:36 <peter1138> I have the information now.
23:14:42 <peter1138> I... will look when I'm feeling braver.
23:14:59 <andythenorth> I only saw newgrf eints, which I think was admined with coop redmine
23:15:04 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid https://git.io/fhyDs
23:15:10 <andythenorth> 'saw' / 'wrote the UI for' /s :P
23:15:22 <andythenorth> eints ui could do with a rework but eh
23:15:24 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid https://git.io/fhKuB
23:15:29 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro closed issue #7089: Crash when Removing NewGRF from Active list https://git.io/fhV61
23:15:44 <planetmaker> andythenorth, that's a "nice to have". Not a requirement. It works
23:15:59 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7114: NPF bails out when source tile is also a destination tile https://git.io/fh6mK
23:16:02 <andythenorth> I won't be doing it any time soon :D
23:16:05 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro closed issue #7060: NPF refuses to pathfind when the destination tile is the same as where the vehicle currently is https://git.io/fhn1C
23:16:07 <planetmaker> so put it on the "will do when I have nothing better to do" :P
23:16:15 <planetmaker> (i.e. "never" :P)
23:16:33 <peter1138> Cool EMU/Electric is no longer available.
23:17:56 <andythenorth> Horse is 93% sprites done, and the costs are weird
23:17:58 <andythenorth> call it 1.0?
23:19:02 <nielsm> oh god so many inconsistencies in this langfile
23:19:14 <nielsm> three terms for the same concept
23:19:50 <nielsm> now going on a quest to fix all strings talking about path signals to use the actual railroading term
23:21:34 <peter1138> Hmm, damn, this is probably two PRs.
23:22:14 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7153: Fix engines not in current climate affecting available livery classes, and default engines not using MU class https://git.io/fhyDD
23:22:59 <andythenorth> I should set some engines to MU eh?
23:23:08 <peter1138> If they're MUs, yes please.
23:23:26 <peter1138> #7152 is pretty important, the UI is buggy at the moment.
23:23:36 <peter1138> No crashy crash though.
23:23:53 <peter1138> #7153 is a makes the available livery classes actually match what is available, so also nice.
23:24:13 <planetmaker> what are... "livery classes"?
23:24:40 <andythenorth> the funny company colour options for trains :)
23:24:41 *** heffer has quit IRC
23:24:53 <peter1138> Yeah, those funny colour options we borrowed from ttdpatch.
23:24:55 <peter1138> About 12 years ago.
23:24:59 <andythenorth> they're weird
23:25:02 <andythenorth> but ok
23:26:00 <planetmaker> you can actually build them... or could. With a climate cheat. Which does not exist anymore
23:26:19 <planetmaker> But unavailable due to climate still means not necessarily "not running around on the map"
23:27:14 <nielsm> gn
23:27:17 <planetmaker> and you could still attach them via callback to MU, couldn't you - even when unavailable (or does that not apply here?)
23:27:21 <planetmaker> gn, niels
23:29:44 * andythenorth patches horse
23:30:03 *** Progman has quit IRC
23:30:18 <andythenorth> what's an MU then?
23:30:21 <andythenorth> pax railcar?
23:30:25 <andythenorth> mail railcar?
23:30:25 <peter1138> I think it'd be fairly hard to test if something is attached by callback.
23:31:12 <planetmaker> I totally agree. But I'm pretty sure that there's more than one NewGRF which makes vehicles unavailable via climate but uses them in MU via CB
23:31:31 <planetmaker> iirc I was even once told that it was THE way to handle this
23:31:47 <peter1138> Well
23:32:11 <andythenorth> oof
23:32:16 <peter1138> As long as there is one that IS available, the flag will be set.
23:32:21 <andythenorth> why do I piss around with electro-diesels :P
23:34:58 <peter1138> planetmaker, and if not, they won't get to use the livery scheme which hardly anyone uses anyway :D
23:35:12 <andythenorth> MY? or engines? https://dev.openttdcoop.org/attachments/download/9251/high-speed-pax-4.png
23:35:17 *** nielsm has quit IRC
23:35:25 <andythenorth> MU *
23:35:25 <peter1138> Well that hot chocolate disappeared rather quickly.
23:35:26 <planetmaker> it's definitely not a game-breaking thing either way ;)
23:35:53 <peter1138> It looked weird having EMU/Electric available, with default vehicles, in arctic/tropic.
23:36:15 <peter1138> andythenorth, yes except the head of Train 3.
23:36:23 <andythenorth> yair
23:37:47 <andythenorth> error: no electro-diesel livery option :P
23:37:54 * andythenorth expects that immediately
23:37:55 <peter1138> It'll be diesel.
23:37:57 <andythenorth> or instantly
23:38:00 <peter1138> Hmm, custom livery classes? :p
23:38:05 <andythenorth> maybe :P
23:38:05 <peter1138> Let's say no.
23:38:08 <andythenorth> let's
23:38:18 <peter1138> Actually that's possible.
23:38:25 <peter1138> Just make a group "Electro-diesel"
23:38:33 <peter1138> Put them all under there.
23:39:08 <andythenorth> oh I broke it
23:39:26 <andythenorth> mu vehicles with 0hp when built
23:39:44 <andythenorth> don't get the livery
23:40:25 <peter1138> :D
23:41:24 * andythenorth tries default game
23:41:39 <andythenorth> so blue MU engines, red pax carriages?
23:41:40 <andythenorth> o_O
23:42:05 <DorpsGek_II> [OpenTTD/OpenTTD] michicc approved pull request #7153: Fix engines not in current climate affecting available livery classes, and default engines not using MU class https://git.io/fhySR
23:42:35 <andythenorth> let's add more :P
23:42:49 <andythenorth> 'high speed engine or wagon' :P
23:42:53 <andythenorth> 'brake van'
23:43:19 <andythenorth> let's have 16, and a byte property for newgrf to set
23:43:35 <andythenorth> I am only going to use groups always anyway
23:44:36 <peter1138> We should add RGB colours and let you have a mega rainbow.
23:45:07 <andythenorth> can we have 255 RGB colours?
23:45:23 <andythenorth> arranged in groups of 8 or so?
23:45:29 <andythenorth> with 1 more for alpha?
23:45:49 <peter1138> Um.
23:45:58 <peter1138> Currently it's 4 sliders.
23:46:09 <peter1138> R, G, B and 'contrast'
23:46:32 <peter1138> Invisible vehicles is not a thing.
23:46:35 <peter1138> (Sort of)
23:47:31 <andythenorth> I was thinking of just choosing 255 nice ones :P
23:47:37 <andythenorth> maybe saving them to a palette :P
23:47:50 <andythenorth> people are snowballing outside my house
23:47:56 <andythenorth> GTFO to bed people :P
23:49:07 <Samu> Calls to 'SetLocalCompany'... too many
23:50:27 *** octernion has quit IRC
23:51:45 <andythenorth> also very bed
23:51:47 *** andythenorth has quit IRC
23:56:46 <peter1138> Oops, finish rebase before making other changes.
23:57:01 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhy93
23:58:39 <Samu> there is no spectator slot in single player t.t
23:58:51 <Samu> how to solve
23:59:41 <peter1138> Run in multiplayer.