IRC logs for #openttd on OFTC at 2018-01-26
            
00:01:59 *** HerzogDeXtEr has quit IRC
00:16:26 *** Wormnest has quit IRC
00:23:08 *** smoke_fumus has quit IRC
00:26:05 <Samu> another dilema to solve
00:27:08 <Samu> /* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
00:27:13 <Samu> this code is removed
00:27:27 <Samu> /* Send the helicopter to a hangar if needed for replacement */
00:27:30 <Samu> along with this
00:28:19 <Samu> now I add code somewhere else that will do what these two were intending to do
00:29:01 <Samu> it deals with airplanes and helicopters, with the exception of heliport (no hangar)
00:29:31 <Samu> heliport... hmm heliport hmm
00:30:10 <Samu> how many commits do I need for this
00:31:53 <Samu> check if the aircraft needs bla bla is removed, helicopter to a hangar is removed. code is added inside aircraft leaving terminal
00:32:08 <Samu> with the exception of heliport
00:32:27 <Samu> bah, i hate commits
00:41:18 <Samu> LordAro: halp me slice this https://paste.openttdcoop.org/psvcvcr2d
00:42:37 <Samu> lines 23-27 and 46-52 are replaced with the code at lines 8-15
00:42:45 <Samu> deals with both
00:42:53 <Samu> the exception is the heliport
00:43:20 <Samu> which is what lines 28-38 are for
00:44:05 <Samu> my commenting doesn't make it obvious :(
00:45:25 <LordAro> so, what's the end result of this patch?
00:46:29 <Samu> at lines 8-15 it checks if the aircraft needs servicing and if the current airport the aircraft is at got an hangar, it sends it to hangar
00:46:49 <Samu> it won't check on landing
00:46:51 <Samu> for airplanes
00:47:00 <Samu> and won't check on takeoff for heli
00:47:28 <Samu> the take off part is a bit hard to explain
00:47:59 <Samu> so aircraft reaches a terminal, does the loading/unloading stuff
00:48:21 <ST2> sidenote: a good tool for slicing https://9gag.com/gag/a9pMg4m
00:48:22 <ST2> xD
00:48:24 <Samu> when he's done, it decides where to go next, i made the checking of servicing right there
00:48:28 <LordAro> i get the bits and pieces, what's the point of the patch
00:49:11 <LordAro> although the removal of the DoCommand is a bit suspicious
00:49:33 <Samu> i removed it because it was cancelling send to hangar automatic services
00:51:02 <Samu> it is more fitting to check for servicing right after the loading/unloading at a terminal, before the aircraft goes to the runway or the helicopter goes into the air
00:52:17 <Samu> the exception to this is the helidepot which has no hangar, so it had to be done at some time after he's in the air
00:52:43 <Samu> and i had to make it deal with serviceathelipad
00:53:31 <Samu> it has just departed from a helipad, which means the automatic servicing interval is reset
00:54:09 <Samu> NeedsAutomaticServicing will fail there
00:54:51 <Samu> if there is an autoreplace set, HasPendingReplace would kick in, and order the helicopter to a hangar
00:55:14 <LordAro> i'm not sure i would split it any further
00:55:44 <LordAro> maybe ask a dev next time they're online what they think
00:55:58 <Samu> there's some other split before this, which is the creation of HasPendingReplace, separate from NeedsServicing
00:56:30 <Samu> let me copy paste brb
00:57:54 <Samu> https://paste.openttdcoop.org/p0a0nmkke separation of HasPendingReplace and NeedsServicing
00:57:55 *** DDR has quit IRC
00:58:21 <Samu> it's the only way I could think of to make it work in tandem with serviceathelipad setting
01:01:55 <Samu> and there's yet another lonely change, sec
01:02:52 <Samu> https://paste.openttdcoop.org/pgc6tqpj9
01:03:21 <Samu> looks minor, but helps a lot with pending replace
01:03:45 <Samu> everything together, makes sense
01:03:50 <Samu> everthing on its own... meh...
01:04:44 *** Biolunar has quit IRC
01:08:55 *** Flygon has joined #openttd
01:23:56 <Samu> well, i gotta go, cyas and thx for the help
01:24:31 *** Samu has quit IRC
01:27:14 *** FLHerne has quit IRC
01:36:09 *** chomwitt has quit IRC
02:31:49 *** Mahjong has quit IRC
02:32:02 *** Mahjong has joined #openttd
02:56:34 *** som89 has quit IRC
03:08:40 *** Gustavo6046 has quit IRC
03:32:33 *** Supercheese has quit IRC
04:30:55 *** Cubey has quit IRC
04:41:39 *** Chrill has joined #openttd
04:43:55 *** Chrill has quit IRC
05:03:12 *** Thedarkb1 has joined #openttd
05:07:00 *** glx has quit IRC
05:09:14 *** Thedarkb has quit IRC
06:13:15 *** Supercheese has joined #openttd
07:38:51 *** sim-al2 has quit IRC
07:55:30 *** roidal has joined #openttd
07:59:50 *** Supercheese has quit IRC
08:56:21 *** Biolunar has joined #openttd
09:37:38 *** Mahjong has quit IRC
09:38:05 *** Mahjong has joined #openttd
10:32:09 *** Biolunar has quit IRC
10:33:21 *** FLHerne has joined #openttd
11:07:30 *** tokai has joined #openttd
11:07:30 *** ChanServ sets mode: +v tokai
11:14:24 *** tokai|noir has quit IRC
12:28:59 *** iSoSyS has joined #openttd
13:11:42 *** roidal_ has joined #openttd
13:18:32 *** roidal has quit IRC
13:31:37 *** TheMask96 has quit IRC
13:32:52 *** TheMask96 has joined #openttd
13:32:56 *** Gja has joined #openttd
13:39:29 *** alluke has quit IRC
13:52:19 *** smoke_fumus has joined #openttd
13:57:00 *** Samu has joined #openttd
13:57:23 <Samu> hello
14:05:24 *** Gustavo6046 has joined #openttd
14:06:57 *** iSoSyS has quit IRC
14:09:20 *** Borg has joined #openttd
14:10:04 <Samu> const char _openttd_revision[] = "h77418634M-trunk";
14:10:05 *** Flygon has quit IRC
14:10:11 <Samu> is this intended?
14:10:35 <Samu> is it because I'm using mercurial?
14:11:02 <Samu> i was used to r12345M style
14:11:55 <Borg> boooom! an idea popped in..
14:11:58 <Borg> currently..
14:12:05 *** sim-al2 has joined #openttd
14:12:06 <Borg> Power Station is end industry.. it just eats coal..
14:12:30 <Borg> im thinking.. to have global power storage... and every industry.. that does production... eats power..
14:12:47 <peter1138> Samu, yes. You are not using svn so you don't get the svn revision.
14:12:59 <Borg> if there is not enough power.. industry stops producing.... you need to found new power station.. and supply coal to it..
14:13:02 <Borg> sounds great? :D
14:13:25 <Samu> ah ok thx
14:13:35 <peter1138> So when you start a game, with no power stations running, what happens?
14:13:43 <Borg> dead end..
14:14:01 <peter1138> Right before you begin? Doesn't sound useful.
14:14:04 <Borg> I will do it... doable in GRF since.. 1.2 GRF have persistent storage
14:14:25 <Borg> peter1138: well, u can try passangers runs.. to get cash to fund power station
14:14:32 <Borg> also.. power stations never vanish...
14:14:38 <Borg> so its not A big issue I think
14:14:54 <Borg> so.. I hope I will do it today :) and start testing..
14:17:26 <Samu> aww sh1337t
14:17:30 <Samu> i think i screwed up
14:18:19 <Samu> https://imgur.com/a/5hVtr look at the graph
14:18:40 <Samu> commits 11-12-13 should be linked to 10
14:18:44 <Samu> what can i do now?
14:19:56 <Borg> I dunno HG...
14:20:07 <Samu> LordAro: wake up, help :o
14:21:11 <Borg> nice descriptions btw.. Trunk 1... etc... very informative...
14:21:24 <Borg> go use SVN...
14:21:34 <Borg> especialy.. because OpenTTD use it.. internally..
14:22:00 <Samu> i thought svn couldn't do patch splitting
14:22:07 <Samu> commit or whatever the heck i'm doing
14:22:28 <Borg> well.. true.. but is that an issue to you?
14:22:36 <Borg> u barelly seems to know what are you doing..
14:22:41 <Borg> so SVN will be better imo
14:23:03 <Borg> do checkout.. make branch.. do commits.. one by one
14:23:07 <Samu> i am slicing my big patch into smaller pieces
14:23:14 <Borg> and you can send svn diff -c <rev>
14:23:24 <Borg> it will be hard..
14:25:15 <Samu> make branch?
14:25:31 <Samu> i got tortoisesvn installed
14:25:53 <Samu> there's a branch/tag or tag/branch option but i never managed to make it work
14:29:04 <Samu> p
14:29:06 <Samu> Copy D:\OpenTTD\trunksvn to svn://svn.openttd.org/trunk, Revision 27967 Path '/trunk' already exists
14:29:21 <Samu> can't do branch/tag thing
14:30:19 <LordAro> Borg: he can't do branching
14:30:35 <LordAro> not without setting up a separate svn repo, which i was not prepared to walk him through
14:31:00 <LordAro> Samu: there are plenty of people here who can help you
14:31:05 *** john-aj has joined #openttd
14:31:29 <LordAro> Samu: but yes, get in the habit of giving these patches meaningful commit messages
14:31:49 <LordAro> so that you don't have to look at the diff to know what they're doing
14:32:10 <Samu> i can ammend yet, i believe
14:32:39 <Samu> the ammend lets me edit the commit message, right? at least I was counting on it
14:32:48 <LordAro> i expect so
14:33:10 <LordAro> Samu: http://thedustytome.com/2014/05/29/Mercurial-Rebase-with-TortoiseHg/ this looks useful to you
14:33:47 <Borg> LordAro: he cant do any VCS I think ;)
14:33:50 <Borg> so.. SVN will be best
14:33:58 <Borg> because its easiest..
14:34:12 <Borg> Samu: copy /trunk to /branch/samu
14:34:19 <Borg> in SVN.. and start commiting there
14:34:35 <Borg> use SVN repo relative structure.. not disk paths
14:34:54 <Borg> SVN is stupid in branching.. but...
14:35:05 <Borg> could be easier for you..
14:35:15 <LordAro> Borg: he cannot commit
14:35:22 <Borg> ah wait.. shit :D sorry
14:35:30 <Borg> I forgot. .how limited SVN is.. I use GIT mostly
14:35:33 <LordAro> ;)
14:35:40 <LordAro> you think i'd bother otherwise? :p
14:35:45 <Borg> ;)
14:36:56 *** iSoSyS has joined #openttd
14:37:45 <Borg> damn.. my Power Plant plan.. failed
14:37:57 <Borg> I need Global GRF storage.. not associated w/ any object
14:41:00 <Borg> something like Persistent Storage: 0x80 - 0xFF
14:41:04 <Borg> would be neat
15:05:14 *** synchris has joined #openttd
15:11:04 <Samu> reading the tutorial, i dunno what's a push
15:11:21 <Samu> i've seen that push button somewhere, but I've never clicked on it
15:12:52 <Samu> my commit 10 should be moved to the left, to be before 11
15:14:26 <Samu> don't tell me i've been doing this wrong from the beginning?
15:15:41 <LordAro> Samu: pushing is sending your commits to a remote location, you won't need it
15:19:03 *** Samu has quit IRC
15:29:06 <Gustavo6046> Why is it always so difficult to make profit with airplanes?
15:32:55 <debdog> hmm, usually using aircraft is like printing money
15:35:33 <Gustavo6046> Probably when duplicating the aircraft.
15:43:26 *** iSoSyS has quit IRC
15:52:05 *** sim-al2 has quit IRC
16:12:49 *** Samu has joined #openttd
16:13:32 <Samu> sorry, power was down for an hour
16:30:31 <peter1138> It was bliss.
16:31:07 *** john-aj has quit IRC
16:31:36 <Rubidium> you don't have a UIS? What kind of third world country is that?
16:31:38 *** chomwitt has joined #openttd
16:33:05 <Samu> Poortugal
16:35:31 *** Biolunar has joined #openttd
16:45:15 <Samu> i still don't know what I'm doing
16:48:04 <__ln__> https://www.dbregio.de/db_regio/view/zukunft/eco-de-me-train.shtml <-- patch needed
16:49:48 <LordAro> Samu: fun faxt, when i first started i wrote diff files by hand
16:49:58 <LordAro> no one has any idea what they're doing when they first start
16:52:15 <Samu> i exported all patches into .patch files
16:52:32 <Samu> 22740.patch, 22741.patch, 22742.patch, etc...
16:53:01 <Samu> how would I share this to some one else interested
16:53:31 <Samu> do they know they have to apply each in correct order?
16:54:28 <Samu> apply 22740 against trunk, then 22741 against 22740, etc?
16:54:48 <Samu> it seems I'm missing the point
16:55:32 <LordAro> generally, patch files are numbered 01-description.patch, 02-description.patch...
16:55:41 <LordAro> i.e. in numerical order
16:56:23 <Samu> 22743 is vs trunk again
16:56:52 <LordAro> so it's the first patch in a separate "queue"
16:59:10 <Samu> 22740.patch becomes 01-apply vs trunk.patch
16:59:25 <Samu> 22741.patch becomes 02-apply vs 01.patch?
16:59:38 <LordAro> no, description of what the patch does
16:59:43 <LordAro> normally the commit message
16:59:53 <LordAro> (and without spaces, they're annoying)
17:00:44 <Samu> ok, i better start adding descriptions to all this, gonna experiment with Ammend
17:00:46 <Samu> amend
17:03:10 <Borg> well.. not a commit message maybe.. but short description... like:
17:03:22 <Borg> 01_pt_translation_fixes.patch
17:04:04 *** iSoSyS has joined #openttd
17:05:51 <Samu> i can't amend, or fail to undesrtand it's purpose
17:06:00 <Samu> damn me
17:06:17 <Borg> it doesnt matter... you are doing diffs..
17:06:31 <Borg> comment description is not part of diff.. so. dont waste time for it..
17:06:37 <Borg> just make patches is correct order..
17:07:24 <Borg> and also.. why did you choosed HG?
17:07:42 <Borg> GIT is more popular. shitloads of howtos and help sites
17:08:40 <LordAro> Borg: i figured it might be easier
17:08:51 <LordAro> could've been wrong, but there we go
17:09:14 <Borg> LordAro: I dunno HG.. but its less popular.. and it seems to mix SVN stuff w/ distrubuted VCS..
17:09:26 <Borg> also.. for Samu.. anything that SVN will be hard anyway
17:11:00 <LordAro> Borg: that's what i figured - marginally closer to what was already known
17:11:07 <LordAro> ¯\_(ツ)_/¯
17:11:08 <Samu> i can only ammend the last thing I've done, commit 13 :(
17:11:18 <Samu> amend*
17:11:42 <Samu> ok, back to doing diffs
17:15:05 *** HerzogDeXtEr has joined #openttd
17:18:36 <Samu> i'm nearly done with aircraft_cmd.cpp with stuff that doesn't require the large_aeroplane_on_short_runway setting yet
17:23:01 <Samu> oh boy, the branching tree is now split into 3, things are starting to complicate :)
17:33:30 <LordAro> Samu: https://mcmblog.azurewebsites.net/how-to-modify-history-in-tortoisehg/ will become interesting to you as well
17:34:16 <Samu> i have branches crossing each other now, i really hope this is fine and all, but it's getting quite messed up for me
17:37:30 <Samu> i reached that phase where I have to create a setting
17:37:37 <Samu> _settings_game.vehicle.large_plane_on_short_runway
17:39:50 <Samu> oh gosh...
17:40:08 <Samu> whoever thought piece by piece was a good idea :(
17:54:48 *** Cubey has joined #openttd
17:56:00 <Samu> order_cmd.cpp
18:01:29 *** TheMask96 has quit IRC
18:05:38 *** TheMask96 has joined #openttd
18:29:51 <Samu> hmm, how many commits for the addition of a game setting?
18:31:02 <Samu> i just feel like doing it all at once, but then i fail the main purpose of what i'm doing
18:34:19 <Samu> needs afterload conversion, needs savegame bump, needs 2 strings, needs a proc, needs to be added to gui...
18:34:55 <Samu> i was thinking of doing these steps all in 1 commit, what u say?
18:35:11 <Samu> there's more to be done afterwards
18:35:24 <Samu> to make the setting actually do anything in the game
18:40:19 *** Cadmus has quit IRC
18:44:01 <Samu> t.t
18:49:40 <LordAro> Samu: probably 1 commit then
18:52:10 *** john-aj has joined #openttd
19:10:57 *** iSoSyS has quit IRC
19:12:26 *** Mahjong has quit IRC
19:13:31 *** glx has joined #openttd
19:13:31 *** ChanServ sets mode: +v glx
19:14:09 <Samu> i'm confused
19:14:51 <Samu> i have the code changes ready for the addition of the setting
19:16:01 <Samu> now this is the continuation of commit 1
19:16:26 <Samu> the branching is becoming chaotic to look at
19:17:17 <Samu> i hate this tree system, doesn't make things clear at all
19:18:27 *** Wolf01 has joined #openttd
19:18:34 <Wolf01> o/
19:19:34 *** frosch123 has joined #openttd
19:20:00 <Samu> how do i make this commit to be applied when commit 1 and commit 17 are applied?
19:20:17 <Samu> are required
19:20:46 <Samu> i can only upgrade to 1 or 17, can't upgrade to both at the same time
19:20:50 <Samu> update*
19:21:10 <frosch123> hola
19:21:55 <Samu> hi
19:22:17 <Wolf01> Quak
19:22:58 <Samu> LordAro: am i screwed? :(
19:23:50 <LordAro> Samu: let's see the tree?
19:24:37 <Samu> k
19:25:36 <Samu> https://imgur.com/SPMBQzL
19:25:46 <Samu> unresolved conflict
19:25:58 <Samu> i'm doomed
19:26:15 <LordAro> no need to be dramatic
19:27:23 <LordAro> Samu: right, i'd recommend deleting 17, checking out 1, and remaking 17 & your new one
19:27:51 *** Progman has joined #openttd
19:28:31 <Samu> ok, deleting 17, sounds like a good idea
19:29:08 <Samu> how do i "delete 17" :( im so noob at this
19:32:41 <Samu> backout? revert all files?
19:37:08 <Samu> gonna try strip
19:38:48 <Samu> rip 17
19:47:44 *** Thedarkb1 has quit IRC
19:51:41 *** Mahjong has joined #openttd
19:54:37 *** FLHerne has quit IRC
19:56:40 *** andythenorth has joined #openttd
19:58:43 <Wolf01> o/
19:58:49 <__ln__> \o
20:01:04 <supermop_work> yo
20:01:34 *** Thedarkb1 has joined #openttd
20:12:57 <andythenorth> hi
20:24:26 <Wolf01> http://www.adnkronos.com/fatti/cronaca/2018/01/26/incidente-treno-scintille-fumo-prima-dell-impatto_CXZ4w4QQGkrJV4YKaZPy1O.html mmmh, I wonder what really happened there, some of the sources say it derailed because a fault on the rail, some others say the fault of the rail was a consequence...
20:31:47 <Wolf01> https://www.packtpub.com/packt/offers/free-learning andythenorth
20:32:31 <andythenorth> could teach me kids with it
20:32:34 <andythenorth> me / my /s
20:33:12 <Wolf01> I should start to learn it too
20:36:07 *** smoke_fumus has quit IRC
20:50:37 *** Thedarkb1 has quit IRC
20:54:04 <Samu> i'm approaching the end
20:54:10 <Samu> it's almost done
20:55:19 <Samu> these depot order fixes were part of bugs I found and fixed along the way, but I don't remember the exact details of reproducing one
20:55:35 <Samu> must trial and error to discover
20:56:48 <john-aj> cool!
20:59:33 *** Wormnest has joined #openttd
21:02:59 <Samu> ah, i remember
21:03:23 <Samu> it's about go to hangar in the order list
21:03:40 <Samu> order 1: go to hangar A
21:03:46 <Samu> order 2: go to hangar B
21:03:56 <Samu> the plane is currently executing order 1
21:04:09 <Samu> if you skip to order 2, the plane still goes to hangar A
21:04:21 <Samu> it's a bug in openttd itself
21:09:59 <Eddi|zuHause> Wolf01: in germany, there's usually a detailed report about half a year later tracing every step that lead to the crash
21:10:03 *** john-aj has quit IRC
21:13:52 <Samu> looks like there only 1 more commit to go
21:14:51 *** som89 has joined #openttd
21:15:45 <Samu> vehicle.cpp
21:20:46 <Samu> done
21:20:47 *** john-aj has joined #openttd
21:20:50 <Samu> 23 commits
21:21:07 <Samu> now I'm a bit lost, what do i do next?
21:24:06 <Samu> https://imgur.com/J54zihH the end result!
21:24:11 <Samu> not quite what I expected
21:24:44 <Samu> 10 and 11 should have been linked together, but i failed there
21:24:55 <Samu> not much of a problem, but meh
21:29:34 <Samu> LordAro: what now?
21:31:44 <Samu> is it supposed to look like that? feels disconnected~
21:32:00 *** Thedarkb1 has joined #openttd
21:38:59 *** john-aj has quit IRC
21:42:30 *** synchris has quit IRC
21:44:24 <Wolf01> https://www.youtube.com/watch?v=NitIxL7iLEY this reminds me something... like the video posted by andythenorth :P
21:45:06 <andythenorth> it's good eh :)
21:49:04 *** Borg has quit IRC
21:55:21 <frosch123> what cost more? the lego or the hall construction?
22:04:16 <andythenorth> both
22:08:11 *** happpy has joined #openttd
22:08:20 *** happpy has left #openttd
22:50:11 *** FLHerne has joined #openttd
22:50:33 *** Mahjong has quit IRC
22:54:32 *** Mahjong has joined #openttd
23:05:38 *** sim-al2 has joined #openttd
23:17:36 *** frosch123 has quit IRC
23:33:06 *** roidal_ has quit IRC
23:34:05 *** andythenorth has quit IRC
23:40:55 <Samu> 06 - RemoveOrderFromAllVehicles - prepare code to allow invalidation of go to hangar order while keeping go to airport order belonging to the same station.patch
23:41:03 <Samu> too long name?
23:44:17 <Samu> 07 - UpdateAirplanesOnNewStation - invalidade go to hangar orders when replacing an airport with a heliport.patch
23:44:58 <Samu> daed chat
23:45:07 <LordAro> yes too long
23:45:32 <LordAro> and replace spaces wirh - or _
23:46:35 <Samu> really? for any special reason?
23:46:46 <Samu> but ok i'll do it
23:47:34 <Samu> 01_FindNearestHangar__re-arrange_code_for_what's_to_come.patch
23:47:37 <Samu> something like this?
23:48:55 <LordAro> something like that
23:49:05 <LordAro> no apostrophes either
23:49:31 <LordAro> spaces and quotes tend to cause issues on commandlines
23:49:44 <Samu> oh, i see
23:50:19 <Samu> is it ok to use double _ ?
23:50:20 <Samu> __
23:51:28 <LordAro> sure, although it lengthens it further
23:51:42 <LordAro> keep it short, but descriptive
23:52:09 <LordAro> (also, "dead chat" after 4 minutes is silly, don't do that)
23:53:14 <Samu> 05_UpdateAirplanesOnNewStation__cancel_send_to_hangar_order_when_the_rebuilt_airport_doesnt_have_a_hangar_or_if_the_aircraft_cant_land_on_it.patch
23:53:41 <Samu> i wonder
23:54:51 <LordAro> wway too long
23:54:59 <LordAro> 80chars, ish
23:55:03 <Samu> how am i gonna short this while being descriptive enough
23:55:12 <Samu> i doomed myself
23:58:29 *** Progman has quit IRC
23:59:20 <LordAro> full description is what commit messages are for