Log for #openttd on 31st January 2019:
Times are UTC Toggle Colours
00:00:57  <glx> that looks like max(getstartnextime, 1)
00:04:40  <peter1138> Gotta say, the current method of setting delay is a pain in the bum.
00:04:55  <peter1138> Individually per slot :/
00:16:09  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT)
00:19:34  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas updated pull request #7086: Change #6173: Update SDL driver to use SDL 2.0
00:19:49  <peter1138> clang++ works better than clang ;p
00:24:48  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7148: Switch saveload versions from literal numbers to enum values.
00:30:56  *** supermop_work__ has quit IRC
00:31:27  <Samu>
00:32:32  <Samu> maybe it shouldn't even set the setting
00:33:01  <Samu> no need to create a Parameter entry
00:33:12  <Samu> hmm must investigate
00:36:17  <LordAro> peter1138: i wasn't aware there were any differences between clang & clang++
00:37:14  <peter1138> Well the former won't compile C++ code :-)
00:37:15  *** ANIKHTOS has joined #openttd
00:37:28  <ANIKHTOS> happy new year to all
00:37:41  <LordAro> peter1138: that's ...not right?
00:39:52  <peter1138> That's what I thought.
00:40:11  <peter1138> Hmm, I should probably get an early night, but it's a bit late for that.
00:47:32  *** Eddi|zuHause has quit IRC
00:47:58  *** Eddi|zuHause has joined #openttd
00:48:15  *** Thedarkb-X40 has joined #openttd
00:51:06  *** Pikka has joined #openttd
00:52:47  *** Thedarkb-T60 has quit IRC
01:00:23  *** ANIKHTOS has quit IRC
01:07:50  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels
01:09:52  <Eddi|zuHause> how crazy is it to rebase a pr onto another pr?
01:11:08  <glx> I once merged a PR into another because I needed it for a test
01:11:30  <Eddi|zuHause> nnyby: ships vs bridges were always a bit off. you sure these issues have anything to do with each other?
01:13:13  <Samu> just discovered something strange
01:14:05  <Samu>
01:14:25  <Samu> what is strcmp supposed to do
01:15:17  <LordAro> Samu: aha, that's a good one
01:15:24  <Samu> also, lines 391, 392 and 393 are never called
01:15:35  <Samu> put a breakdown there, it never reached it
01:15:49  <LordAro> look up the return values of strcmp
01:16:07  <LordAro> and remember how integers evaluate to booleans
01:16:21  <LordAro> it's not a great way of using strcmp
01:16:28  <LordAro> as it leads to confusing like this :p
01:18:32  <nnyby> Eddi|zuHause: no, i'm not sure. may be unrelated
01:19:53  <Samu> what about lines 391...
01:21:06  <Samu>
01:23:04  <Samu> it returns 0, !0 = true then
01:23:28  <Samu> still doesn't explain why lines 391 aren't reached
01:30:00  <glx> tried with a config item not being "start_date" ?
01:30:47  <Samu> yes, clueless plus, many of them, 15 ais
01:30:48  <glx> and with no descriptin ?
01:31:17  <Samu> oh, don't tell me it's that
01:31:20  <Samu> let me check
01:31:46  <glx> the code tell me it's probably the part you are missing in your test cases
01:32:33  <Samu> the description for start_date is empty
01:33:04  <Samu> ah, i see
01:33:07  <glx> yes but start_date doesn't go to line 391
01:33:31  <Samu> i think there's only an AI that fits into this category
01:33:33  <Samu> WmDOT
01:33:44  *** snail_UES_ has joined #openttd
01:34:19  <glx> usually reading the code helps a lot to understand how things are supposed to work ;)
01:34:30  <Samu> oops, apparently not
01:34:47  <Samu> is it even possible to create non descripted parameters?
01:35:05  <glx> just set the description to "" I think
01:35:38  <Samu> let me edit the minimalgs brb
01:37:30  <glx> because description is required, but can be an empty string
01:38:56  <Samu> aha, reached it!
01:39:04  <Samu> description = ""
01:39:43  <glx> see, read the code, it tells you what you need to reach a specific section
01:41:24  <Samu> i am worried that "start_date" could be a GS parameter
01:41:45  <Samu> hmm
01:41:58  <glx> it's probably ignored
01:42:13  <Samu> how to properly identify an AI
01:44:28  <Samu> looks like it's not
01:45:16  <Samu>
01:45:34  <Samu> I didn't even describe it
01:45:42  <Samu> description = "", but still got that
01:47:08  <glx> with a breakpoint you can check the value of config_item.description
01:48:01  <glx> hmm description is not the problem
01:48:44  <glx> because it displays STR_AI_SETTINGS_START_DELAY, that means description is empty
01:49:16  <Samu> yes, but ... i mean, it's a GS
01:49:21  <Samu> it shouldn't happen
01:49:30  <glx> but that also means name is "start_date"
01:49:58  <Samu> i can fix it apparently
01:50:11  <Samu> just need to ensure the slot which it belongs
01:50:25  <glx> no need to fix
01:51:19  <glx> for me it's ok to get the default string for a setting named "start_date" if no description is provided
01:52:36  <glx> if the GS wants another description for this setting it can provide it, it just need to be non empty
01:53:07  <Samu> the way it is described...
01:53:16  <Samu> "this AI"
01:53:18  <Samu> hmm
01:53:47  <Samu> GS's dont even start, would be weird lol
01:54:49  <Samu> in the other function is where i have to properly identify this as an AI
01:55:16  <Samu> "start_date" and strempty is not garanteed i'm checking an AI parameter
01:56:27  <Samu>
01:56:46  <Samu> over here, I'm trying to create a special case for the date being 0
01:56:52  <Samu> dont want random deviation to occur
01:57:47  <Samu> only random deviation for values > 0
02:44:04  <Samu> error C2248: 'ScriptInfo::engine': cannot access protected member declared in class 'ScriptInfo'
02:44:12  <Samu> what does it mean protected... bah
02:44:19  <Samu> it's there!
02:46:03  <Samu> char *scanner = this->info->engine->APIName;
02:46:06  <Samu> doesn't work
02:46:17  <Samu> but it's the correct path
03:28:39  *** Samu has quit IRC
03:39:14  <DorpsGek_II> [OpenTTD/OpenTTD] PikkaBird opened issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes
03:40:37  *** debdog has joined #openttd
03:41:38  <Pikka> that was a fun morning, trying to figure that one out :)
03:47:04  *** HerzogDeXtEr has joined #openttd
03:48:09  *** D-HUND has quit IRC
03: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
03:51:49  <Eddi|zuHause> Pikka: var 80 is not in the specs, anyway
03:52:35  <Eddi|zuHause> Pikka: the tile coordinates in OpenTTD work like (y << map_x) | x
03: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
03:59:33  <Eddi|zuHause> Pikka: there's a variable for map size, but i don't remember where
04: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
04:21:32  *** HerzogDeXtEr has quit IRC
04: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
04:29:06  <Pikka> I see. and mask out some bits for the X value on smaller maps :)
04:29:42  <Pikka> or, for whichever dimension is smaller on non-square maps
04:29:45  <Pikka> thanks
04:30:08  <Eddi|zuHause> Pikka: doesn't matter which one is bigger, the X/Y bits of that are the correct ones
04: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
04:31:50  <DorpsGek_II> [OpenTTD/OpenTTD] PikkaBird commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes
04:32:01  <Eddi|zuHause> Pikka: you need to replicate the TileX and TileY functions from
04:33:57  <Pikka> it's a dword, containing however many bits it needs for X, then however many it needs for Y?
04:34:32  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels
04: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
04:34:47  <Eddi|zuHause> Pikka: yes
04:35:19  <Eddi|zuHause> Pikka: you should forget about var 81, it won't be meaningful and is only provided for backwards consistency
04:38:11  <Pikka> for sure
04: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
04:44:59  <Eddi|zuHause> (for a 256 map, "X" will be 2)
04:45:48  <Eddi|zuHause> dunno if you can abuse action6 to vary the shift/mask of a varaction2
04:46:28  <Eddi|zuHause> since map size won't magically change after game creation, it should be somewhat safe to do
04:47:07  <Pikka> I'm sure you could, but just doing it with var2 chains is probably easier.
04: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
04:51:33  <glx> the mask is easy to do, it's just (2^X)-1
04:52:18  <Eddi|zuHause> glx: yes, but it would take me a few minutes to conjure up the correct NFO incantation to get that
04:52:42  <glx> true
04:54:06  <Eddi|zuHause> glx: doesn't make it easier that you need to fit the magic +6 in there as well
04:54:11  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on issue #7133: Graphics glitch with tunnels
05:05:29  *** snail_UES_ has quit IRC
05:18:07  *** glx has quit IRC
06:15:16  <peter1138> 01:09 < Eddi|zuHause> how crazy is it to rebase a pr onto another pr?
06:15:52  <peter1138> yeah, not crazy at all.
06:24:49  <Pikka> they don't call him crazy Eddi for nothing
06:26:02  <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.
06:26:55  <peter1138> You can always request new variables, I guess.
06:27:17  <Pikka> it was a faff, but I got it working, thanks Eddi :)
06:43:28  <peter1138> GarryG manages to make a .rar file which I can't open on Linux.
06:45:20  <peter1138> Ah, I need to add the "non-free" packages :/
06:49:28  <peter1138> Hmm, an industry called "Country Village"
06:50:11  <peter1138> World map needs to be tweaked.
06: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
06:59:02  <Eddi|zuHause> also, you can't iterate over the map like we do currently if you introduce gaps after every row
06:59:04  <peter1138> I'm not going to look that up.
06:59:29  <Eddi|zuHause> peter1138: i linked it earlier, but it's a giant bitstuffing brainfuck
06:59:55  <peter1138> And I meant just as variable available to NewGRF, not changing how the game work.
07:00:17  <Eddi|zuHause> peter1138: just add two 40+ vars for X and Y then
07:00:27  *** sla_ro|master has joined #openttd
07:01:10  <Eddi|zuHause> or add builtin newgrf ops for TileX and TileY
07:01:11  <Pikka> but then all the clever nfo I just wrote would be worthless :)
07:07:31  <peter1138> And wouldn't work in previous versions.
07:08:43  <Eddi|zuHause> the way patch var 13 and tileindex works hasn't changed in forever
07:14:42  <Eddi|zuHause> git blame says the code for patch var 13 was last touched in 2008
07:15:34  <peter1138> Uh
07:15:50  <peter1138> My comment was clearly in reference to adding variables or ops.
07:16:00  <Eddi|zuHause> yes
07:17:12  <peter1138> Also it's -6
07:17:37  <peter1138> -6 deg C :/
07:18:06  <Eddi|zuHause> it seems warmer here
07:47:19  *** Thedarkb-X40 has quit IRC
08:10:12  *** andythenorth has joined #openttd
08:10:21  <peter1138> Hi
08:10:24  <andythenorth> y
08:10:26  <andythenorth> o
08:10:51  <andythenorth> I might start an NRT game soon
08:11:01  <peter1138> Should I commit nrt fixes separately, or squash them every time?
08:11:16  <andythenorth> _/\o/\_
08:11:17  <peter1138> I'm thinking separately, and then squash when we're ready later.
08:11:18  <andythenorth> dunno
08:11:22  <andythenorth> ok
08:11:35  <peter1138> Otherwise it'll get difficult to track changes, obviously.
08:11:39  <andythenorth> shows what changed recently yes
08:11:48  <andythenorth> so what we need now is an NRT nightly again
08:11:53  <peter1138> ;)
08:12:22  <peter1138> Ok, I will force-push these changes, future changes will be non-force pushed, except for rebases of course.
08:12:46  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT)
08:13:47  <peter1138> I'm also compiling with -Werror now :)
08:15:29  <andythenorth> I have so many warnings, I think that would never finish :P
08:16:02  <peter1138> It would definitely finish with -Werror, but it wouldn't complete the compile.
08:16:24  <andythenorth> yes what you said
08:16:43  <peter1138> Hmm, maybe I should set up an NRT server.
08:16:47  <peter1138> That's a good idea.
08:17:06  <peter1138> Then I don't have to worry about nightly revision compatibilies.
08:19:14  *** andythenorth has quit IRC
08:19:46  <peter1138> I see!
08:20:39  <peter1138> Oh, it compiled an ancient version. Hmm.
08:21:15  *** andythenorth has joined #openttd
08:21:21  <andythenorth> disconnected why? :P
08:21:32  <peter1138> Ah "git reset --hard origin/nrt-block" is quite simple to force an update.
08:21:45  <andythenorth> git reset --hard is my favourite command
08:21:58  <peter1138> I accidentally built an ancient version of nrt :/
08:22:01  <andythenorth> oops
08:22:13  <andythenorth> I accidentally wasn't running my "don't sleep network" app :P
08:22:14  <Eddi|zuHause> anyone remind me why we're discarding the CI builds instead of having them available to test stuff with?
08:22:28  <andythenorth> probably nobody made it do that?
08:22:47  <andythenorth> also, possibly, infosec
08:23:00  <peter1138> Eddi|zuHause, because it's not set up to do that.
08:23:00  <andythenorth> allowing binary distribution from any PR is.....curious
08: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.
08:24:19  <LordAro> i think it is one of his itches, actually
08:24:28  <peter1138> Yay, nrt-block server running!
08:24:36  <peter1138> Some NewGRFs might be useful, I suppose.
08:24:42  <LordAro> he just wants it to be "approved" first (for infosec reasons)
08:25:22  <LordAro> (the method in which it gets approved is aa yet unclear)
08:25:24  <LordAro> moin
08:26:00  <andythenorth> peter1138: add some newgrfs
08:26:11  <andythenorth> there was a Hog somewhere
08:26:40  <andythenorth> oh here
08:27:00  <andythenorth> can't get it in bananas, because no way to distribute WIP grfs :P
08:28:26  <peter1138> Hmm
08:28:30  <peter1138> Feature request!
08:31:57  <LordAro> add it to the bananas2 spec :p
08:32:53  <andythenorth> maybe I should find my Hog repo
08:32:57  <andythenorth> oof
08:33:34  <andythenorth> need to give a test case for this
08:39:55  <andythenorth> 49 warnings on compile
08:39:57  <andythenorth> 'probably fine'
08:45:05  <LordAro> the languages, probably
08:46:48  <andythenorth> mac stuff I think
08:46:59  <andythenorth> bunch of deprecation warnings
08:47:04  <andythenorth> warning about libs
08:49:12  <LordAro> ah yeah
08:49:39  <andythenorth> dunno if the azure mac build shows them
08:50:25  <LordAro> usually does
09:01:44  <peter1138> I think it does, yes.
09:01:58  <planetmaker> moin
09: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
09:02:54  <planetmaker> so if we have properly named test builds... that would be feasible
09:10:44  <Pikka> mmm, nrt
09:11:37  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes
09:11:38  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #7149: Town Y value reported by var 80 is inconsistent on different map sizes
09:12:43  <Pikka> thanks peter
09: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.
09:14:13  <peter1138> I guess the review & approve requirement can be disabled for non-master.
09:15:20  <peter1138> That auz industries NewGRF is... Hmm. The graphics are very familiar.
09:16:28  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7136: Sprite sorting issue with FIRS
09:17:52  <peter1138> Hmm, 6music, LBC or my own collection?
09:18:49  <peter1138> Ok, gone with the latter.
09: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
09:19:58  <peter1138> planetmaker, okay.
09:20:26  <peter1138> If we selectively make PR builds available, then I see no need for feature branches in the main repo.
09:21:40  <planetmaker> true, usually that won't be necessary
09: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
09:22:18  <peter1138> Yeah :)
09: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.
09:23:15  <peter1138> I mean, I guess that's what CI is for, but still.
09:23:33  <planetmaker> yeah
09: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
09:24:51  <planetmaker> and wanted-enough features. Let's say: we move it to us, when we decide that we want such feature :P
09:25:55  <peter1138> so, subsidiaries/infrastructure sharing next eh? :)
09:26:25  <planetmaker> Let's add a branch for each "yeah, that might be nice"-feature ;)
09:26:29  <LordAro> nah, timetables
09:26:38  <peter1138> We have timetables
09: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.
09:27:11  <peter1138> I mostly mean things that are already in the game but could do with tweaking.
09:27:18  <peter1138> Like the mini-map window needs some love.
09:27:36  <LordAro> 1.9 Roadmap
09:27:37  <LordAro> :p
09:27:59  <peter1138> Hmm, where is it, Wiki?
09:28:18  <LordAro> i imagine it doesn't exist at all
09:28:21  <peter1138> Oh.
09:28:30  <LordAro> don't think there's been a roadmap since 1.0
09:28:56  <peter1138> Yay, found my wiki password.
09:29:12  <peter1138> Well, I can post it to my own page I guess.
09:29:21  <LordAro> there's also a todo list page
09:30:10  * andythenorth wonders how many nml coders there are
09:30:40  <LordAro> 27
09:31:04  <peter1138>
09:31:05  <peter1138> LOL
09:31:17  <andythenorth> megalol
09:31:20  <peter1138> I wonder how much of that is implementable with NewGRF and GS these days.
09:31:31  <andythenorth> probably most
09:31:46  * andythenorth trying to figure out how to do some kind of reference.grf
09:31:58  <peter1138> This dates to 2007, when we didn't full (or any?) industry support.
09:32:14  <andythenorth> newgrf stuff, both openttd and nml kind of lacks reference cases
09:32:35  <andythenorth> means someone has to make a grf, usually a patch of their existing project
09:32:39  <peter1138>
09:32:39  <andythenorth> then distribute in forums
09:32:49  <peter1138> Quality graphics. I should make a baseset out of it.
09:33:07  <peter1138> IIRC it was done with... Sketchup, which got Googled.
09:33:47  <peter1138> NewGardens
09:33:49  <peter1138> Hmm
09:34:00  <peter1138> I think that may have been a real-world thing, haha.
09:35:57  <planetmaker> he... I guess your TC can be done *completely* in GS and NewGRf meanwhile
09:36:28  <peter1138> It wasn't even mine, I just liked the idea at the time.
09:36:44  <peter1138> And yes, I'm sure that is implemented already.
09:36:48  <planetmaker> there are such goal servers around for years
09:36:51  <peter1138> Yeah
09:36:58  <peter1138> Probably patched servers though, you know what people are like.
09:37:10  <planetmaker> maybe
09:38:03  <planetmaker> <-- he... must be
09:40:09  <peter1138> Yeah.
09:41:22  <peter1138> Why bother improving the game for everyone when you can keep your own changes and be exclusive.
09:43:26  <planetmaker> the most popular one has some stuff in proper repos
09:46:20  <peter1138> JGR's has a lot of nice stuff but it's almost impossible to disentangle.
09: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
09:49:03  <peter1138> I believe he maintains things in branches.
09:49:16  <peter1138> But with his saveload changes, it's difficult.
09:49:39  <planetmaker> yes... but I understand why he did those...
09:49:43  <planetmaker> somewhat at least
09:49:58  <peter1138> I don't mean they're bad.
09:50:07  <peter1138> Just makes things trickier to merge.
09:50:22  <peter1138> Speaking of which, I have a PR open about saveload
09:50:32  <planetmaker> yes
09:57:02  <andythenorth> saw that
10:07:41  <peter1138> Ooh my Garmin has a software update. I wonder what'll break.
10:09:06  *** sla_ro|master has quit IRC
10:09:56  <peter1138> Changes made from version 3.20 to 3.30:
10:09:56  <peter1138>     Changes to support manufacturing
10:09:57  <peter1138> Hmm
10:09:59  <peter1138> Well..
10:10:07  <peter1138> Ah, I was on 3.00
10:10:10  <peter1138> Add manual elevation calibration feature
10:10:17  <peter1138> Useful, because mine has been wrong for about a year.
10:14:03  * andythenorth still watching the steel mill film
10:14:06  <andythenorth> 5 mins at a time
10:31:33  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7147: Change: Synchronize randomness in vehicle introduction…
10: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.
10:36:15  <andythenorth> I haven't tested it, but Eddi's idea appeals
10:36:19  <peter1138> But I think that offers better control while still having randomness.
10:36:34  <andythenorth> my use case is distorted
10:36:34  <peter1138> Oh yeah game seed, so it's still random.
10:36:49  <andythenorth> I have vehicles appearing and disappearing when I reload_newgrfs
10:36:54  <andythenorth> in same savegame, PITA
10:37:45  <andythenorth> kinda want a random range prop
10:37:50  <andythenorth> signed
10:37:56  <andythenorth> or signed result :P
10:37:57  <andythenorth> hmm
10:40:35  <peter1138> How about my non-animated locks patch?
10:40:52  <peter1138> Ships stopping to go up/down instead of ... going up a water slope.
10:40:55  <andythenorth> meh
10:41:11  <andythenorth> how many ships in the lock at once?
10:41:23  <peter1138> No limit.
10:41:29  <peter1138> That's a whole other change.
10:41:36  <andythenorth> more ship nerfs? :|
10:41:40  <peter1138> Quite :/
10:41:47  <andythenorth> uphill rivers
10:42:04  <peter1138> It's not that bad, ships are already slow so it doesn't slow them that much.
10:42:11  <peter1138> Except hovercraft I guess.
10:42:33  <andythenorth> hoverzellepins
10:42:35  <peter1138>
10:42:40  <andythenorth> where is Pikka ?
10:42:41  <peter1138> So 5 years ago.
10:42:44  <peter1138> Err
10:42:45  <peter1138> So56 years ago.
10:42:47  <peter1138> Err
10:42:49  <peter1138> So 6 years ago.
10:43:04  <andythenorth> it does kind of look nice eh
10:43:16  <andythenorth> that water slope though
10:43:16  <peter1138> Could be... an option?
10:43:34  <peter1138> Hmm
10:43:37  <andythenorth> newgrf locks, state machines
10:43:57  <peter1138> How about drawing some graphics... Hmm..
10:44:15  <peter1138> Hmm, no.
10:44:20  <peter1138> That means only 1 ship at a time. :/
10:44:58  <peter1138> The cheap way to do it is to put a building in front of the slope.
10:46:16  <andythenorth> :P
10:46:22  <andythenorth> nice hax
10:56:16  <Pikka> mmm hoverzellepins
11:00:54  <andythenorth> mmm river generator
11:01:01  <andythenorth> I tried to haxor it, but it broke
11:07:59  <Heiki> (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
11:08:46  <andythenorth> I even drew sprites for that somewhere
11:09:37  <peter1138> Heiki, only in arctic, yeah? :p
11:09:51  <peter1138> ICE ROAD TRUCKERS
11:10:15  <Heiki> tropical ice road
11:10:16  <andythenorth> just make frozen lakes a thing
11:10:20  <andythenorth> and quicksand
11:10:28  <andythenorth> add a new disaster
11:10:44  <andythenorth> we don't have enough disasters
11:11:12  <peter1138> Most people turn them off?
11:11:16  <andythenorth> I do
11:11:20  <andythenorth> they're kind of lame
11:11:24  <peter1138> The UFO ones get ridiculous, the others are okay.
11:11:30  <andythenorth> maybe I turn breakdowns on again
11:11:35  <andythenorth> now they're fixed
11:11:44  <peter1138> Are they fixed?
11:12:06  <andythenorth> I haven't tested yet :D
11:12:09  <andythenorth> I hope so
11:12:55  <peter1138> Were they broken?
11:13:07  <andythenorth> RVs couldn't find depots
11:13:12  <andythenorth> pathfinder faff
11:13:19  <andythenorth> so they just broke a lot
11:13:20  <Heiki> breakdowns make things somewhat more interesting, but most disasters are plainly annoying
11:13:34  <andythenorth> reduced speed limit on ice road
11:13:46  <peter1138> Disasters are meant to keep you on your toes
11:13:58  <andythenorth> game gets quite monotonous otherwise
11:13:59  <peter1138> I wonder how AI deals with them...
11:14:06  <andythenorth> bit of micro-management is useful
11:14:13  <peter1138> Is it lunch time yet?
11:14:17  <andythenorth> ages ago
11:14:49  <andythenorth> the most excitement I get is when a train gets stuck in a PBS block
11:15:02  <andythenorth> and I build my networks all interconnected for $reasons
11:15:10  <andythenorth> so everything eventually deadlocks
11: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.
11:17:30  <peter1138> Interconnected is more funner.
11:25:01  <andythenorth> groups then
11:25:03  <andythenorth> for 2.0?
11:25:12  <andythenorth> (buy menu)
11: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.
11:27:04  <andythenorth> India Horse
11:29:27  <andythenorth> eggs?
11:31:05  <planetmaker> hm... tt-f has cert issues?
11: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
11:32:19  <planetmaker> expired 30 minutes ago
11:33:22  <andythenorth> letsencrypt?
11:39:38  <andythenorth> when I said 'eggs' I meant mostly 'butter'
11:40:53  <orudge> planetmaker: blargh, it's meant to restart nginx, but it seems doesn't
11:41:56  <orudge> Ah, no, something else has cause an issue
11:45:18  <orudge> Should be fixed now
11:45:33  <planetmaker> yay :)
11:47:07  *** Pikka has quit IRC
12:12:36  *** Samu has joined #openttd
12:22:36  *** gelignite has joined #openttd
12: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?
12:28:53  <andythenorth> can never remember that
12:29:24  <andythenorth> any answer I give is pulled out of my ass and probably wrong :P
12:29:28  <peter1138> :D
12:29:38  <andythenorth> spec seems to know
12:29:42  <peter1138> I guess the question is will any become available.
12:29:58  * andythenorth sometimes wonders if railtypes was all wrong :P
12:30:01  <andythenorth> railwrongs
12:30:29  <peter1138>  A railtype is introduced, if at least one of the following conditions is met:
12:30:34  <andythenorth> that
12:30:36  <peter1138>  The introduction date (railtype prop 17) is passed and all required railtypes (railtype prop 18) are available.
12:30:54  <peter1138> So according to that, the answer is yes.
12:31:01  <andythenorth> I am going to move the railtypes I need into Horse grf, and hope it all goes away :P
12:31:11  <andythenorth> bad behaviour
12:31:13  <peter1138> Don't be silly.
12:31:20  <peter1138> What problem do you have that you can't solve?
12:31:25  <andythenorth> none :)
12:31:31  <andythenorth> railtypes totally work for my case
12:31:34  <peter1138>  Good.
12:31:39  <peter1138> I'm talking about road/tram types, here.
12:32:03  <peter1138> It's way more likely there are no trams available because there are no default trams.
12:32:07  <andythenorth> isn't it
12:32:13  <andythenorth> will we ever fix that?
12:32:26  <peter1138> It's not a bug, so no.
12:32:26  <andythenorth> 2.0
12:32:52  <andythenorth> just make copies of the default buses that run on non-electrified tram tracks
12:32:59  <andythenorth> beep beep
12:33:28  <andythenorth> did it snow yet?
12:33:59  <peter1138> Not even then.
12:33:59  <peter1138> Nearly lunch time.
12:34:10  <andythenorth> clearly
12:35:03  <andythenorth> also this enterprise software won't make itself
12:35:04  <peter1138> Not yet.
12:35:11  <peter1138> No, no copies of default buses.
12:35:31  <andythenorth> players will just have to use terrible grfs
12:35:54  <andythenorth> or even good ones
12:36:04  <peter1138> Think of the mess it would cause loading old savegames.
12:36:31  <peter1138> You can't change NewGRFs mid game because it causes issues.
12:36:39  <peter1138> Btw lol we added some vehicles lols
12:36:54  <peter1138> I'm going to eat my salad early.
12:37:11  <andythenorth> now I am hungry :P
12:41:04  <peter1138> Hmm, it's no good, there's no protein in it.
12:44:01  <peter1138> Oh, I forgot chutney :/
12:48:46  <peter1138> Maybe we should special case it to if there are no trams then no tramtypes will become available.
12:49:01  <peter1138> Or possibly no compatible trams
12:49:02  <andythenorth> well we could
12:49:16  <andythenorth> do we still provide tramtypes by default?
12:49:30  <peter1138> only the 1, and only if trams are loaded
12:49:46  <peter1138> it's only when introduction date is used that an issue occurs
13:05:10  *** Flygon has quit IRC
13:09:32  *** snail_UES_ has joined #openttd
13:22:32  <Samu> while (bla) {
13:22:33  <Samu> or
13:22:37  <Samu> while(bla) {
13:23:32  <planetmaker> haha, andythenorth :) railtype != cargo. You're absolutely right :)
13:24:05  <andythenorth> we are ahead for once :)
13:24:08  <Samu> why is it some times with a space, and some other times without?
13:25:17  <peter1138> Samu, without for function calls, with for C/C++ keywords.
13:25:52  <peter1138> You shouldn't find a while( in our code, but it's not impossible.
13:28:11  <Samu> weird rules
13:28:28  *** snail_UES_ has quit IRC
13:29:11  <peter1138> Sensible rules.
13:32:51  <Samu> gonna PR something soon
13:32:57  <Samu> watch out
13:34:59  <peter1138> If it's a fix for a "while(" ... :D
13:35:28  <peter1138> Squirrel's code uses while(, but we can ignore that.
13:41:54  <andythenorth> lunch
13:44:33  <peter1138> Again.
13:44:42  <peter1138> Late for you?
13: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.
13:54:20  <andythenorth> anyone approved the livery UI yet? o_O
13:54:48  <andythenorth>
13:55:05  <andythenorth> review is all well and good, but at some point stuff needs to go to nightlies
13:55:12  <andythenorth> players find stuff
13:56:13  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker commented on pull request #7108: Feature: Group liveries, and livery window usability enhancements.
13:56:35  <planetmaker> meh... always I find the comment button but not the review buttn :|
13:56:39  <andythenorth> me too :D
13:56:55  <andythenorth> github quirks
13:57:01  <peter1138> You need to view changed files.
13:57:11  <peter1138> "Files changed"
13:57:20  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker approved pull request #7108: Feature: Group liveries, and livery window usability enhancements.
13:57:46  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker merged pull request #7108: Feature: Group liveries, and livery window usability enhancements.
13:58:12  <planetmaker> incredible... I need to look at code to review it :D
13: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.
13:59:09  <andythenorth> +1
13:59:11  <planetmaker> +1
13:59:30  <andythenorth> do we cut the release manually by picking selected commits still?
13:59:39  <andythenorth> or do we just tag master?
13:59:40  <planetmaker> there's also no shame really in additional fix-up commits like with the autoreplace for more cargoes
13:59:58  <planetmaker> that's a question for TB @ andy
14:00:13  <andythenorth> used to be we picked commits?
14:00:26  <andythenorth> at work we tag master, so merging broken to master is very very NO
14: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)
14:01:18  <planetmaker> and then tag from the newly-created (or existing) release branch
14:01:37  <planetmaker> before tagging the changelog etc were updated
14:01:59  <planetmaker> in the release branch. Which subsequently got merged-back into master
14:02:31  <Eddi|zuHause> <andythenorth> I have vehicles appearing and disappearing when I reload_newgrfs <- that should be gone with my change
14:02:33  <peter1138> andythenorth, broken master vs small bug that rarely happens is kinda different.
14:02:46  <peter1138> Eddi|zuHause, that's why he mentioned it.
14:03:12  <planetmaker> my suggestion is to basically keep this procedure to create release-branches and tag from there the actual releases
14:03:57  <andythenorth> no need for more change at the moment
14:04:02  <andythenorth> plenty of change to handle
14:04:16  <planetmaker> what would be the alternatives and what would/could one gain?
14:04:41  <planetmaker> an alternative is to basically not make any minor versions anymore and just regularily tag master for a release
14:04:49  <andythenorth> that basically
14:04:57  <andythenorth> whatever's in master is what ships
14:05:08  <andythenorth> it's not clearly better
14:05:13  <peter1138> Is my saveload enum change ever a big no-no or viable?
14:05:30  <peter1138> If it's viable, would be nice to have it before we merge many more savegame bumps.
14: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
14:06:05  <planetmaker> peter1138, from what I read through the patch yesterday: I like it.
14:06:16  <planetmaker> makes maintaining versions for new patches much easier
14:06:22  <Eddi|zuHause> i'd suggest merging it sooner rather than later
14:06:31  <planetmaker> and removes magic (saveload revision) numbers
14: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)
14:08:19  <Samu> this is called every tick, wondering if the code could be improved
14: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
14:09:05  <Eddi|zuHause> ... while also continuing to support loading trunk games
14:09:17  <Samu> the maybestartnewcompany could fail, right? hmm
14:10:01  <planetmaker> Eddi|zuHause, he seems to have found a solution for exactly that
14:10:38  <peter1138> planetmaker, yeah, that's the thing, but it's a major step further.
14: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
14:11:09  <peter1138> planetmaker, problem is it touches pretty much all of the saveload code again.
14:11:12  <planetmaker> absolutely, peter. A big step further. And not an alternative to your change. Just something beyond it
14:11:43  <Samu> maybestartnewcompany could return true or false
14:11:51  <Samu> for better control
14: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?
14:12:04  <peter1138> If I rebase nrt now, I'll have to do the saveload changes twice, that's all :)
14:13:01  <planetmaker> all future patches which change / add saveload settings will profit when being merged
14: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)
14:13:55  <peter1138> Everything else is pretty much search & replace.
14:15:00  <peter1138> is not -> is now
14:15:08  <peter1138> big difference heh
14: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.
14:16:34  <peter1138> But I think that is pretty rare and probably a bad thing to do.
14:16:43  <planetmaker> well. We might waste about a handful of saveload revisions. Nothing I'm scared about.
14:16:47  <peter1138> I think we'll probably have made changes before we get to 65535 revisions.
14:17:24  <peter1138> Also, I'd just like to see SLV_ROADTYPES ;)
14:17:55  <planetmaker> at the current rate we have another 600 years of saveload revisions ;)
14:18:50  <planetmaker> 6000
14:19:01  <peter1138> We actually had a few years of no bumps, or rather only bumping for a release.
14:19:15  <peter1138> We've had quite a few bumps in the past few months, however.
14:19:23  <planetmaker> if we're 10x as wasteful now, it's 600 years. Enough for me at least ;)
14:19:47  <planetmaker> our children can fix-up the saveload mess we might create
14:19:57  <peter1138> :D
14: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.
14:21:00  <peter1138> Now I need to figure out if that was deliberate or an oversight.
14:25:42  <Samu> turned maybestartnewcompany into a bool
14:26:37  <Samu> it was a void
14:27:42  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7147: Change: Synchronize randomness in vehicle introduction…
14: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
14:31:00  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker requested changes for pull request #7068: Add: smart town name first steps - #7037
14:31:13  <Eddi|zuHause> i kinda always wanted to use the "minor savegame version" instead
14:31:40  <Eddi|zuHause> which is some leftover thing from ancient times, but has been always 0 in trunk for most of the time
14:33:27  <Eddi|zuHause> just the usual response to that was "DON'T TOUCH THAT"
14:33:50  <andythenorth> bonfire
14:36:09  <peter1138> Minor doesn't really help though.
14: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.
14:36:41  *** Arveen has joined #openttd
14:37:19  <planetmaker> nothing > c++11
14:37:33  <planetmaker> that's his explicit compiler setting
14:38:21  <peter1138> Yes, we didn't require it back when I last looked :)
14:40:08  <peter1138> Hmm, problem is his saveload stuff has merges with our master.
14:40:44  <peter1138> Usual problem :(
14:40:46  *** synchris has joined #openttd
14:42:18  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #7151: Codechange: Allow AI companies start_date to be 0
14:42:31  <Samu> tada!
14:42:44  <Samu> review asap
14:43:00  <peter1138> git log --author "j.g.r" is kinda useful, though.
14:45:39  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
14:45:56  *** nielsm has joined #openttd
14:49:16  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
14:52:53  <Samu> I need a way to make sure the parameter start_date really belongs to an AI and not to a GS
14:52:59  <Samu> how would I do that?
14:53:20  <Samu> (without touching everything)
14:54:18  *** supermop_work has joined #openttd
14:54:40  <supermop_work> yo
14:54:45  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
14:55:17  <peter1138> I thought GS didn't have start_date as a parameter?
14:55:38  *** supermop_work_ has joined #openttd
14:56:15  <Samu> they can have it
14:56:22  <Samu> i tried yesterday with glx
14:56:36  <peter1138> Also, does C++ allow runtime checking of types? I can't remember, I'm used to C# :D
14:56:47  <peter1138> Cos you use AIConfig for AIs, and GameConfig for GS
14:56:56  <peter1138> You could at least initialise is_ai based on that.
14:57:01  <peter1138> Or
14:57:14  <peter1138> Have a virtual method in each that returns true/false depending.
14:57:29  <peter1138> Similar to how our drivers return static values.
14:57:32  <milek7>
14:57:35  <peter1138> if this->is_ai
14:57:44  <peter1138> Then it would not need passing around everywhere
14:59:00  <peter1138> milek7, Hmm, not clear how to do "typeid(x) is AIConfig"
14:59:44  <peter1138> Seems the examples only compare one instance to another, rather than just a type.
14:59:57  <milek7> maybe typeid(x) == typeid(AIConfig)
15:02:09  <Samu> a GS author can create a start_date parameter with description = ""
15:02:30  <Samu> openttd picks it up
15:02:35  <peter1138> if (typeid(this) == typeid(AIConfig *))
15:02:35  <peter1138> Ooh.
15:02:41  *** supermop_work has quit IRC
15:03:00  <peter1138> So you could drop ALL the is_ai crap and use that condition.
15:03:05  <peter1138> #include <typeinfo>
15:03:26  <peter1138> If that's a no-go, then using virtual overrides is a nicer solution.
15:03:41  <peter1138> is_ai is just cruft that, especially passing it around everywhere.
15:04:30  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
15:05:18  *** glx has joined #openttd
15:05:18  *** ChanServ sets mode: +v glx
15:06:13  *** sla_ro|master has joined #openttd
15:07:53  <Samu> identifier AIConfig is undefined :|
15:08:02  <Samu> typeid(this) == typeid(AIConfig *)
15:08:27  <peter1138> Huh.
15:08:29  <Samu> gonna try building
15:08:35  <Samu> see if it's just intellisense being dumb
15:10:19  <Samu> well, it built
15:10:28  <Samu> let's see what the breakdown do in that part
15:10:52  <peter1138> Patch should be a lot smaller with that :-)
15:11:03  <peter1138> If it works.
15:11:45  <Samu> ‡		type_info::operator== returned	false	bool
15:11:49  <Samu> boo
15: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
15:14:49  <Samu> ‡		__std_type_info_compare returned	1	int
15:14:54  <Samu> returned 1
15:15:03  <Samu> 1 == 0 is false
15:15:06  <Samu> returns false
15:15:07  <Samu> why
15:15:21  <peter1138> Can you output typeid(this).name and typeid(AIConfig *).name
15:15:30  <milek7> just guessing, but maybe typeid(*this) == typeid(AIConfig)
15:15:31  <peter1138> maybe typeid(this) returns ScriptConfig *
15:15:48  <peter1138> milek7, maybe!
15:16:00  <Samu> let' seee
15:16:37  <peter1138> milek7, very good point.
15:17:14  <peter1138> Also try "typeid(this) == typeid(AIConfig)" but you'd need to include headers for aiconfig then.
15:17:32  <peter1138> Probably no problem.
15:17:57  <glx> including headers of the derived class in the base class ?
15:18:11  <peter1138> I know :/
15:18:28  <Samu> typeid(*this) == typeid(AIConfig) - error C2027: use of undefined type 'AIConfig'
15:18:33  <glx> maybe just a minimal forward declaration of the derived class
15:18:34  <Samu> doesnt build
15:18:38  <peter1138> "but you'd need to include headers for aiconfig then."
15:18:52  <Samu> where is
15:19:00  <Samu> hmm wait
15:19:02  <peter1138> glx, hmm. It's not a pointer though, so I don't think so.
15:20:11  <Samu> ah, included it
15:20:14  <Samu> it builds now, let's see
15:20:18  <peter1138> this->SetSetting((*it).name, is_ai && StrEmpty((*it).description) && strcmp((*it).name, "start_date") ? r : (value != 0) ? max(1, r) : 0);
15:20:28  <peter1138> You know
15:20:31  <peter1138> Come to think of it
15:20:36  <peter1138> That whole line is pretty horrible :p
15:21:03  <peter1138> Why can't it be 0 there?
15:21:30  <andythenorth> planetmaker: fancy cleaning up forum stickies a little bit? o_O
15:21:38  <Samu> yees!!! it works
15:21:40  <Samu> returned 0
15:21:44  <Samu> 0 == 0 is true
15:21:48  <Samu> thx
15:22:27  <Samu> i want random deviation to occur for dates 1-3600
15:22:32  <Samu> but not for 0
15:23:03  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
15:23:14  <peter1138> Samu, yes, but that's not what this particular line is handling.
15:23:50  <peter1138> Bah, I misread the old line :p
15:23:58  <peter1138> So it always sets a random start date.
15:24:47  <peter1138> if random_deviation is 0 it won't do the setting.
15:24:55  <peter1138> if start_date is 0 is random_deviation not 0?
15:26:21  <glx> by default it's 60 for start_date, but it should be possible to change that before setting the start_date
15:26:28  <Samu> gonna make it clearer to read
15:27:08  <andythenorth> hmm
15:27:30  <glx> this->ClearConfigList(); <-- this line will reset all start_date elements but keep the start_date value
15:27:37  <andythenorth> manually set buy + run costs for 286 trains?
15:27:47  <peter1138> andythenorth, yes, that's normal.
15:27:51  <andythenorth> or continue using an algorithm which doesn't give results I want :P
15:27:55  <andythenorth> very labour saving
15:27:58  <andythenorth> but wrong
15:28:07  <peter1138> andythenorth, add some random_deviation
15:28:18  <andythenorth> on compile?
15:28:22  <andythenorth> every release is slightly different?
15:29:02  <peter1138> :D
15:29:14  <Samu> strcmp((*it).name, "start_date") this is the confusing function
15:29:21  <peter1138> Use action 6 to set it based on game seed!
15:29:30  <peter1138> strcmp is not confusing
15:29:35  <Samu> returns 0 when it's start_date
15:29:37  <peter1138> yes
15:29:42  <peter1138> That's what strcmp does.
15: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.
15:30:56  <glx> strcmp("a", "b") returns -1
15:31:13  <glx> strcmp("b", "a") returns 1
15:31:22  <glx> very simple to understand
15:31:31  <Samu> if (typeid(*this) == typeid(AIConfig) && StrEmpty((*it).description) && strcmp((*it).name, "start_date")) {
15:31:50  <glx> missing !
15:31:50  <Samu> if is ai config, description is empty and not a start_date
15:31:58  <Samu> use r
15:32:02  <glx> ah right then
15:32:39  <andythenorth> oof BBL
15:32:40  *** andythenorth has left #openttd
15:32:42  <planetmaker> andythenorth, later tonight maybe
15:33:03  <glx> but just checking for "start_date" should be enough, as only AIs have "start_date"
15:33:09  <Samu> i think it's correct the way I have, but very confusing
15:33:19  <Samu> because of that strcmp
15:33:32  *** Jortuny has joined #openttd
15:34:14  *** strawbs89 has joined #openttd
15:35:18  <peter1138> glx, indeed.
15:35:38  <Samu> maybe strcmp((*it).name, "start_date") != 0 would be less confusing?
15:36:01  <peter1138> (value != 0) ? max(1, r) : 0)
15:36:03  <peter1138> Hmm
15: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
15:36:15  <peter1138> I see.
15:36:26  <planetmaker> why... do AIs need to start at day 0 instead of 1? Just to piss-off the player? :P
15:36:42  <Samu> to make them all compete fairly
15:36:43  <peter1138> planetmaker, day 0 is a special case
15:36:50  <planetmaker> for...?
15:36:56  <Samu> ai competitions
15:36:58  <peter1138> planetmaker, makes it start with no randomization added
15:37:04  <peter1138> I can understand that
15:37:04  <glx> strawbs89: ECS industries require very specific lands, there's a wiki showing that somewhere
15:37:31  <strawbs89> oh brill glx could you link me please
15:38:24  *** ChanServ sets mode: +v DorpsGek
15:38:24  *** ChanServ sets mode: +v planetmaker
15:38:24  *** ChanServ sets mode: +v orudge
15:38:53  <glx>
15:38:59  <planetmaker> is there any randomness with AI dates? I thought that was only with vehicle introduction dates
15:39:09  <strawbs89> oh ta fella thats great
15:40:29  <glx> start_date + (rand(60 * 2) - 60)
15:46:38  *** gelignite has quit IRC
15:46:38  *** Vasatko has quit IRC
15:46:38  *** Lejving_ has quit IRC
15:46:38  *** FLHerne has quit IRC
15:46:38  *** luaduck has quit IRC
15:46:38  *** techmagus has quit IRC
15:46:38  *** MasseR has quit IRC
15:46:38  *** milek7 has quit IRC
15:46:39  *** Yotson has quit IRC
15:46:39  *** urdh has quit IRC
15:46:39  *** DorpsGek has quit IRC
15:46:39  *** acklen has quit IRC
15:46:39  *** AKTheKnight has quit IRC
15:46:39  *** k-man has quit IRC
15:46:39  *** reldred has quit IRC
15:46:39  *** ToBeFree has quit IRC
15:46:40  *** Jortuny has quit IRC
15:46:40  *** supermop_work_ has quit IRC
15:46:40  *** Laedek has quit IRC
15:46:40  *** Gustavo6046 has quit IRC
15:46:40  *** cHawk has quit IRC
15:46:40  *** Extrems has quit IRC
15:46:40  *** rocky11384497 has quit IRC
15:46:40  *** quiznilo has quit IRC
15:46:40  *** colde has quit IRC
15:46:40  *** ccfreak2k has quit IRC
15:46:41  *** jinks has quit IRC
15:46:41  *** ST2 has quit IRC
15:46:41  *** ttech2 has quit IRC
15:46:41  *** mikegrb has quit IRC
15:46:41  *** nnyby has quit IRC
15:46:41  *** dwfreed has quit IRC
15:46:41  *** greeter has quit IRC
15:46:41  *** innocenat_ has quit IRC
15:46:42  *** murr4y has quit IRC
15:46:42  *** duncan has quit IRC
15:46:42  *** synchris has quit IRC
15:46:42  *** Smedles has quit IRC
15:46:42  *** daspork has quit IRC
15:46:42  *** APTX has quit IRC
15:46:42  *** strawbs89 has quit IRC
15:46:42  *** heffer has quit IRC
15:46:43  *** Vadtec has quit IRC
15:46:43  *** Antheus has quit IRC
15:46:43  *** nielsm has quit IRC
15:46:43  *** Arveen has quit IRC
15:46:43  *** Samu has quit IRC
15:46:43  *** debdog has quit IRC
15:46:44  *** Eddi|zuHause has quit IRC
15:46:44  *** WWacko1976-work has quit IRC
15:46:44  *** Taede has quit IRC
15:46:44  *** crem2 has quit IRC
15:46:44  *** dihedral has quit IRC
15:46:44  *** guru3 has quit IRC
15:46:44  *** Mek has quit IRC
15:46:44  *** fonsinchen has quit IRC
15:46:45  *** Yexo has quit IRC
15:46:45  *** gnu_jj_ has quit IRC
15:46:45  *** SmatZ has quit IRC
15:46:45  *** planetmaker has quit IRC
15:46:45  *** V453000 has quit IRC
15:46:46  *** ericnoan has quit IRC
15:46:46  *** Sacro has quit IRC
15:46:46  *** SpComb^ has quit IRC
15:46:46  *** Ammler has quit IRC
15:46:46  *** TrueBrain_ii has quit IRC
15:46:46  *** glx has quit IRC
15:46:46  *** Mahjong has quit IRC
15:46:46  *** KenjiE20 has quit IRC
15:46:47  *** Xaroth has quit IRC
15:46:47  *** ZirconiumX has quit IRC
15:46:47  *** Mazur has quit IRC
15:46:47  *** DorpsGek_II has quit IRC
15:46:47  *** orudge has quit IRC
15:46:47  *** Westie has quit IRC
15:46:48  *** Alkel_U3 has quit IRC
15:46:48  *** kgz has quit IRC
15:46:48  *** argoneus_ has quit IRC
15:46:48  *** seatsea has quit IRC
15:46:48  *** m1cr0man has quit IRC
15:46:48  *** berndj has quit IRC
15:46:48  *** _dp_ has quit IRC
15:46:48  *** juzza1 has quit IRC
15:46:48  *** LordAro has quit IRC
15:46:48  *** Hobbyboy has quit IRC
15:46:48  *** grossing has quit IRC
15:46:48  *** peter1138 has quit IRC
15:51:54  *** strawbs89 has joined #openttd
15:51:55  *** Jortuny has joined #openttd
15:51:55  *** glx has joined #openttd
15:51:55  *** supermop_work_ has joined #openttd
15:51:55  *** nielsm has joined #openttd
15:51:55  *** synchris has joined #openttd
15:51:55  *** Arveen has joined #openttd
15:51:55  *** gelignite has joined #openttd
15:51:55  *** Samu has joined #openttd
15:51:55  *** debdog has joined #openttd
15:51:56  *** Eddi|zuHause has joined #openttd
15:51:56  *** Laedek has joined #openttd
15:51:56  *** WWacko1976-work has joined #openttd
15:51:56  *** Smedles has joined #openttd
15:51:56  *** Vasatko has joined #openttd
15:51:56  *** APTX has joined #openttd
15:51:56  *** Lejving_ has joined #openttd
15:51:56  *** Gustavo6046 has joined #openttd
15:51:56  *** FLHerne has joined #openttd
15:51:57  *** luaduck has joined #openttd
15:51:57  *** Taede has joined #openttd
15:51:57  *** Mahjong has joined #openttd
15:51:57  *** KenjiE20 has joined #openttd
15:51:57  *** techmagus has joined #openttd
15:51:57  *** crem2 has joined #openttd
15:51:57  *** cHawk has joined #openttd
15:51:57  *** daspork has joined #openttd
15:51:57  *** Xaroth has joined #openttd
15:51:57  *** ZirconiumX has joined #openttd
15:51:58  *** dihedral has joined #openttd
15:51:58  *** Mazur has joined #openttd
15:51:58  *** DorpsGek_II has joined #openttd
15:51:58  *** MasseR has joined #openttd
15:51:58  *** guru3 has joined #openttd
15:51:58  *** milek7 has joined #openttd
15:51:58  *** Mek has joined #openttd
15:51:58  *** Yotson has joined #openttd
15:51:58  *** acklen has joined #openttd
15:51:59  *** Extrems has joined #openttd
15:51:59  *** urdh has joined #openttd
15:51:59  *** heffer has joined #openttd
15:51:59  *** AKTheKnight has joined #openttd
15:51:59  *** DorpsGek has joined #openttd
15:51:59  *** fonsinchen has joined #openttd
15:51:59  *** Yexo has joined #openttd
15:51:59  *** gnu_jj_ has joined #openttd
15:51:59  *** k-man has joined #openttd
15:52:00  *** sets mode: +vov glx DorpsGek DorpsGek
15:52:00  *** reldred has joined #openttd
15:52:00  *** ToBeFree has joined #openttd
15:52:00  *** dwfreed has joined #openttd
15:52:00  *** nnyby has joined #openttd
15:52:00  *** jinks has joined #openttd
15:52:00  *** rocky11384497 has joined #openttd
15:52:00  *** greeter has joined #openttd
15:52:00  *** quiznilo has joined #openttd
15:52:01  *** innocenat_ has joined #openttd
15:52:01  *** ttech2 has joined #openttd
15:52:01  *** mikegrb has joined #openttd
15:52:01  *** ccfreak2k has joined #openttd
15:52:01  *** duncan has joined #openttd
15:52:01  *** ST2 has joined #openttd
15:52:01  *** colde has joined #openttd
15:52:01  *** murr4y has joined #openttd
15:52:01  *** Antheus has joined #openttd
15:52:02  *** Vadtec has joined #openttd
15:52:02  *** SmatZ has joined #openttd
15:52:02  *** planetmaker has joined #openttd
15:52:02  *** V453000 has joined #openttd
15:52:02  *** ericnoan has joined #openttd
15:52:02  *** orudge has joined #openttd
15:52:02  *** sets mode: +ovov planetmaker planetmaker orudge orudge
15:52:02  *** SpComb^ has joined #openttd
15:52:02  *** argoneus_ has joined #openttd
15:52:02  *** Sacro has joined #openttd
15:52:03  *** Ammler has joined #openttd
15:52:03  *** TrueBrain_ii has joined #openttd
15:52:03  *** Hobbyboy has joined #openttd
15:52:03  *** kgz has joined #openttd
15:52:03  *** Alkel_U3 has joined #openttd
15:52:03  *** seatsea has joined #openttd
15:52:03  *** peter1138 has joined #openttd
15:52:03  *** m1cr0man has joined #openttd
15:52:03  *** juzza1 has joined #openttd
15:52:04  *** grossing has joined #openttd
15:52:04  *** LordAro has joined #openttd
15:52:04  *** berndj has joined #openttd
15:52:04  *** Westie has joined #openttd
15:52:04  *** _dp_ has joined #openttd
15:52:04  *** sets mode: +ov peter1138 peter1138
15:52:22  *** WWacko1976-work has quit IRC
15:53:49  <peter1138> He's worried that a game script might use a setting called "start_date"
15:54:01  <glx> but that can't happen
15:54:04  <peter1138> ^
15:54:23  <glx> at worse we can prevent it in AddSettings
15:54:24  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7114: NPF bails out when source tile is also a destination tile
15:54:41  <glx> even AI should not create this setting themselves
15:54:43  <planetmaker> and... would it matter? A GS wanting to start an AI is a totally legit action, is it?
15:55:04  <planetmaker> but it just needs to call like 'start_ai' and then it starts. No questions asked
15:55:08  <Samu> im not sure GS's can start companies themselves
15:56:12  <Samu> doesn't seem like they can, but i'm not too familiar with GS'es
15:56:58  <Samu> their api
15:58:05  <planetmaker> indeed I don't see that in the API description. Sad :)
15:59:39  <glx> seems it cannot remove company either ;)
15:59:46  <peter1138> Well, we don't need GS improvements, we just need to allow AIs to cheat!
15:59:54  <planetmaker> also sad
16:00:10  <Samu> hehe
16:00:18  <planetmaker> I wonder whether you're serious or not, peter :)
16:00:29  <Samu> 		/* allow multiple AIs to possibly start in the same tick */
16:00:29  <Samu> 		} while (AI::GetStartNextTime() == 0);
16:00:34  <Samu> good enough comment?
16:00:37  <peter1138> planetmaker, we had an argument here a couple of days ago where someone wanted to allow the AI to cheat.
16:00:47  <peter1138> "because players can"
16:00:52  <planetmaker> he
16:01:07  <planetmaker> well... Add a AI-cheat gamescript :)
16:01:19  <planetmaker> the GS can cheat money to the AI and so on
16:01:31  <peter1138> The other argument was GS was useless because you can only have 1 of them
16:01:52  <planetmaker> well... I am still not sure I actually like the "only one GS" approach
16:02:01  <planetmaker> I can see benefit in both answers
16:02:12  <peter1138> Yes, same.
16:02:44  <peter1138> So it was a guy wanting to let AIs cheat, fighting against us saying "improve GS instead"
16:02:58  <peter1138> fun :D
16:03:04  <planetmaker> sounds fun
16:04:03  <planetmaker> but really... a GS should be able to invoke an AI company. And to delete one either at its own discretion
16:04:05  <glx> and it's possible to have more than 1 GS anyway, just merge them
16:04:14  <planetmaker> Scenarious would definitely profit from such functionality
16:04:41  <Samu> adding comments is not my specialty :|
16:04:53  <planetmaker> glx, yes... but "just merge them" is easier said than done and makes composition of nice stuff like with newgrfs impossible
16:04:55  <Samu> ok, gonna submit again
16:05:31  <Samu> must rebase -i and fixup
16:05:39  <Samu> grr
16:06:00  *** Wormnest has joined #openttd
16:06:22  <planetmaker> e.g. with NewGRFs I choose my favourite station, vehicle and industry and objects newgrfs - and combine them modularily
16:07:10  <planetmaker> with GS I cannot choose a citybuilder GS and combine that with a "random disasters" GS
16:07:23  <Samu> the currently selected base graphics set is missing 4 sprites? what?
16:08:40  <glx> group liveries in master Samu
16:09:44  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0
16:10:17  <Samu> changed the order of that check, hope i didn't break it lol
16:10:44  <Samu> i probably broke it
16:10:57  <Samu> will check later
16: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
16:11:36  <planetmaker> strawbs89, depends probably on what that error is. My crystal ball is sadly broken for decades
16:13:33  <strawbs89> this is what im getting fatal newgrf error
16:14:06  <planetmaker> then obviously that NewGRF doesn't work
16:14:20  <strawbs89> ok which one does
16:14:31  <planetmaker> and it will probably tell you which and why it does
16: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
16:15:35  <strawbs89> i typed that url in and its giving me an error for that page
16:17:53  <planetmaker> Indeed. You should tell the author of that NewGRF.
16:18:59  <strawbs89> see  404 not found
16:20:15  <glx> is mixing FIRS and ECS supported ?
16:20:29  <planetmaker> not at all
16:20:59  <planetmaker> if you simply removed the mutual exclusion checks, the industries and cargoes would simply explode
16:21:43  <strawbs89> but when you goto the online content downloader theres two town vectors
16:22:04  <glx> <-- try this one
16:22:50  <planetmaker> is the better URL
16:22:58  <glx> indeed
16:23:25  <glx> and
16:23:27  <planetmaker> I know no or very few NewGRF which has a nicer documentation. Maybe ECS has similar
16:23:41  <planetmaker> but not auto-generated from source :P
16:25:13  <glx> so I guesse ECS Town is disabled by FIRS
16:25:27  <planetmaker> it probably disables itself
16:25:39  <planetmaker> or FIRS disables itself. Whatever gets the first try
16:25:57  <glx> anyway it's not really an error
16:26:04  <glx> works as intended
16:26:07  <planetmaker> but... the first answer in forums was already "do not use both NewGRF"
16:32:02  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
16:38:04  <peter1138> Yeah as glx says, I'm sure it could be a lot simpler
16:38:11  <peter1138> No need to do any of the typeid checking.
16: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.
16:40:30  <glx> indeed, like it's done for AIConfig::GetSetting(const char *name)
16:40:59  <glx> there it does special treatment for start_date
16: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
16:42:40  <glx> clean and easy
16:42:49  <Samu> back
16:43:13  <Samu> got this atm
16:43:17  <Samu> horizontal coding
16:43:57  <planetmaker> you really like long and complex conditions
16:45:15  <Samu> becomes shorter, less repetitive :(
16:45:35  <planetmaker> but read what was said here above
16:45:38  <Samu> this->GetSetting((*it).name) still repeats
16:46:06  <Samu> what's a virtual override?
16:47:29  <glx> check ScriptConfig::GetSetting(), ScriptConfig::SetSetting(), AIIConfig::GetSetting() and AIConfig::SetSetting()
16:49:01  <glx> you can do something similar for AddRandomDeviation()
16:51:13  <glx> I even wrote the algo 2 lines before your "back"
16:52:36  <Samu> what about game_script.cpp? it doesn't have these
16:52:45  <glx> doesn't need it
16:53:12  <glx> GameConfig just use ScriptConfig
16:53:44  <glx> it's the magic of objects :)
16:54:18  <Samu> too magic i can't even see what happens
16: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
16:57:33  <glx> and if you can still call the parent function from the child function if needed
16:58:01  <glx> like it's done in GetSetting() and SetSetting()
16:58:29  <Samu> hmm let's see
16:58:44  <Samu> 	/* virtual */ void AddRandomDeviation();
16:58:51  <Samu> virtual is just the comment
16:59:19  <glx> in ai_config.cpp yes, it's just a reminder
16:59:43  <glx> but the base class must have the virtual keyword
17:02:44  <Samu> where is the virtual keyword?
17:04:01  <Samu> ah found it
17:04:10  <Samu> in script_config.hpp
17: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
17:04:34  <Samu> virtual void AddRandomDeviation();, like this
17: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.
17:06:08  <Samu>  error C3861: 'InteractiveRandomRange': identifier not found
17:06:11  <Samu> orly?
17:06:34  <Samu> in ai_config.cpp it doesn't find
17:06:41  <glx> you don't need it there anyway
17:06:53  <Samu> how come?
17:07:17  <glx> get start_date value, call parent AddRandomDeviation(), set start_date to 0 if it was 0
17:07:51  <Samu> ah
17:08:05  <Samu> ah, i need to call the origial one yet?
17:08:08  <Samu> hmm ok
17:08:09  <glx> parent  AddRandomDeviation() will change start_date but you don't really care
17:08:34  <Samu> i thought i would set it up right here
17:08:37  <glx> of course you need to call it, there are other settings than start_date
17:08:46  <Samu> ah, i see
17:10:02  *** keoz has joined #openttd
17:12:31  <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:18:00  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:20:51  *** Tirili has joined #openttd
17:21:27  <planetmaker> "The commit history should as far as possible contain logical changes, rather than read as a developer diary." <-- nicely worded
17:25:15  <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:27:47  <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:33:17  <Samu> can't do this ScriptConfigItemList::const_iterator it = NULL;
17:33:35  <Samu> can't set it to NULL, then what is the default value?
17:33:42  <glx> where do you need that ?
17:34:17  <Samu>
17:34:40  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:34:43  <glx> you are again overthinking
17:34:50  <glx> check AIConfig::ClearConfigList()
17:35:26  <glx> you just need something like that, with an extra ==0 test before the end Set call
17:35:34  <Samu> ah
17:35:58  <Samu> easier than expected
17:36:42  <glx> you get the value, random change it, you fix it if needef
17:36:49  <glx> *needed
17:37:10  <glx> can't be easier than that
17:41:38  <Samu> it is assuming start_date parameter already exists
17:41:48  <glx> it does
17:41:53  <glx> all AIs have it
17:42:04  <glx> it's an internal settings auto added
17:42:06  <Samu> i've had troubles dealing with that
17:42:15  <Samu> sometimes it doesn't exist
17:42:30  <Samu> it has to be added
17:42:35  <Samu> let's see what happens
17:42:46  <nielsm> then those "sometimes" have to be quantified, when it that actually?
17:42:58  <nielsm> try assuming it exists and just add an assert that fails if it doesn't
17:43:09  <nielsm> if that assert triggers, then it's time to investigate why
17:43:17  *** Progman has joined #openttd
17:43:30  <glx> only time it doesn't exist means there's no script info, and that's handled by GetSetting
17:43:35  <Samu> for my ai gui big patch, i had many situations where it didn't yet exist
17:44:09  <DorpsGek_II> [OpenTTD/OpenTTD] flitzpiepe commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:44:43  <Samu> for example, let me find...
17:45:11  <glx> but the GUI works mainly with ScriptConfig, not AIConfig
17:45:40  <glx> you need to cast for it to properly handle start_date
17:45:50  <Samu>
17:45:56  <Samu> here, when AI is stopped
17:46:13  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7145: TBTR 2.0 (Template-based Train replacement)
17:46:25  <Samu> the config slot won't have start_date yet, unless i do that Change(NULL) right there
17:46:58  <glx> not a problem
17:46:59  <Samu> an AI that is a random AI
17:47:08  <Samu> the others are fine
17:47:23  <glx> as said AIConfig::GetSetting handle that
17:48:21  <Samu> well, on master the window is closed
17:49:29  <Samu> i guess it won't get into a crash
17:49:33  <glx> and as said GUI works with ScriptConfig, you need to cast to AIConfig if you want special start_date handling
17:52:26  *** HerzogDeXtEr has joined #openttd
17:53:16  <Samu> ah, there's an assert in GetSettings
17:53:43  <glx> yes only valid setting when no info is start_date
17:53:53  <Samu> ok, it was exactly that damn assert where i was having crashes
17:54:17  <glx> because you tried to get a different setting
17:54:33  <glx> start_date is not a problem, it works
17:54:37  <Samu> no, because it was not existing yet
17:54:49  <Samu> Change(NULL) creates it
17:55:05  <glx> you fail to understand the code
17:55:32  <glx> assert(strcmp("start_date", name) == 0); <-- that means if name is not "start_date" then crash
17:55:34  <Samu> well, i dunno, change(null) solved it
17:56:09  <glx> start_date was not the problem
17:56:40  <glx> and Change(NULL) doesn't create start_date at all
17:57:00  <Samu> it does, i am sure it does
17:57:02  <glx> if removes the info
17:57:23  <glx> I'm quite sure it doesn't add any setting
17:58:21  <glx> NULL name means NULL info, NULL info means no settings
17:58:34  <Samu> NULL is the name
17:58:48  <glx> just follow the code in Change()
17:59:04  <Samu> void ScriptConfig::Change(const char *name, int version, bool force_exact_match, bool is_random)
17:59:31  <Samu> if (this->config_list != NULL) this->PushExtraConfigList();
17:59:40  <glx> and the line above
17:59:42  <Samu> it's this thing that puts the start_date into it
17:59:52  <glx> this->config_list = (info == NULL) ? NULL : new ScriptConfigItemList();
18:00:02  <glx> config_list is NULL
18:00:11  <glx> so no PushExtra
18:01:13  <glx> btw some this-> are missing in this function ;)
18:01:54  <Samu> i can help u trigger a crash because of that missing start_date
18:02:09  <glx> the code is clear, no name = no info and no config
18:02:16  <Samu>
18:02:25  <Samu> rename to InvalidateWindowData
18:02:34  <Samu> then have the AI Settings window open
18:02:41  <Samu> let a random ai start
18:02:48  <Samu> then kill it
18:02:56  <Samu> click reset button = crash
18:04:17  *** strawbs89 has quit IRC
18:04:45  <glx> but that's because it's using a wrong config
18:05:08  <glx> the problem is on the GUI side
18:05:24  <glx> not AIConfig
18:06:13  <Samu> I suppose I agree
18:07:06  <Samu> Change(NULL) has to be put somewhere though
18:07:17  <glx> yes to reset the config
18:07:43  <glx> and return to the randomAI one
18:08:19  *** andythenorth has joined #openttd
18:08:34  *** Thedarkb-T60 has joined #openttd
18:09:43  <andythenorth> well
18:10:22  <glx> when a randomAI starts, the config is changed to the started AI
18:11:12  <glx> setting is_random
18:11:34  <glx> so when it stops you have to set it back to random
18:12:21  <glx> and that's exactly what you did
18:13:27  * andythenorth nap time?
18:13:29  * peter1138 returns.
18:13:34  <peter1138> No, it's NRT TIME
18:14:03  <andythenorth> oic
18:14:19  <andythenorth> it might still be enterprise software time for me
18:14:35  <andythenorth> do I really want to read the html validator results at 18.15?
18:14:59  <nielsm> ugh html validation
18:15:11  <nielsm> I haven't done that in maybe 15 years?
18:15:24  <nielsm> (probably stopped caring)
18:15:27  <andythenorth> yours always validates? o_O
18:15:47  *** Wormnest has quit IRC
18:16:01  <nielsm> (today at work I wrote javascript that generates combined line and bar graphs in svg)
18:16:23  <andythenorth> o_O
18:16:59  *** cHawk has quit IRC
18:17:18  <peter1138> I don't bother validating HTML these days because writing correct HTML is so simple... ;)
18: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)
18:17:40  <peter1138> (Unless you're a WordPress theme developer, in which case...)
18:17:51  <peter1138> Right, what am I working on tonight?
18:17:54  <nielsm> (and also they can never be coaxed to lay out things how I actually want it)
18:18:12  <supermop_work_> nrt
18:18:36  <peter1138> Good idea!
18:18:58  <andythenorth> multi-stop-road-vehicle-docks
18:19:04  <andythenorth> where the vehicles get on ferries
18:19:24  <peter1138> No, nrt.
18:19:30  <peter1138> But docks are in my list.
18:19:37  <peter1138> There may be patches to steal for that :D
18:20:36  <andythenorth> snow for roads?
18:20:39  <andythenorth> with snowploughs?
18:20:47  * andythenorth had an evil idea
18:20:52  <peter1138> New road type: Snow.
18:21:08  <peter1138> Vehicle comes along and changes the roadtype behind it.
18:21:16  <peter1138> How about... no, but... hah.
18:21:18  <andythenorth> my idea was the same but different :P
18:21:26  <andythenorth> store a wear factor
18:21:39  <peter1138> Might have space.
18:21:42  <andythenorth> do a statistical count of vehicles passing over each tile
18:21:46  <andythenorth> or something
18:21:54  <andythenorth> some vehicles have negative wear :P
18:21:58  <andythenorth> expose it to newgrf
18:22:04  *** Gja has joined #openttd
18:22:05  <glx> then holes on the road limiting speed ?
18:22:10  <andythenorth> holes on the road
18:22:13  <andythenorth> worn out rail track
18:22:21  <andythenorth> snow increases or removes
18:22:28  <andythenorth> adjust speed limit accordingly :P
18:22:28  <peter1138> So you have to buy and run road-maintenance vehicles.
18:22:35  <andythenorth> dredging sea lanes
18:22:37  <peter1138> o_O
18:22:41  <andythenorth> yeah
18:22:47  <andythenorth> it's totally dumb
18:22:50  <peter1138> Yes
18:22:50  <andythenorth> but might be fun
18:22:59  <nielsm> how much precision do you want per tile, 8 or 16 bit?
18:23:00  <andythenorth> utterly stupid, but might look really good
18:23:07  <nielsm> (it's going to be expensive)
18:23:12  <nielsm> (in storage)
18:23:14  <peter1138> nielsm, just add a couple of 64 bit ints.
18:23:16  <andythenorth> it doesn't need much precision
18:23:36  <andythenorth> I tried to work out if we could build the graph of nodes (junctions) and edges
18:23:44  <andythenorth> then apply same wear factor to all tiles in the edge
18:23:50  <andythenorth> but eh, andythenorth :(
18:23:56  <andythenorth> stick to pixels :P
18:24:12  <Samu> oh crap, i keep forgetting my ai does reset the config immediately to random ai state
18:24:13  <andythenorth> or enterprise software
18:24:20  <Samu> master doesn't do that
18:24:21  <peter1138> Pixels.
18:24:24  <peter1138> Hmm, so.
18:24:39  <peter1138> No trams loaded, yet tram tracks are available. What now?
18:24:43  <Samu> it leaves it with the old random ai config that died
18:24:43  * andythenorth wants a new command, git hmm
18:24:51  <andythenorth> peter1138: delete it all? :P
18:25:04  <andythenorth> or more seriously
18:25:17  <andythenorth> what daft condition causes them to be available?
18: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
18:25:46  <Samu> i remember now
18:25:59  <andythenorth> does jenkins hate me?
18:25:59  <andythenorth> yes
18:26:08  <peter1138> andythenorth, introduction date for road types.
18:26:15  <peter1138> Which is why I was talking about that earlier.
18:26:27  <andythenorth> who set the intro date on the grf?
18:26:27  <peter1138> introduction date doesn't care if there are no vehicles available for it.
18:26:35  <andythenorth> blame the author?
18:26:44  *** Thedarkb-T60 has quit IRC
18:26:46  *** Thedarkb-T60 has joined #openttd
18:26:48  <peter1138> The feature is there, so...
18:26:53  <peter1138> I think it's fine.
18:26:59  <peter1138> It's a misconfigured game.
18:27:07  <peter1138> It is as least working better with my latest change.
18:27:17  <peter1138> Before that, the menu worked but the toolbar closed itself instantly.
18:27:21  <andythenorth> oof
18:27:21  <peter1138> > bad UI
18:27:30  <glx> disable in menu like rails without available engines ?
18:27:30  <andythenorth> naughty step
18:28:23  <peter1138> glx, even with introduction dates on the rails?
18:28:48  <Samu> ok, i'm gonna trust glx that this won't crash on master
18:28:48  <glx> no checked
18:29:37  * andythenorth waits for staging to update
18:30:28  <andythenorth> peter1138: specs say it's OR for conditions
18:30:35  <andythenorth> so yeah, it should be available
18:30:38  <andythenorth> or specs are wrong
18:30:53  * andythenorth well aware that specs are not canonical :P
18: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
18:32:28  <glx> they shouldn't
18:32:45  <Samu> edited minimalGS
18:32:52  <Samu> added a parameter start_date to it
18:33:00  <glx> no sane dev would add this parameter
18:33:14  <Samu> openttd picked it up and added the in-built description
18:33:54  <Samu> ok im removing the change anyway
18:34:01  <glx> anyway the default description is not a problem I think
18:34:35  <glx> if no description is provided for a potential start_date GS parameter
18:35:47  <glx> so no need to check that
18:35:51  <peter1138> if a gamescript does have a start parameter, then master will be changing it anyway
18:36:17  <peter1138> there is no need to "fix" that in a patch that's supposed to be about allowing AIs to start instantly.
18:37:06  <glx> indeed the handling for AI is done in AI class, GS are not a problem
18:40:09  <Samu> pushing with force
18:40:15  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0
18:40:22  <Samu> finally
18:40:52  <peter1138> You think?
18:41:47  <Samu> i think
18:42:16  <peter1138> Yes. That looks a LOT better than the original.
18:42:23  <peter1138> Welcome to C++ OOP :-)
18:43:32  <Samu> about that asynchronous thing, I have no idea
18:43:49  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
18:44:18  <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on issue #7119: Ships turning around pixel alignment
18: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.
18:44:44  <peter1138> *response
18:45:04  <peter1138> However in this case I don't think this would be being sent from client to server anyway.
18:45:24  <glx> only server can start AIs
18:45:27  <Samu> so that means I'm lucky
18:45:30  <Samu> cool
18:45:56  <Samu> but start_date is 0
18:45:59  <Samu> why 0?
18:46:12  <Samu> 0 is a magic number
18:47:54  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7119: Ships turning around pixel alignment
18:48:12  <Samu> actually there is a problem yet
18: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
18:48:30  <Samu> forget about the (1-3600) range
18:48:35  <Samu> forgot*
18:48:41  <nielsm> Codechange is only for changes that jigger code around without actually having an effect on the end result
18:49:14  <peter1138> Hmm, wonder if I made a booboo on ships turning.
18:49:38  <Samu> ok, let me change that
18:49:43  <Samu> i also have something to fix yet
18:49:49  <Samu> brb
18:49:55  <peter1138> Hmm, no I remember now, it glitched both ways.
18:49:56  <peter1138> Hmm
18:52:42  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
18:55:15  *** supermop_work_ has quit IRC
18:55:19  <Samu> no glx, i forgot about max(1, the other value that could have been randomized to 0)
18:56:02  <glx> no it can't be randomised to 0
18:56:57  <glx> I think, not checked, you may be right
18:57:07  <Samu> random deviation could
18:57:08  <Samu> yeh
18:58:43  <Samu> this->SetSetting("start_date", start_date ? max(1, this->GetSetting("start_date")) : start_date);
18:59:23  <Samu> or 0
18:59:31  <Samu> this->SetSetting("start_date", start_date ? max(1, this->GetSetting("start_date")) : 0);
19:01:09  <Samu> hmm how do i rename a commit?
19:01:12  <Samu> ammend during rebase?
19:01:16  <Samu> gonna try
19:01:27  <peter1138> If it's the last commit, git commit --amend
19:01:52  <peter1138> Otherwise do an interactive rebase and follow the instructions.
19:02:41  <nielsm> interactive rebase has an instruction called 'reword', that's changing the commit message
19:02:43  <andythenorth> turning ships eh
19:02:49  <andythenorth> shave a yak?
19:02:55  <Samu> do you really want 0 instead of start_date?
19:03:41  <peter1138> I think it makes it clearer that you are explicitly setting it to 0.
19:04:04  <peter1138> Otherwise at first glance it looks like you might just be setting it to the value it already was.
19:04:13  <Samu> oki, 0
19:04:21  <peter1138> Which, yes, happens to be 0, but still.
19:04:48  <Samu> this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0);
19:07:17  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Codechange: Allow AI companies start_date to be 0
19:08:11  <peter1138> Hmm. I think you need a better comment than that.
19:08:22  <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.
19: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?
19:09:02  <Samu> I don't want it to be randomized to 0
19:09:36  <peter1138> I'm aware
19:09:45  <peter1138> That's why it's an issue.
19:10:34  <peter1138> Okay, is AddRandomDeviation only called for start_date?
19:10:56  <peter1138> "** Randomize all settings the Script requested to be randomized."
19:11:12  <peter1138> Hmm
19:11:18  <peter1138> Ah, I see, it's called *once*
19:11:21  <peter1138> Ignore that then :D
19:12:50  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Codechange: Allow AI companies start_date to be 0
19:13:28  *** rm87 has joined #openttd
19:14:33  *** supermop_work has joined #openttd
19:16:43  *** supermop_work_ has joined #openttd
19:17:01  <rm87> How to get in touch with translations admin? The email I sent 5 days ago has not been answered jet.
19: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.
19:18:34  <LordAro> i think planetmaker was the last person to look at that mailbox...
19:19:52  <Heiki> rm87: I sent an email in October, still waiting for an answer…
19:21:35  <rm87> Does anyone deal with the translation related issues at all or?
19:22:23  <Samu> i'm bad with comments
19:23:36  *** supermop_work has quit IRC
19:23:50  *** Sheogorath has quit IRC
19:24:47  <LordAro> rm87: translator requests go into a shared mailbox that some of the devs look at some of the time
19:25:09  <peter1138> Who though?
19:25:14  <LordAro> well, not me
19:25:17  <peter1138> Quite.
19:25:17  <LordAro> that's all i know
19:25:36  *** Sheogorath has joined #openttd
19:26:32  <peter1138> whois Heiki
19:26:42  <peter1138> Well played.
19:27:22  <peter1138> So yes, who knows.
19: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"
19:28:05  <Samu> terrible comment
19:28:14  <peter1138> interval?
19:28:29  <Samu> range
19:28:54  <peter1138> If start_date was not already 0, then it must be clamped to 1-3600
19:29:12  <Samu> wow, great english skills
19:29:19  <peter1138> BUT!
19:29:26  <peter1138> the code doesn't clamp it to 1-3600
19:29:33  <peter1138> It only ensures it is > 1
19:29:35  <peter1138> Which is fine.
19:30:07  <peter1138> If start_date was not already 0, then it must have a minimum value of 1
19:30:10  <peter1138> Something something something
19:30:29  <Samu> something? what else is missing
19:30:37  <peter1138> Annoying.
19:30:48  <peter1138> The clamp explains it better, but the code doesn't do that.
19:31:03  <Samu> clamp is done by SetSetting
19:31:11  <peter1138> Yes, but not here :)
19:31:28  <peter1138> If start_date was not already 0, then a minimum value of 1 must apply.
19:32:36  <Heiki> peter1138: haha
19:32:53  <Samu> 	/* start_date = 0 is a special case, where random deviation does not occur.
19:32:53  <Samu> 	 * If start_date was not already 0, then a minimum value of 1 must apply. */
19:32:53  <Samu> 	this->SetSetting("start_date", start_date != 0 ? max(1, this->GetSetting("start_date")) : 0);
19:33:21  <andythenorth> I don't understand the translator thing
19:33:33  <peter1138> Samu, great.
19:33:38  <peter1138> andythenorth, which bit?
19:33:42  <andythenorth> planetmaker: how do we add translators to coop eints?
19:34:04  <andythenorth> the weird thing of improving the web translator, but not letting people in
19:34:57  *** Thedarkb1-T60 has joined #openttd
19:35:25  * andythenorth wonders if we should auth it on github, and add collaborators
19:35:38  <andythenorth> dunno eh
19:35:46  <andythenorth> also: Enterprise Software!
19:35:49  * andythenorth must busy
19:35:50  <Samu> what about the commit message itself, does it needs more editing?
19:36:24  <peter1138> I think so. It doesn't really explain it.
19:36:40  <peter1138> It prioritizes the wrong thing.
19:37:11  <peter1138> The main aim of this patch is to allow AIs to start "instantly" right?
19:37:21  <peter1138> The aim isn't to allow start_date to be 0.
19:37:23  <Samu> yes
19:37:36  <LordAro> andythenorth: i imagine there's plenty of ancient translators that don't github
19:37:42  <Samu> but but... it's part of the process
19:37:45  <peter1138> The former is achieved by the latter, the former is the goal, the latter is the method.
19:38:02  <peter1138> Yes, but prioritize the goal not the method.
19:38:16  <peter1138> (I think that's where you've been stuck on your previous changes)
19:38:54  *** Thedarkb-T60 has quit IRC
19:39:00  <Samu> i mean, the start date can still be the other values
19:39:23  <peter1138> "Change: Allow AIs to start at once, by setting their start_date to 0."
19:39:29  <Samu> but if it's 0, then all ais start right away
19:39:34  <peter1138> yes
19:39:41  <Samu> until it finds the next one with a start_date != 0
19:39:43  <peter1138> But you are still focusing on the method.
19:39:52  <peter1138> Stop focusing on the method and focus on the goal.
19:40:23  <andythenorth> let's try: cod, spaghetti, olives, butter, yellow tomatos, and lemon
19:40:27  <andythenorth> see if that works
19:40:30  <peter1138> Sounds good.
19:40:52  <andythenorth> first beer
19:40:58  <peter1138> I'm going to have chicken, courgette, aubergine, curly kale, and sweet potato.
19:40:59  <andythenorth> enterprise software can wait until tomorrow :P
19:41:05  <andythenorth> sounds nice also
19:41:13  <Samu> Change: Allow AI companies to start immediately one after the other?
19:41:23  <Samu> Change: Allow AI companies to start immediately
19:41:31  <andythenorth> am I the only person in the world making enterprise software for their own use? :P
19:42:06  <Samu> Change: Allow AI companies to start at the same time?
19:42:38  <Samu> Change: Allow AI companies to start instantly
19:44:28  <peter1138> immediately is a good word
19:45:51  *** rm87 has quit IRC
19:46:12  <peter1138> instantly might imply that started slowly, rather than delayed.
19:46:25  <peter1138> *they
19:48:25  <Samu> gonna copy paste all the comments into the commit message
19:51:10  <Samu> dang it, the bash text editor is complete trash
19: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
19:55:19  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Change: Allow AI companies to start immediately.
19:55:23  <TrueBrain> okay .... rsync reports the files as being there
19:55:24  <TrueBrain> http says no
19:55:53  <Samu> i need a better editor when i do a git rebase -i upstream/master
19:56:17  <Samu> cant use ctrl-c/ctrl-v
19:56:23  <glx> when I installed git for windows I told it to use notepad++
19:57:53  <dwfreed> learn vim :P
19:58:25  <TrueBrain> why does rsync report 1 thing, and http the other .. hmm
20:00:59  <nielsm> oh, found out my login for the wiki
20:03:31  <nielsm> ...but that was not the wiki I was looking to log in to
20:03:41  <nielsm> still can't find a working login to the newgrf-specs wiki
20:06:14  *** Thedarkb-T60 has joined #openttd
20:06:48  <andythenorth> check the sig here
20:06:51  <andythenorth> old old
20:06:55  <andythenorth> 15 years :D
20:07:04  *** Thedarkb1-T60 has quit IRC
20:07:44  <TrueBrain> this is very odd ... files are not showing up as I expect on one of the mirrors
20:07:45  <TrueBrain> hmm
20:08:04  <andythenorth> "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
20:09:39  <FLHerne> Samu: There is no 'bash text editor'
20:10:03  <FLHerne> Samu: Applications will use whatever editor is set as $EDITOR
20:10:36  <FLHerne> (and you can set EDITOR=whatever_you_like)
20:11:06  <glx> not on windows I think
20:11:44  <glx> but there's core.editor in git config
20:15:25  <FLHerne> peter1138: I have a suspicion your ship-turning code will actually look worse in a lot of cases
20:15:51  <FLHerne> Unless it avoids doing 180° spins at docks and I've missed that
20: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
20:17:10  *** Jortuny has quit IRC
20:18:58  *** Jortuny has joined #openttd
20:20:02  <andythenorth> I tested it with Sam
20:20:05  <andythenorth> looked ok to me
20:20:18  <andythenorth> compared to the instant-reverse-with-bonus-dock-overlapping
20:22:08  <peter1138> revert?
20:22:25  <andythenorth> FLHerne: you tested the PR
20:22:26  <andythenorth> ?
20:22:29  <peter1138> Cos some graphics that are too big and already glitch will glitch? :D
20:23:06  <andythenorth> eh it's in the nightly
20:23:14  <andythenorth> see what people say
20:23:54  <peter1138> True
20:26:14  <andythenorth> revert FISH
20:26:42  <peter1138> k
20:26:59  <andythenorth> I capped Sam to 128px
20:27:03  <andythenorth> less glitch more
20:31:10  *** Thedarkb1-T60 has joined #openttd
20:36:22  *** tokai has joined #openttd
20:36:22  *** ChanServ sets mode: +v tokai
20:36:36  <planetmaker> o/
20:36:47  *** Thedarkb-T60 has quit IRC
20:38:03  *** gelignite has quit IRC
20:38:08  <glx> oh no, there's a warning at
20:39:24  <glx>  ##[warning]src\company_gui.cpp(966,0): Warning C4018: '>=': signed/unsigned mismatch
20:40:21  *** Gja has quit IRC
20:41:17  *** Jortuny has quit IRC
20: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?
20:41:32  <nielsm> it looks strange yes
20:42:48  <Eddi|zuHause> sounds like LiveryScheme is meant to be a colour?
20:43:13  *** synchris has quit IRC
20:43:24  *** tokai|noir has quit IRC
20:46:08  *** cHawk has joined #openttd
20:47:56  <Eddi|zuHause> scrolling through the diff, i'd say "livery_height" should better be called "livery_count"
20: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?
20:50:34  *** octernion has joined #openttd
20:51:15  <peter1138> I see *now* the reviews come out...
20:55:18  <Eddi|zuHause> well, why would you do that BEFORE merging? :p
20:55:31  <peter1138> No warnings for me with clang and -Werror :/
20:56:07  <Eddi|zuHause> it's too intelligent and also checks the range of values before issuing spurious signed/unsigned warnings
20:57:30  <planetmaker> hm, translators. yes
20:57:43  <peter1138> Okay, that code hasn't actually changed since before my patch.
20:57:51  <planetmaker> i really would love to not be the only one to handle them
20:57:58  <peter1138> Only the addition of the comparison.
20:58:20  <peter1138> Yeah, livery_height is a bad name, it's the number of items shown.
20:58:46  <peter1138> Eddi|zuHause, so yes, that is how we calculate the position.
20:59:10  <glx> with the translation warnings it's easy to miss a valid warning on CI
21:00:26  <peter1138> Eddi|zuHause, however it probably can use the same method as for groups.
21:00:32  <andythenorth> snow
21:01:22  <planetmaker> and I really would like a less hassle-some way to add translators :)
21:01:59  <peter1138> planetmaker, give me information on what/how it's done then.
21:12:51  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7084: Change: AI/GS Config GUI overhaul
21:14:28  <planetmaker> <-- that's the process
21:14:50  <Samu> start as spectator my next goal
21:17:44  *** sla_ro|master has quit IRC
21:18:02  *** octernion has quit IRC
21:20:17  <peter1138> Hmm, I just realised DMU/EMU are missing from the list
21:20:25  <peter1138> Because the default engines aren't flagged with required flags.
21:20:30  <peter1138> Is this for a reasonj?
21:20:32  <peter1138> -j
21:22:28  *** octernion has joined #openttd
21:22:44  <peter1138> It used to be multihead == DMU/EMU
21:25:05  <andythenorth> which list?
21:27:56  <peter1138> Livery list.
21:28:08  <peter1138> Strange, is_mu flag has always been set the same. Hmm.
21:28:15  <andythenorth> caboose (wagon, no cargo) is treated as pax also
21:28:18  <peter1138> Like, since 2007 when liveries were introduced.
21:28:19  <andythenorth> probs because cargo 0
21:28:25  <andythenorth> or something
21:28:26  <peter1138> andythenorth, probably. Just set a freight cargo type :p
21:28:34  * andythenorth tries
21:31:46  <andythenorth> nope
21:32:50  *** supermop_work_ has quit IRC
21:32:56  <andythenorth> oh well
21:33:27  <nielsm> hmm eints is asking me to translate STR_COLOUR_DEFAULT which does not exist in english.txt
21:33:51  <peter1138> Are you sure about that?
21:34:07  <nielsm> oh... I haven't updated in a little while
21:34:08  <nielsm> right
21:35:09  <peter1138> Castello creamy blue. Yum.
21:35:47  <peter1138> How are you meant to eat beese and chiscuits without getting horrendously fat?
21:36:51  <andythenorth> carefully
21:38:47  <Eddi|zuHause> <andythenorth> probs because cargo 0 <-- is the 0 set by property or by callback?
21:40:02  <nielsm> hmm were {STRINGn} codes also supposed to become {STRING} in translations?
21:41:50  <andythenorth> neither
21:42:10  <andythenorth> I tried changing the default cargo to a prop
21:42:44  <andythenorth> but it's behind a few layers of abstraction, might get treated as a cb
21:43:12  <peter1138> Eddi|zuHause, did you get the compiler warnings or was it just glx?
21:43:27  <glx> I noticed them on azure
21:43:34  <peter1138> Hmm.
21:43:36  <Eddi|zuHause> i don't remember any warnings
21:43:39  <peter1138> I see.
21:44:39  <glx> nielsm: yes {STRINGn} and {RAW_STRING} in english are {STRING} in translations
21:45:40  <Eddi|zuHause> nope, no warnings on master, except for the strings
21:46:05  <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #6233: Lock price for when built on sloped river and bare land tiles
21:46:05  <andythenorth> I have loads of mac specific warnings
21:46:07  <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #6797: Interface: Fractional Scale
21:49:13  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7152: Fix 23960d0f2c: Scrollbar was broken for non-group liveries.
21:51:04  *** andythenorth is now known as Guest20
21:51:04  *** andythenorth has joined #openttd
21:51:09  <peter1138> Hmm, were there no default EMUs?
21:51:32  <andythenorth> the high speed trains are emus?
21:51:39  <andythenorth> eurostar, tgv
21:51:44  <andythenorth> asiastar whatever it was called
21:51:53  <peter1138> They're multihead. Is that the same thing?
21:52:26  <andythenorth> think so
21:52:36  <andythenorth> dunno
21:52:49  <andythenorth> hmm maybe not
21:52:52  <peter1138> TIM, Asiastar
21:52:55  <peter1138> SH125
21:52:58  <andythenorth> what does is_mu do?
21:53:02  <peter1138> I'd say SH125 kinda is.
21:53:10  <peter1138> andythenorth, it sets the multiunit livery flag
21:53:32  <peter1138> millennium Z1 is arguably an MU
21:53:40  <peter1138> but it's monorail :p
21:54:03  <peter1138> SH125 is the only one with capacity but that's diesel anyway.
21:54:09  *** Guest20 has quit IRC
21:55:42  <peter1138> Maybe it's time to fire up TTDPatch :D
21:56:33  <peter1138> it's obvious the manley-morel and dash are DMUs, at least
21:56:40  <peter1138> the MM even has DMU in its name :)
21:58:03  <peter1138> Hmm, azure says "11 warnings"
21:58:25  <peter1138> But I don't see them.
21:58:37  <peter1138> I saw 48 language warnings, but not compile warnings.
22:00:01  <peter1138> And I can't get the previous output since it's been merged.
22:00:35  <peter1138> Okay, I see it.
22:00:53  <peter1138> Still says 11 warnings, so that warning in the code isn't picked up.
22:01:07  <peter1138> On the other hand, the PR I ust made doesn't have that issue.
22:02:16  <peter1138> Eddi|zuHause, better code?
22:04:38  *** HerzogDeXtEr has quit IRC
22:05:18  <peter1138>
22:05:22  <peter1138> That says TGV is a MU
22:06:01  <andythenorth> I saw there's a flag in newgrf for MU :P
22:06:16  <peter1138> And the asiastar...
22:06:24  <peter1138>
22:06:31  <peter1138> Yes
22:06:36  <andythenorth> prop 27 bit 2
22:06:39  <peter1138> That flag just was never set for default vehicles.
22:07:25  <nielsm> STR_ABOUT_COPYRIGHT_OPENTTD      :{BLACK}OpenTTD {COPYRIGHT} 2002-2018 The OpenTTD team
22:07:27  <nielsm> update?
22:07:31  <peter1138> Hah
22:07:37  <peter1138> PR :-)
22:07:59  <peter1138> Are any other vehicles MUs?
22:08:06  <peter1138> Should I brave looking at toyland?
22:08:11  <andythenorth> maglev?
22:08:38  <andythenorth> is there a turner turbo thing in arctic?
22:08:41  * andythenorth could look
22:08:53  <Heiki> oh wow, just replied
22:09:01  *** urdh has quit IRC
22:09:04  <andythenorth> millenium z1
22:09:07  <Heiki> i.e. thank you, planetmaker :D
22:09:15  <planetmaker> you're welcome
22:09:22  <planetmaker> thanks for dropping by and reminding us
22:09:23  <andythenorth> turner turbo
22:09:27  <andythenorth> peter1138: ^
22:10:04  <planetmaker> the translators account was... "a bit" neglected the last half year or so. at least :|
22:10:28  <peter1138> MU? Hmm
22:10:37  <peter1138> it's multihead, but is a dmu?
22:10:55  <andythenorth> dunno :)
22:11:05  <peter1138> Hmm
22:11:07  <planetmaker> its admin interface does not exactly invoke joy in me... on the contrary
22:11:14  <peter1138> it's a *gas* multiple unit, apparently
22:11:15  <peter1138> so yes
22:11:24  <peter1138> technically not disel but stil.
22:12:42  *** urdh has joined #openttd
22:13:29  <peter1138> Hmm, the "used features" doesn't take account of "climate"
22:14:28  <andythenorth> how even is the translators account admined?
22:14:36  <peter1138> I have the information now.
22:14:42  <peter1138> I... will look when I'm feeling braver.
22:14:59  <andythenorth> I only saw newgrf eints, which I think was admined with coop redmine
22:15:04  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid
22:15:10  <andythenorth> 'saw' / 'wrote the UI for' /s :P
22:15:22  <andythenorth> eints ui could do with a rework but eh
22:15:24  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7106: Fix #7089: close NewGRF textfile windows when their data are invalid
22:15:29  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro closed issue #7089: Crash when Removing NewGRF from Active list
22:15:44  <planetmaker> andythenorth, that's a "nice to have". Not a requirement. It works
22:15:59  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7114: NPF bails out when source tile is also a destination tile
22:16:02  <andythenorth> I won't be doing it any time soon :D
22: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
22:16:07  <planetmaker> so put it on the "will do when I have nothing better to do" :P
22:16:15  <planetmaker> (i.e. "never" :P)
22:16:33  <peter1138> Cool EMU/Electric is no longer available.
22:17:56  <andythenorth> Horse is 93% sprites done, and the costs are weird
22:17:58  <andythenorth> call it 1.0?
22:19:02  <nielsm> oh god so many inconsistencies in this langfile
22:19:14  <nielsm> three terms for the same concept
22:19:50  <nielsm> now going on a quest to fix all strings talking about path signals to use the actual railroading term
22:21:34  <peter1138> Hmm, damn, this is probably two PRs.
22: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
22:22:59  <andythenorth> I should set some engines to MU eh?
22:23:08  <peter1138> If they're MUs, yes please.
22:23:26  <peter1138> #7152 is pretty important, the UI is buggy at the moment.
22:23:36  <peter1138> No crashy crash though.
22:23:53  <peter1138> #7153 is a makes the available livery classes actually match what is available, so also nice.
22:24:13  <planetmaker> what are... "livery classes"?
22:24:40  <andythenorth> the funny company colour options for trains :)
22:24:41  *** heffer has quit IRC
22:24:53  <peter1138> Yeah, those funny colour options we borrowed from ttdpatch.
22:24:55  <peter1138> About 12 years ago.
22:24:59  <andythenorth> they're weird
22:25:02  <andythenorth> but ok
22:26:00  <planetmaker> you can actually build them... or could. With a climate cheat. Which does not exist anymore
22:26:19  <planetmaker> But unavailable due to climate still means not necessarily "not running around on the map"
22:27:14  <nielsm> gn
22: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?)
22:27:21  <planetmaker> gn, niels
22:29:44  * andythenorth patches horse
22:30:03  *** Progman has quit IRC
22:30:18  <andythenorth> what's an MU then?
22:30:21  <andythenorth> pax railcar?
22:30:25  <andythenorth> mail railcar?
22:30:25  <peter1138> I think it'd be fairly hard to test if something is attached by callback.
22: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
22:31:31  <planetmaker> iirc I was even once told that it was THE way to handle this
22:31:47  <peter1138> Well
22:32:11  <andythenorth> oof
22:32:16  <peter1138> As long as there is one that IS available, the flag will be set.
22:32:21  <andythenorth> why do I piss around with electro-diesels :P
22:34:58  <peter1138> planetmaker, and if not, they won't get to use the livery scheme which hardly anyone uses anyway :D
22:35:12  <andythenorth> MY?  or engines?
22:35:17  *** nielsm has quit IRC
22:35:25  <andythenorth> MU *
22:35:25  <peter1138> Well that hot chocolate disappeared rather quickly.
22:35:26  <planetmaker> it's definitely not a game-breaking thing either way ;)
22:35:53  <peter1138> It looked weird having EMU/Electric available, with default vehicles, in arctic/tropic.
22:36:15  <peter1138> andythenorth, yes except the head of Train 3.
22:36:23  <andythenorth> yair
22:37:47  <andythenorth> error: no electro-diesel livery option :P
22:37:54  * andythenorth expects that immediately
22:37:55  <peter1138> It'll be diesel.
22:37:57  <andythenorth> or instantly
22:38:00  <peter1138> Hmm, custom livery classes? :p
22:38:05  <andythenorth> maybe :P
22:38:05  <peter1138> Let's say no.
22:38:08  <andythenorth> let's
22:38:18  <peter1138> Actually that's possible.
22:38:25  <peter1138> Just make a group "Electro-diesel"
22:38:33  <peter1138> Put them all under there.
22:39:08  <andythenorth> oh I broke it
22:39:26  <andythenorth> mu vehicles with 0hp when built
22:39:44  <andythenorth> don't get the livery
22:40:25  <peter1138> :D
22:41:24  * andythenorth tries default game
22:41:39  <andythenorth> so blue MU engines, red pax carriages?
22:41:40  <andythenorth> o_O
22: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
22:42:35  <andythenorth> let's add more :P
22:42:49  <andythenorth> 'high speed engine or wagon' :P
22:42:53  <andythenorth> 'brake van'
22:43:19  <andythenorth> let's have 16, and a byte property for newgrf to set
22:43:35  <andythenorth> I am only going to use groups always anyway
22:44:36  <peter1138> We should add RGB colours and let you have a mega rainbow.
22:45:07  <andythenorth> can we have 255 RGB colours?
22:45:23  <andythenorth> arranged in groups of 8 or so?
22:45:29  <andythenorth> with 1 more for alpha?
22:45:49  <peter1138> Um.
22:45:58  <peter1138> Currently it's 4 sliders.
22:46:09  <peter1138> R, G, B and 'contrast'
22:46:32  <peter1138> Invisible vehicles is not a thing.
22:46:35  <peter1138> (Sort of)
22:47:31  <andythenorth> I was thinking of just choosing 255 nice ones :P
22:47:37  <andythenorth> maybe saving them to a palette :P
22:47:50  <andythenorth> people are snowballing outside my house
22:47:56  <andythenorth> GTFO to bed people :P
22:49:07  <Samu> Calls to 'SetLocalCompany'... too many
22:50:27  *** octernion has quit IRC
22:51:45  <andythenorth> also very bed
22:51:47  *** andythenorth has quit IRC
22:56:46  <peter1138> Oops, finish rebase before making other changes.
22: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.
22:58:39  <Samu> there is no spectator slot in single player t.t
22:58:51  <Samu> how to solve
22:59:41  <peter1138> Run in multiplayer.
23:00:00  <LordAro> spectator makes no sense for a "single player" game
23:00:26  <ST2> my vote is with LordAro's statement :)
23:01:10  <ST2> it's a game - "single player" it's because someone wants to play alone, on MP's makes sense to spectate
23:01:15  <ST2> my opinion, ofc :)
23:02:13  *** Tirili has quit IRC
23:02:13  <Samu> i wanna spectate AIs
23:02:22  <LordAro> so run a multiplayer server
23:02:27  <LordAro> it's not that hard
23:02:33  <LordAro> or run 1 fewer AI
23:02:34  <Samu> can't fast forward :|
23:02:37  <ST2> start them on a local MP game and watch
23:03:19  <Samu> the company button crashes when there's nothing to list
23:03:20  <peter1138> In a while, there'll be a PR... "Allow FF in MP when no clients connected"
23:03:36  <Samu> must disable button
23:05:42  <peter1138> Hmm, I think I can do this savegame conversion without a bump.
23:06:21  <peter1138> Although, then it will always fix ships.
23:06:26  <peter1138> Even when they're not broken.
23:06:59  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
23:07:46  <Samu> oh, New Company
23:07:57  <Samu> that's what it needs
23:08:06  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
23:11:48  *** Flygon has joined #openttd
23:13:53  <Samu> #ifdef ENABLE_NETWORK hmm this complicates things
23:15:07  *** cHawk has quit IRC
23:16:47  <Eddi|zuHause> <nielsm> update? <-- someone missed the yearly obiwan?
23:18:27  <peter1138> Hmm, how can I test if a ship is on the lower or uppersecond half of a slope?
23:18:29  <peter1138> -second
23:18:38  <peter1138> Hmm, not quite.
23:18:50  <peter1138> first or second was right.
23:19:36  <peter1138> I know if it's going up or down, I don't know if its past the centre (in relation to the ship direction) or not.
23:21:02  <Samu> client list not needed for single player
23:22:45  *** cHawk has joined #openttd
23:23:04  <Samu> New Company widget is disabled :|
23:28:55  *** strawbs89 has joined #openttd
23:29:05  <Eddi|zuHause> there's a variable for progress through a tile, right?
23:29:32  <strawbs89> rite hi i am going from what the wiki told me to do about the casino info centre but nothing seems to happen please help
23:29:34  <Eddi|zuHause> or you need to implement a state machine
23:30:40  <strawbs89> a state machine????
23:31:42  <peter1138> I don't think progress has this info.
23:32:11  <peter1138> progress is like sub-1/16th units.
23:33:01  <strawbs89> anyone listening lol
23:33:21  <LordAro> strawbs89: your question has nearly no information in it
23:35:07  <strawbs89> ok im using openttd 1.8.0 and i want to implement a casino tourist info centre and someone sent me a wiki on it earlyer today and im doing what it said im still getting build on slope like what the hell
23:35:39  <Eddi|zuHause> peter1138: no, progress is wrong, there needs to be a position one level above that
23:36:07  <Eddi|zuHause> peter1138: but that might already be in world coordinates, not in tile coordinates, not sure
23:36:31  <peter1138> There's x_pos and y_pos obviously, but I'll to mangle them depending on the direction, and I can't think :-)
23:36:43  <strawbs89> i'v attached a pic here
23:38:13  <Eddi|zuHause> strawbs89: it might not work with canals but needs a real shoreline
23:38:57  <strawbs89> i have shoreline tiles would that work?
23:39:12  <ST2> strawbs89: had you checked this:
23:39:24  <Eddi|zuHause> with a real seashore, the slopes count as water tiles, the industry might check those
23:40:05  <strawbs89> that's the exact wiki i am on about
23:40:08  <ST2> strawbs89: and there's a very specific one:
23:40:41  <strawbs89> i have ecs town vector but openttd 1.8.0 don't seem to like it
23:40:48  <Eddi|zuHause> (must also demolish the purchased land to allow flooding of the shore in that case)
23:41:44  <ST2> strawbs89: maybe that tile that isn't water?
23:42:00  <strawbs89> what
23:42:13  <ST2> top right
23:42:33  <ST2> of the marked area here
23:43:40  <strawbs89> oooh ok rite i have now demolished the brought land
23:46:32  <Eddi|zuHause> seems to work fine here with "pristine" seashore
23:46:34  <Samu> kek, playing as company 256
23:46:42  <Samu> the cheat gui is broken
23:47:32  <strawbs89> will the demolished brought land flood over now then
23:48:49  <Eddi|zuHause> not with canals
23:48:49  <strawbs89> plus i have animated watertiles would that work if i put them down
23:49:03  <Eddi|zuHause> must be original sea
23:49:12  <Eddi|zuHause> nothing else floods
23:49:25  <strawbs89> how would i get original sea then lol
23:49:43  <peter1138> Well it has to be at sealevel.
23:49:44  <Eddi|zuHause> could use the scenario editor
23:50:08  <Eddi|zuHause> or terraform from a place that still has sea tiles
23:50:20  <peter1138> Oh, you've replaced all sea with canals?
23:50:29  <strawbs89> i'v tried to lower that bit thats on the sea and it says already at sea level
23:50:49  <strawbs89> ooh
23:51:05  <ST2> just a swear about: putting our server plugins on git and I already hate it (on a good way for some code lines)
23:51:15  <ST2> don't laugh, I'm a git noob :D
23:51:17  <peter1138> ST2?
23:51:45  <ST2> not on OpenTTD official git ^^
23:52:03  <ST2> a git I created to our plugin stuff
23:52:21  <peter1138> Sure, I mean what ... issues are you having?
23:52:56  <ST2> at the moment aren't real issues - so won't disturb with it
23:53:27  <strawbs89> i'v demolished the canal so should it start flooding now if its already at sealevel
23:53:42  <peter1138> It'll only flood if it's next to existing sea water.
23:53:47  <ST2> many stuff made on SVN, by diff people
23:54:57  <ST2> I'll survive, google is my friend :D
23:55:04  <ST2> thx peter1138 for asking :)
23:55:18  <peter1138> git is <3
23:55:28  <peter1138> Just takes a little getting used to from svn.
23:55:31  <ST2> after you get used to it, I bet
23:55:45  <ST2> the "baby steps" aren't easy :D
23:57:28  <LordAro> it is a steep learning curve
23:57:32  <ST2> big nap time. gn8 all :)

Powered by YARRSTE version: svn-trunk