IRC logs for #openttd on OFTC at 2020-02-29
            
00:01:42 *** Beerbelott has joined #openttd
00:01:46 *** Beerbelott has left #openttd
00:04:24 <andythenorth> is it sleep time?
00:05:50 <TrueBrain> yes
00:05:50 <TrueBrain> go
00:05:51 <TrueBrain> :P
00:16:01 <spnda> it is very sleepy time...
00:16:33 *** spnda has quit IRC
00:21:45 *** andythenorth has quit IRC
00:30:10 *** Smedles has quit IRC
00:31:48 *** Smedles has joined #openttd
00:34:31 *** Flygon has joined #openttd
00:35:06 *** cHawk- has quit IRC
00:50:23 *** Progman has quit IRC
00:53:30 <TrueBrain> and I keep fiddling with the migration, instead of writing the API ... clearly I really don't want to :P
00:55:41 *** HerzogDeXtEr has quit IRC
00:57:04 *** UncleCJ[m] has joined #openttd
01:22:49 *** johanna[m] has joined #openttd
01:31:10 *** Wormnest__ has quit IRC
02:03:04 *** nielsm has quit IRC
02:16:44 *** nartir[m] has joined #openttd
02:34:48 *** Wormnest__ has joined #openttd
03:04:12 *** ircer[m] has joined #openttd
03:35:47 *** amal[m] has joined #openttd
03:45:53 *** glx has quit IRC
04:42:36 *** debdog has quit IRC
04:44:13 *** debdog has joined #openttd
05:08:45 *** Smedles has quit IRC
05:09:37 *** Smedles has joined #openttd
05:20:23 *** Wormnest__ has quit IRC
05:31:35 *** Smedles has quit IRC
05:33:20 *** Smedles has joined #openttd
05:41:43 *** Smedles has quit IRC
05:43:01 *** Smedles has joined #openttd
07:27:27 *** Smedles has quit IRC
07:29:41 *** Smedles has joined #openttd
08:08:14 *** Smedles has quit IRC
08:11:10 *** Smedles has joined #openttd
08:21:31 *** Progman has joined #openttd
09:10:04 *** andythenorth has joined #openttd
09:11:43 <andythenorth> yo
09:12:25 <peter1138> Hai
09:13:30 *** cHawk- has joined #openttd
09:14:08 <andythenorth> I was supposed to be doing something?
09:14:10 <andythenorth> what was it?
09:14:17 * andythenorth wants to start on new Horse :P
09:15:32 <peter1138> I'm starting work on new coffee.
09:16:19 <andythenorth> was it diagonal river sprites I was supposed to draw?
09:19:07 *** Smedles has quit IRC
09:20:51 *** Smedles has joined #openttd
09:50:03 *** HerzogDeXtEr has joined #openttd
09:54:57 <andythenorth> time for Horse 99 then?
10:58:19 *** Smedles has quit IRC
10:58:41 <andythenorth> oof
10:58:45 * andythenorth starts new Horse
10:58:50 <andythenorth> that's not diligent
10:59:05 <LordAro> oh no
10:59:58 <andythenorth> I'm sure I'm supposed to be doing something for 1.10
11:00:02 <andythenorth> can't remember what
11:00:33 *** Smedles has joined #openttd
11:04:14 *** Progman has quit IRC
11:17:41 *** nielsm has joined #openttd
11:33:49 *** Samu has joined #openttd
11:35:01 <Samu> nielsm, i need to talk to you :p
11:35:38 <LordAro> @topic get 3
11:35:38 <DorpsGek> LordAro: Don't ask to ask, just ask
11:36:10 <Samu> okay, if this suggested fix is in: https://github.com/OpenTTD/OpenTTD/pull/7912#discussion_r385948671
11:36:17 <Samu> there is still one problem
11:37:20 <Samu> if the production decreases, "if (new_prod > 1) closeit = false;" will fail, meaning that the industry is going to announce closure
11:37:39 <Samu> that poses a dilema
11:38:24 <Samu> an industry that never decreases production would never announce closure, right? then that would the flag NO_CLOSURE be used for?
11:40:41 <Samu> typo: what* would be
11:41:26 <Samu> I think nielsm isn't here yet
11:44:27 <_dp_> Samu, NO_CLOSURE can be used without NO_DECREASE
11:44:38 <_dp_> also to stop newgrf from straight up closing the industry
11:48:25 *** Wolf01 has joined #openttd
11:48:59 <Wolf01> Hmm, mashinky will have power lines before us, not good :P
11:49:56 <_dp_> does it have multiplayer already?
11:50:15 <Wolf01> Not yet
11:50:51 <Samu> I was thinking of this: if (new_prod > 1 || !(i->ctlflags & INDCTL_NO_PRODUCTION_DECREASE)) closeit = false;
11:52:52 <Wolf01> The bad it also suffer for the same problem which affects OTTD, when you finish to build a line and upgrade stations and industries, you need to switch era and upgrade all the trains again
11:54:23 <Samu> actually if (new_prod > 1 || (i->ctlflags & INDCTL_NO_PRODUCTION_DECREASE)) closeit = false;
11:54:33 <Samu> i fail at bools
11:55:34 <Wolf01> Think about them like + (or) and * (and) operations
11:55:49 <_dp_> yeah, upgrading is pita
11:55:57 <Samu> if production is 0 and the flag is set to no decrease, closeit = false
11:56:04 <Samu> that seems right
11:58:18 <nielsm> I'm not ready to look at code today yet :P
11:59:05 <Samu> hi
12:02:24 <Samu> it's still a dilema, I wonder how you're gonna solve it
12:04:27 <Samu> the production decreases, but you want the production to never decrease. how then would it decide whether to announce closure
12:05:43 <Samu> you want closure announced based on NO_CLOSURE
12:05:45 <nielsm> if production can't decrease then closure due to production dropping too low is not possible
12:08:11 <Samu> so, that means, my suggested fix also needs this line
12:08:27 <Samu> that line above
12:14:03 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro opened pull request #8027: Rollup backport requested PRs https://git.io/Jvgul
12:18:42 <LordAro> "##[warning]This pipeline uses a Microsoft-hosted agent image that will be removed on March 23, 2020 (MacOS-10.13). You must make changes to your pipeline before that date, or else your pipeline will fail. Learn more (https://aka.ms/removing-older-images-hosted-pools)."
12:18:47 <LordAro> that might be an issue
12:23:32 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro opened pull request #8028: Codechange: [AzurePipelines] Update MacOS image to 10.14 https://git.io/JvguX
12:26:48 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #8028: Codechange: [AzurePipelines] Update MacOS image to 10.14 https://git.io/JvguM
12:28:41 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #8028: Codechange: [AzurePipelines] Update MacOS image to 10.14 https://git.io/Jvguy
12:32:54 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #8028: Codechange: [AzurePipelines] Update MacOS image to 10.14 https://git.io/Jvgu7
13:11:57 <LordAro> nielsm: re #8023 - at the very least it doesn't seem to make anything worse, so i'd say it's probably good
13:24:38 <Samu> nielsm, I updated the comment https://github.com/OpenTTD/OpenTTD/pull/7912#discussion_r385948671
13:24:49 <Samu> so that it's not forgotten :p
13:24:55 <Samu> now lunch time, bbl
13:25:47 *** Progman has joined #openttd
13:40:39 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro commented on pull request #7486: Fix: AI/GS settings with the flag SCRIPTCONFIG_RANDOM could be altered after loading from a savegame. https://git.io/JvggJ
13:54:32 *** andythenorth has quit IRC
14:03:04 <Samu> oh no, not that again :(
14:03:33 <LordAro> it's not gone away :p
14:04:06 <Samu> i don't know what nielsm is requesting
14:05:23 <Samu> it comes from ai_sl
14:07:19 <Samu> the script is not started at the time ScriptConfig::Change is called
14:07:44 <Samu> ai_sl.cpp only starts after the whole settings are constructed
14:07:50 <Samu> only starts the ais
14:07:56 *** blim[m] has joined #openttd
14:08:04 <LordAro> Samu: you know where this is supposed to go...
14:08:16 <Samu> but i dont know if this is what he's asking for
14:11:07 *** arikover has joined #openttd
14:13:52 *** arikover has quit IRC
14:17:46 *** arikover has joined #openttd
14:18:33 <DorpsGek_III> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7486: Fix: AI/GS settings with the flag SCRIPTCONFIG_RANDOM could be altered after loading from a savegame. https://git.io/JvggX
14:19:09 <Samu> probably the wrong answer
14:25:11 <Samu> maybe the confusion is due to the fact that I'm fixing 2 things in 1 PR
14:25:33 <Samu> should I split?
14:25:53 <Samu> I don't know how to proceed
14:29:22 *** glx has joined #openttd
14:29:22 *** ChanServ sets mode: +v glx
14:32:19 *** Flygon has quit IRC
14:39:11 *** spnda has joined #openttd
15:13:34 <Samu> :)
15:20:05 <DorpsGek_III> [OpenTTD/OpenTTD] glx22 commented on pull request #8025: Remove: Support for macOS before 10.9 https://git.io/Jvga3
15:31:34 <DorpsGek_III> [OpenTTD/OpenTTD] spnda commented on issue #8024: "Check Online Content" lags the UI https://git.io/Jvuyj
15:34:18 <DorpsGek_III> [OpenTTD/OpenTTD] michicc commented on pull request #8025: Remove: Support for macOS before 10.9 https://git.io/JvgaR
15:34:38 *** arikover has quit IRC
15:57:12 <DorpsGek_III> [OpenTTD/OpenTTD] SamuXarick commented on pull request #7912: Feature: Disallow industry production changes from GS https://git.io/Jvga5
16:22:19 <spnda> I just noticed in NML, 0x14 for act2 variables is used by towns, I think. See action2var_variables.py line 763. Can I shift that up to 0x15 or should I put mine as 0x15?
16:26:43 <glx> I don't know if it's possible
16:27:04 <glx> but newgrf spec is not helpful in this area it seems
16:29:09 <glx> https://newgrf-specs.tt-wiki.net/wiki/Features says feature N/A for towns, while https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2 doesn't list towns even if https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Towns exists
16:32:48 <spnda> And that list on https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Towns isn'
16:32:51 <spnda> t even complete
16:33:01 <glx> looks like you can theorically move it
16:33:31 <spnda> I'll try and give it a test switch with one of those vars included, see if it still works.
16:33:36 <glx> but there should be a place to check
16:35:16 <glx> action2car_variables.py:22
16:35:39 <glx> I think you need to replace the 0x14 there too
16:35:45 *** Smedles_ has joined #openttd
16:38:06 <glx> and update the comment line 18, and increase the container size
16:38:23 *** Smedles has quit IRC
16:41:49 <spnda> I have done that already, but thanks
17:09:45 <Samu> i just reverted a revert
17:10:07 <Samu> Revert "Revert "Fix: Industries were announcing closure in error""
17:10:12 <Samu> heheh
17:24:42 *** Wormnest__ has joined #openttd
17:41:09 <DorpsGek_III> [OpenTTD/nml] glx22 opened pull request #92: Fix 62cab41: Random switch support for NRT https://git.io/Jvgr2
17:44:17 <DorpsGek_III> [OpenTTD/OpenTTD] James103 commented on issue #8024: "Check Online Content" lags the UI https://git.io/Jvuyj
17:47:49 <DorpsGek_III> [OpenTTD/nml] glx22 commented on issue #46: Update nml wiki docs for NotRoadTypes (NRT) https://git.io/Je8fO
17:47:49 <DorpsGek_III> [OpenTTD/nml] glx22 reopened issue #46: Update nml wiki docs for NotRoadTypes (NRT) https://git.io/Je8fO
18:02:53 <DorpsGek_III> [OpenTTD/OpenTTD] spnda commented on issue #8024: "Check Online Content" lags the UI https://git.io/Jvuyj
18:31:13 <spnda> I'll need some advice now. I use DrawNewGRFTileSeqInGUI(x, y, dts, 0, palette); to draw the road stop sprites. I have 16 different sprites in my SpriteGroup sequence. How would I offset each sprite by a int I have?
18:32:05 *** tokai|noir has joined #openttd
18:32:06 *** ChanServ sets mode: +v tokai|noir
18:38:53 *** tokai has quit IRC
18:40:30 <Samu> firs doesn't trigger any ChangeIndustryProduction
18:40:45 <Samu> well, it does, but returns case 0x0: break; // Do nothing, but show the custom message if any
18:41:29 <Samu> div, mul and increment remains 0
18:42:09 <Samu> how does that gung-ho stuff changes production then?
18:42:52 <Samu> flags don't seem to have any effect on firs as far as I could see
18:45:34 <Samu> there are no industry production changes news for firs
18:45:54 <glx> maybe firs doesn't use the callback
18:46:11 <Samu> ... but production changes
18:46:23 <Samu> seems to be done in some other method
18:49:38 <glx> ChangeIndustryProduction is done every day/month
18:50:23 <glx> well not every day, but it's called from daily and monthly loops
18:51:39 <glx> and newgrf don't trigger the function, but the function can do newgrf callbacks if there is any
18:52:34 <glx> else the standard production change is done
18:53:02 *** tokai has joined #openttd
18:53:02 *** ChanServ sets mode: +v tokai
18:53:46 <Samu> the callback is always = 0
18:54:51 <glx> monthly and daily ?
18:57:34 <Samu> monthly
18:57:40 <Samu> let me check the daily one
18:59:53 <Samu> callback mask is 18943 some some random industry it picked up, what are the meaning of these flags
18:59:54 *** tokai|noir has quit IRC
19:00:20 <Samu> ah, i see
19:00:36 <Samu> it's under enum IndustryCallbackMask {
19:03:45 <Samu> res = 0
19:03:48 <Samu> for daily too
19:03:56 <Samu> seems to be doing it for every industry
19:07:03 <Samu> i've configured firs to close secondary industries, whatever "secondary" means for firs
19:07:15 <Samu> waiting for a breakpoint trigger
19:07:21 <Samu> closing an industry
19:24:04 <Samu> aha! firs triggered a closeit = true;
19:24:10 <Samu> case 0x3: closeit = true; break; // The industry announces imminent closure, and is physically removed from the map next month.
19:26:55 <Samu> NO_CLOSURE flag isn't set, so the industry will close
19:28:08 <Samu> I see the newspaper, so it's working
19:31:46 *** arikover has joined #openttd
19:38:33 <Samu> now testing NO_CLOSURE flag with firs
19:40:29 <Samu> works! industry didn't close
19:40:39 <Samu> even thought it was told to
19:41:54 <Samu> i just don't understand how this enhanced, gung-ho do their thing
19:46:15 <nielsm> persistent storage registers
19:46:30 <nielsm> also I just had a terrible idea
19:46:51 <Samu> uh oh
19:47:42 <nielsm> make an industry with production rules that allows it to supplement logic trains, using the registers as memory in a computer that takes different inputs via different cargo types
19:48:21 <glx> crazy
19:49:19 *** arikover has quit IRC
19:50:05 <Samu> persistent storage registers? does it the industry production changes aren't done the conventional way?
19:50:13 <Samu> does it mean*
19:50:16 <nielsm> yes
19:50:26 <nielsm> it lets industries do basically whatever they want
19:50:42 <Samu> bad firs
19:50:50 <Samu> ok, then mistery solved
19:50:53 <nielsm> and those possibilities are why I didn't bother trying to add commands to force production increase/decrease to that PR
19:50:54 <glx> I guess you are testing without serving the industries
19:51:25 <Samu> i have AIAI doing some transportation on firs
19:55:54 *** cawal[m] has joined #openttd
21:28:20 *** gelignite has joined #openttd
21:50:25 *** andythenorth has joined #openttd
21:55:12 *** Smedles_ has quit IRC
21:57:18 *** Smedles has joined #openttd
22:03:14 <Samu> @calc -6 % 5
22:03:14 <DorpsGek> Samu: 4
22:03:23 <Samu> fake news
22:04:42 <Samu> -6 % 5 = -1 on my programmer calculator
22:04:49 <Samu> who can explain?
22:05:22 <_dp_> there are several ways of doing modulus operation
22:05:26 <_dp_> for negative numbers
22:12:27 *** glx has quit IRC
22:13:59 *** glx has joined #openttd
22:13:59 *** ChanServ sets mode: +v glx
22:15:36 <Samu> @calc 5 - ((-(-6) - 1) % 5) - 1
22:15:36 <DorpsGek> Samu: 4
22:16:13 <_dp_> shocking :p
22:16:24 <Samu> i'm still dumb
22:19:50 *** glx_ has joined #openttd
22:19:51 *** glx is now known as Guest17789
22:19:51 *** glx_ is now known as glx
22:22:34 <LordAro> Samu: https://en.wikipedia.org/wiki/Modulo_operation
22:22:49 <LordAro> Python (dorpsgek) does '%' differently to C
22:23:43 <glx> btw 4 and -1 are the same for %5
22:24:16 *** Guest17789 has quit IRC
22:50:15 <Samu> DivideApprox exists
22:50:17 <Samu> interesting
22:52:53 *** HerzogDeXtEr has quit IRC
23:34:25 <Samu> meh, not as interesting as i thought
23:34:32 <Samu> and it overflows
23:34:32 *** Flygon has joined #openttd
23:35:36 *** andythenorth has left #openttd
23:40:37 *** Samu has quit IRC
23:46:30 *** cHawk_ has joined #openttd
23:52:38 *** cHawk- has quit IRC