IRC logs for #openttd on OFTC at 2018-09-13
            
00:01:03 *** HerzogDeXtEr has quit IRC
00:01:53 <Samu> problem solved
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:06:14 *** Wolf01 has quit IRC
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:07 <Samu> i dont understand
00:38:18 <Samu> if it isn't loading any data, how come it is saved?
00:44:04 *** rocky113844 has quit IRC
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:45:25 <Samu> magic?
00:46:46 <Samu> this does not make any sense!
00:46:47 <Samu> .
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:52:42 <Samu> but...
00:53:10 <Samu> i didn't load the data in the Load() function
00:53:19 <Samu> i moved it to Start()
00:55:10 *** Thedarkb-T60 has quit IRC
00:55:12 <Samu> it didn't start
00:55:21 <Samu> or at least I don't think it did
00:56:20 *** Wormnest has quit IRC
01:02:02 <Samu> https://paste.openttdcoop.org/pdvlasfad
01:03:15 <Samu> glx: i saved a game
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:05:33 <Samu> why
01:24:24 *** Flygon has joined #openttd
01:27:02 *** snail_UES_ has joined #openttd
01:42:04 <Samu> https://imgur.com/eH79LFX
01:42:13 <Samu> this is better than an outright crash
01:42:18 <Samu> :(
01:43:11 *** Supercheese has quit IRC
01:46:18 *** debdog has joined #openttd
01:57:32 *** OsteHovel has quit IRC
02:00:37 *** D-HUND has joined #openttd
02:01:19 *** debdog has quit IRC
02:35:16 *** D-HUND is now known as debdog
02:38:17 *** Sacro has quit IRC
03:04:03 *** D-HUND has joined #openttd
03:04:29 *** debdog has quit IRC
03:06:29 *** KouDy has quit IRC
03:12:59 *** D-HUND has quit IRC
03:27:12 *** Progman has quit IRC
03:30:18 *** glx has quit IRC
04:08:06 *** Samu has quit IRC
05:00:46 *** KouDy has joined #openttd
05:24:28 *** haudrauf has quit IRC
05:26:18 *** haudrauf has joined #openttd
05:41:17 *** snail_UES_ has quit IRC
05:42:46 *** Supercheese has joined #openttd
06:27:03 *** SpComb^ has joined #openttd
06:27:58 *** SpComb has quit IRC
06:41:21 *** Wacko1976 has joined #openttd
06:53:29 *** Wacko1976 has quit IRC
07:28:59 *** ToBeFree has joined #openttd
07:49:59 *** OsteHovel has joined #openttd
08:21:37 *** Gustavo6046 has quit IRC
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:08:15 *** tokai has quit IRC
09:27:04 *** Supercheese has quit IRC
09:27:27 *** Supercheese has joined #openttd
09:32:54 <planetmaker> moin
09:55:32 *** gelignite has joined #openttd
10:38:49 *** snail_UES_ has quit IRC
11:13:56 *** Arveen has quit IRC
11:26:36 *** Supercheese has quit IRC
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?
12:02:59 <LordAro> which one is ratt?
12:22:25 *** Sacro has joined #openttd
12:56:03 *** Samu has joined #openttd
13:03:39 <DorpsGek_II> [OpenTTD/OpenTTD] MosheL commented on issue #6427: [Windows] RTL bug OpenTTD 1.6.0-RC1 https://github.com/OpenTTD/OpenTTD/issues/6427#issuecomment-420969044
13:16:15 <LordAro> interesting
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:28:35 *** gelignite has quit IRC
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:54:35 <Samu> namely, which town
13:54:41 <Samu> not a company
13:55:11 <Samu> maybe it is, let me think this through
14:01:49 *** Arveen has joined #openttd
14:31:26 *** snail_UES_ has joined #openttd
14:37:32 *** sla_ro|master has joined #openttd
15:00:15 *** sla_ro|master has quit IRC
15:44:34 *** KouDy has quit IRC
15:49:19 *** sim-al2 has quit IRC
16:04:33 *** nielsm has joined #openttd
16:10:31 *** Progman has quit IRC
16:15:49 *** haudrauf has quit IRC
16:19:35 *** haudrauf has joined #openttd
16:20:37 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on issue #6427: [Windows] RTL bug OpenTTD 1.6.0-RC1 https://github.com/OpenTTD/OpenTTD/issues/6427#issuecomment-421024524
16:22:11 *** KouDy has joined #openttd
16:30:21 *** Flygon has quit IRC
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
16:40:52 <Samu> i hope so lol
16:49:49 *** snail_UES_ has quit IRC
17:01:21 *** sla_ro|master has joined #openttd
17:21:18 *** Gja has joined #openttd
17:44:16 *** wodencafe has joined #openttd
17:46:49 *** Gja has quit IRC
17:47:53 *** FLHerne has quit IRC
17:48:29 *** FLHerne has joined #openttd
17:52:10 *** Samu has quit IRC
18:03:34 *** Samu 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:33:38 *** Samu has quit IRC
18:44:07 <LordAro> probably not
18:49:45 *** Wacko1976 has joined #openttd
19:07:55 *** KouDy has quit IRC
19:25:48 *** Wormnest has joined #openttd
19:26:16 *** KouDy has joined #openttd
19:53:15 *** Samu has joined #openttd
20:02:09 *** Smedles has quit IRC
20:02:09 *** APTX has quit IRC
20:02:25 *** Smedles has joined #openttd
20:02:25 *** APTX has joined #openttd
20:04:15 *** Wolf01 has joined #openttd
20:04:24 <Wolf01> o/
20:16:20 *** andythenorth has joined #openttd
20:16:24 <andythenorth> oof
20:16:29 <andythenorth> can I just hire TrueBrain? :|
20:19:36 *** Gja has joined #openttd
20:19:58 *** KouDy has quit IRC
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:27 <TrueBrain> yes; that is :P
20:23:34 <andythenorth> my eyes bleed
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:24:32 <Samu> https://paste.openttdcoop.org/pjjkhttos 161 lines :8
20:26:53 <Samu> i dont need to build signs anymore, removing
20:27:17 <Samu> 160 lines
20:27:29 <andythenorth> so can we rek any PRs? :) https://github.com/OpenTTD/OpenTTD/pulls
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:28:14 <TrueBrain> my = many
20:28:17 <TrueBrain> typing is hard
20:30:03 <andythenorth> I think NRT is rotted nearly through
20:30:17 <andythenorth> and that one by peter1138 https://github.com/OpenTTD/OpenTTD/pull/6784
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:31:40 *** Stimrol_ has quit IRC
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:49:58 <Samu> ah, the codestyle issue
20:51:13 <Samu> return (Money)(int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
20:51:16 <Samu> something like this?
20:51:31 <Samu> gonna test
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:54:09 *** KouDy has joined #openttd
20:57:16 <Samu> Error (active) more than one operator "" matches these operands:
20:57:17 <Samu> blabla
20:57:32 <Samu> operand types are: Money * Money
20:58:05 <Samu> return (int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
20:58:07 <Samu> this works
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:06:54 *** Guest422 has quit IRC
21:09:03 <Samu> price is Money
21:09:20 <Samu> maintenancecost factor is uint16
21:09:40 <Samu> and Money ScriptAirport::GetMonthlyMaintenanceCost is supposed to return Money
21:10:33 <Samu> https://imgur.com/UopH5bX
21:10:35 <Samu> it works
21:10:42 <Samu> return (int)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
21:10:44 <Samu> this
21:11:54 <Samu> lol montly
21:11:58 <Samu> monthly :o
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:15:16 <Samu> gonna try
21:15:58 <Samu> nop
21:16:07 <Samu> it still complains about uint16 one
21:17:30 <Samu> https://paste.openttdcoop.org/pzkccdaam
21:17:32 <Samu> the error
21:19:00 <Samu> i suppose I have 4 choices
21:19:13 <Samu> int64, int, uint, byte
21:19:22 <Samu> i went with int, but maybe some other is more fitting
21:24:05 *** Thedarkb-T60 has joined #openttd
21:24:22 *** Gja has quit IRC
21:46:34 <planetmaker> money basically is an overflow-safe uint64 iirc
21:50:27 *** sim-al2 has quit IRC
21:54:00 <Samu> OverflowSafeInt
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:00:39 <Samu> which one planetmaker ?
22:01:17 <planetmaker> 3
22:01:26 <Samu> oki
22:01:48 <Samu> thx
22:10:03 *** sla_ro|master has quit IRC
22:13:29 *** GroovyNoodle has quit IRC
22:16:06 <peter1138> Is that counting from 0 or 1? :D
22:16:38 <planetmaker> :)
22:24:17 <Samu> could someone explain me the right steps to create a pull request?
22:24:22 <Samu> i first clicked fork
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:29:24 <Samu> what do I need?
22:30:26 <Samu> patch 1: airportmaintenance for scripts, patch 2: config_random bug
22:31:30 <andythenorth> oof
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:03 <planetmaker> he
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:34 <planetmaker> :D :D
22:33:59 <planetmaker> if it is any consolance: I know that feeling first-hand
22:34:01 <Samu> a new branch
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
22:48:14 <andythenorth> bye
22:48:15 *** andythenorth has quit IRC
22:52:42 *** Guest435 has quit IRC
23:00:05 <Samu> Create a new branch for this commit and start a pull request. Learn more about pull requests.
23:00:07 <Samu> aha!!
23:00:19 <Samu> found the holy grail
23:12:52 *** frosch123 has quit IRC
23:17:53 <Samu> where do I see the list of categories?
23:18:19 <Samu> for the docker commit log dude?
23:19:14 <Samu> commit-checker
23:19:50 <Samu> the ([<section])
23:19:54 <Samu> part
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:28:22 *** nielsm has quit IRC
23:43:22 *** glx has joined #openttd
23:43:22 *** ChanServ sets mode: +v glx
23:43:59 <Samu> https://github.com/OpenTTD/OpenTTD/issues/6892
23:44:05 <Samu> did it work?
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:00 <Samu> too much bureoucracy
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:53:54 <LordAro> Samu: if you go here, it'll probably tell you you've recently pushed to a branch https://github.com/OpenTTD/OpenTTD
23:55:58 <LordAro> however, there is also https://github.com/SamuXarick/OpenTTD/pull/new/
23:56:22 <LordAro> (github itself gives you a link when you push a new branch to a fork)
23:57:23 *** Wormnest has quit IRC
23:59:04 <Eddi|zuHause> "python removes references to 'master'/'slave'"... that is surely not going to backfire on the twitterverse
23:59:19 <Samu> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:CONFIG_RANDOM-fix
23:59:53 <Samu> Create Pull Request?