IRC logs for #openttd on OFTC at 2018-09-13
⏴ go to previous day
00:06:01 <Samu> function Save() { while(!loading); AILog.Warning("Saving...");
00:06:10 <Samu> is that while gonna do what I think it's gonna do?
00:13:06 <glx> infinite loop when loading is false, if that's what you think
00:34:40 <Samu> should be loading is true, my bad
00:35:16 <Samu> while(loading) { AILog.Warning("Still loading, can't save yet...") }
00:38:18 <Samu> if it isn't loading any data, how come it is saved?
00:45:23 <Samu> there's something going on... if I didn't let the AI load the data from the save, how come when I save and load it back, the data is there?
00:46:46 <Samu> this does not make any sense!
00:48:21 <Samu> does this mean I don't need to load any data at all? i dont understand what's going on, why is the data there
00:48:48 <glx> loading happens only when you load the savegame
00:50:24 *** sim-al2 has joined #openttd
00:53:10 <Samu> i didn't load the data in the Load() function
00:55:21 <Samu> or at least I don't think it did
01:04:02 <Samu> then i loaded it and paused the game right away, before it started main Start()
01:04:27 <Samu> so all that part from line 88 below was not executed
01:04:44 <Samu> I save at this point again
01:05:04 <Samu> I expect nothing to be saved
01:05:32 <Samu> but when I load it back, all the data is there
01:27:02 *** snail_UES_ has joined #openttd
01:42:13 <Samu> this is better than an outright crash
02:35:16 *** D-HUND is now known as debdog
05:26:18 *** haudrauf has joined #openttd
05:42:46 *** Supercheese has joined #openttd
06:27:03 *** SpComb^ has joined #openttd
06:41:21 *** Wacko1976 has joined #openttd
07:28:59 *** ToBeFree has joined #openttd
07:49:59 *** OsteHovel has joined #openttd
08:25:03 *** snail_UES_ has joined #openttd
08:45:10 *** Gustavo6046 has joined #openttd
09:01:16 *** tokai|noir has joined #openttd
09:01:16 *** ChanServ sets mode: +v tokai|noir
09:27:27 *** Supercheese has joined #openttd
09:55:32 *** gelignite has joined #openttd
11:32:20 *** Progman has joined #openttd
11:54:34 <alluke> how many years will it take to get ratt into trunk?
11:54:47 <alluke> 1.9.0 too soon i suppose?
13:16:26 <LordAro> fixed by uniscribe, do we think?
13:21:26 <Eddi|zuHause> worth asking to retest with trunk
13:21:44 <Eddi|zuHause> would be helpful if we had nightlies?
13:22:40 <Eddi|zuHause> i'm looking for an old laptop and i can't figure out where i put it
13:42:13 <LordAro> Eddi|zuHause: nightlies would be helpful, yes :p
13:54:29 <Samu> is it possible to know to whom a road tile belongs?
13:55:11 <Samu> maybe it is, let me think this through
14:31:26 *** snail_UES_ has joined #openttd
14:37:32 *** sla_ro|master has joined #openttd
16:19:35 *** haudrauf has joined #openttd
16:40:33 <Samu> local arrayMiddleTile = roadArray[roadArray.len() / 2].m_tile;
16:40:45 <Samu> is this gonna get me the the middle tile
17:01:21 *** sla_ro|master has joined #openttd
17:44:16 *** wodencafe has joined #openttd
17:48:29 *** FLHerne has joined #openttd
18:19:53 <Samu> local adjacentTiles = (roadTiles = Utils.getAdjacentTiles(tile));
18:19:59 <Samu> will this work in squirrel code?
18:31:48 *** HerzogDeXtEr has joined #openttd
18:49:45 *** Wacko1976 has joined #openttd
19:25:48 *** Wormnest has joined #openttd
20:02:25 *** Smedles has joined #openttd
20:16:20 *** andythenorth has joined #openttd
20:16:29 <andythenorth> can I just hire TrueBrain? :|
20:22:18 *** frosch123 has joined #openttd
20:22:54 <TrueBrain> what do you want me to destroy andythenorth?
20:23:02 <andythenorth> I am still looking for an SRE :P
20:23:09 <andythenorth> I am reduced to wading through linkedin
20:23:13 <andythenorth> spamming devops engineers
20:23:17 <andythenorth> it's like the worst thing ever
20:23:27 <andythenorth> but it has worked a couple of times before :|
20:23:37 <andythenorth> everyone will hate me
20:23:40 <TrueBrain> reason I deleted my LinkedIn tbh
20:23:44 <andythenorth> and linkedin only ever gets worse
20:24:07 <Samu> damn it, for building a road depot i have to write a bajillion of lines in code
20:26:53 <Samu> i dont need to build signs anymore, removing
20:27:56 <TrueBrain> we should add a "rotting" process .. where PRs without attention automatically get pinged, and in the end closed
20:28:03 <TrueBrain> I really like that in my other github projects :)
20:28:14 <Samu> andythenorth added the waiting-on-author label 3 days ago, but I already answered :(
20:30:03 <andythenorth> I think NRT is rotted nearly through
20:30:53 <andythenorth> new label: "didn't happen"
20:31:23 <andythenorth> Samu: your PR is 'waiting-on-author' because it fails to meet checks
20:31:33 <andythenorth> so not much incentive for anyone to look at it :)
20:34:52 <Samu> I was hoping someone would do that part for me :(
20:37:02 <Samu> we're talking about the commit message, right?
20:40:33 *** Stimrol has joined #openttd
20:40:48 *** GroovyNoodle has joined #openttd
20:51:13 <Samu> return (Money)(int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
20:51:45 <planetmaker> Money and int are both types. a double cast is not needed.
20:51:51 <planetmaker> Just cast to Money
20:52:31 <planetmaker> looking at the line you quoted I actually wonder whether any cast is needed at all
20:53:18 <Samu> GetMaintenanceCostFactor(type) is a uint16 and can't multiply with _price[PR...
20:53:28 <Samu> unless ... it can now, brb
20:57:16 <Samu> Error (active) more than one operator "" matches these operands:
20:57:32 <Samu> operand types are: Money * Money
20:58:05 <Samu> return (int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
20:58:17 <Samu> but is it returning Money?
20:58:31 <Samu> /* static */ Money ScriptAirport::GetMonthlyMaintenanceCost(AirportType type)
20:58:46 *** sim-al2 has joined #openttd
21:05:05 <planetmaker> well, you will want to return a Money. So can't you cast the price to Money instead?
21:06:25 *** sim-al2 is now known as Guest422
21:06:25 *** sim-al2 has joined #openttd
21:09:20 <Samu> maintenancecost factor is uint16
21:09:40 <Samu> and Money ScriptAirport::GetMonthlyMaintenanceCost is supposed to return Money
21:10:42 <Samu> return (int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
21:14:26 <planetmaker> casting to uint16 might work mostly. But fail for higher prices. Money is the far bigger type
21:14:55 <planetmaker> return GetMaintenanceCostFactor(type) * (Money) (_price[PR_INFRASTRUCTURE_AIRPORT] >> 3);
21:14:59 <planetmaker> ^^ wouldn't that work?
21:16:07 <Samu> it still complains about uint16 one
21:19:00 <Samu> i suppose I have 4 choices
21:19:22 <Samu> i went with int, but maybe some other is more fitting
21:24:05 *** Thedarkb-T60 has joined #openttd
21:46:34 <planetmaker> money basically is an overflow-safe uint64 iirc
22:00:03 <Samu> return (uint)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
22:00:12 <Samu> return (int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
22:00:22 <Samu> return (int64)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
22:00:34 <Samu> return (byte)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
22:16:06 <peter1138> Is that counting from 0 or 1? :D
22:24:17 <Samu> could someone explain me the right steps to create a pull request?
22:25:21 <Samu> SamuXarick/OpenTTD forked from OpenTTD/
22:26:00 <Samu> This branch is even with OpenTTD:master.
22:26:13 <Samu> do i create a branch for every pull request?
22:26:22 <Samu> how do i create a branch :(
22:27:09 <Samu> maybe it's not what I want
22:27:51 <Samu> let's say, i have this patch ready
22:28:31 <Samu> how do i create a pull request just for this patch only
22:28:49 <Samu> imagine i have other patches for other stuff not related to the first patch
22:29:19 <Samu> i wanted to revert back to the original state, but without affecting the pull requests
22:30:26 <Samu> patch 1: airportmaintenance for scripts, patch 2: config_random bug
22:31:35 <andythenorth> I wrote 4 hours of code yesterday
22:31:48 <andythenorth> for something my framework already does
22:31:58 <andythenorth> but I assumed it wouldn't be able to do
22:32:22 <planetmaker> call that lerning curve ;)
22:32:38 <LordAro> Samu: switch back to master, make a new branch from there
22:32:58 <andythenorth> planetmaker: I wouldn't mind, but I wrote the framework :P
22:33:59 <planetmaker> if it is any consolance: I know that feeling first-hand
22:39:04 <Samu> uh, i dunno how to create a new branch
22:41:25 <Samu> Your branches You haven’t pushed any branches to this repository.
22:47:59 *** andythenorth is now known as Guest435
22:48:07 *** andythenorth has joined #openttd
23:00:05 <Samu> Create a new branch for this commit and start a pull request. Learn more about pull requests.
23:17:53 <Samu> where do I see the list of categories?
23:18:19 <Samu> for the docker commit log dude?
23:20:18 <Samu> *** First line of message must match: '<keyword>( #<issue>| <commit>(, (<keyword> #<issue>|<commit>))*)?: ([<section])? <Details>'
23:20:55 <Samu> where's the list of section
23:44:20 <Samu> what am i supposed to do now?
23:45:26 <Samu> I see a SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue 6 minutes ago
23:46:13 <Samu> someone explain what to do now
23:51:35 *** Progman has joined #openttd
23:53:30 <LordAro> Samu: you've made a pull request against your fork, rather than the origin
23:56:22 <LordAro> (github itself gives you a link when you push a new branch to a fork)
23:59:04 <Eddi|zuHause> "python removes references to 'master'/'slave'"... that is surely not going to backfire on the twitterverse
continue to next day ⏵