IRC logs for #openttd on OFTC at 2020-02-29
⏴ go to previous day
00:01:42 *** Beerbelott has joined #openttd
00:01:46 *** Beerbelott has left #openttd
00:04:24 <andythenorth> is it sleep time?
00:16:01 <spnda> it is very sleepy time...
00:31:48 *** Smedles has joined #openttd
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:57:04 *** UncleCJ[m] has joined #openttd
01:22:49 *** johanna[m] has joined #openttd
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
05:09:37 *** Smedles has joined #openttd
05:33:20 *** Smedles has joined #openttd
05:43:01 *** Smedles has joined #openttd
07:29:41 *** Smedles has joined #openttd
08:11:10 *** Smedles has joined #openttd
08:21:31 *** Progman has joined #openttd
09:10:04 *** andythenorth has joined #openttd
09:14:08 <andythenorth> I was supposed to be doing something?
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:20:51 *** Smedles has joined #openttd
09:50:03 *** HerzogDeXtEr has joined #openttd
09:54:57 <andythenorth> time for Horse 99 then?
10:58:45 * andythenorth starts new Horse
10:58:50 <andythenorth> that's not diligent
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:35:01 <Samu> nielsm, i need to talk to you :p
11:35:38 <DorpsGek> LordAro: Don't ask to ask, just ask
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: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: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:59 <Wolf01> Hmm, mashinky will have power lines before us, not good :P
11:49:56 <_dp_> does it have multiplayer already?
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:55:34 <Wolf01> Think about them like + (or) and * (and) operations
11:55:57 <Samu> if production is 0 and the flag is set to no decrease, closeit = false
11:58:18 <nielsm> I'm not ready to look at code today yet :P
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: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:49 <Samu> so that it's not forgotten :p
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
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: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: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: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:53 <Samu> I don't know how to proceed
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: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: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: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:24:42 *** Wormnest__ has joined #openttd
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: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 *** ChanServ sets mode: +v tokai
18:53:46 <Samu> the callback is always = 0
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
19:00:36 <Samu> it's under enum IndustryCallbackMask {
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: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: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:50:05 <Samu> persistent storage registers? does it the industry production changes aren't done the conventional way?
19:50:26 <nielsm> it lets industries do basically whatever they want
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:57:18 *** Smedles has joined #openttd
22:04:42 <Samu> -6 % 5 = -1 on my programmer calculator
22:05:22 <_dp_> there are several ways of doing modulus operation
22:15:36 <Samu> @calc 5 - ((-(-6) - 1) % 5) - 1
22:19:51 *** glx is now known as Guest17789
22:22:49 <LordAro> Python (dorpsgek) does '%' differently to C
22:23:43 <glx> btw 4 and -1 are the same for %5
23:34:25 <Samu> meh, not as interesting as i thought
23:35:36 *** andythenorth has left #openttd
continue to next day ⏵