IRC logs for #openttd on OFTC at 2018-01-26
⏴ go to previous day
00:27:08 <Samu> /* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
00:27:27 <Samu> /* Send the helicopter to a hangar if needed for replacement */
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:42:37 <Samu> lines 23-27 and 46-52 are replaced with the code at lines 8-15
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: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: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: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: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:23:56 <Samu> well, i gotta go, cyas and thx for the help
02:32:02 *** Mahjong has joined #openttd
05:03:12 *** Thedarkb1 has joined #openttd
06:13:15 *** Supercheese has joined #openttd
08:56:21 *** Biolunar has joined #openttd
09:38:05 *** Mahjong has joined #openttd
10:33:21 *** FLHerne has joined #openttd
11:07:30 *** ChanServ sets mode: +v tokai
13:11:42 *** roidal_ has joined #openttd
13:32:52 *** TheMask96 has joined #openttd
13:52:19 *** smoke_fumus has joined #openttd
14:05:24 *** Gustavo6046 has joined #openttd
14:10:04 <Samu> const char _openttd_revision[] = "h77418634M-trunk";
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: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:35 <peter1138> So when you start a game, with no power stations running, what happens?
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:18:40 <Samu> commits 11-12-13 should be linked to 10
14:20:07 <Samu> LordAro: wake up, help :o
14:21:11 <Borg> nice descriptions btw.. Trunk 1... etc... very informative...
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: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: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:33:47 <Borg> LordAro: he cant do any VCS I think ;)
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:30 <Borg> I forgot. .how limited SVN is.. I use GIT mostly
14:35:40 <LordAro> you think i'd bother otherwise? :p
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
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: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.
16:13:32 <Samu> sorry, power was down for an hour
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:35:31 *** Biolunar has joined #openttd
16:45:15 <Samu> i still don't know what I'm doing
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: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:03:10 <Borg> well.. not a commit message maybe.. but short description... like:
17:03:22 <Borg> 01_pt_translation_fixes.patch
17:05:51 <Samu> i can't amend, or fail to undesrtand it's purpose
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:08 <Samu> i can only ammend the last thing I've done, commit 13 :(
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: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:40:08 <Samu> whoever thought piece by piece was a good idea :(
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:49:40 <LordAro> Samu: probably 1 commit then
18:52:10 *** john-aj has joined #openttd
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: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:46 <Samu> i can only upgrade to 1 or 17, can't upgrade to both at the same time
19:22:58 <Samu> LordAro: am i screwed? :(
19:23:50 <LordAro> Samu: let's see the tree?
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:51:41 *** Mahjong has joined #openttd
19:56:40 *** andythenorth has joined #openttd
20:01:34 *** Thedarkb1 has joined #openttd
20:32:31 <andythenorth> could teach me kids with it
20:33:12 <Wolf01> I should start to learn it too
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:59:33 *** Wormnest has joined #openttd
21:03:23 <Samu> it's about go to hangar in the order list
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:13:52 <Samu> looks like there only 1 more commit to go
21:20:47 *** john-aj has joined #openttd
21:21:07 <Samu> now I'm a bit lost, what do i do next?
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:31:44 <Samu> is it supposed to look like that? feels disconnected~
21:32:00 *** Thedarkb1 has joined #openttd
21:55:21 <frosch123> what cost more? the lego or the hall construction?
22:50:11 *** FLHerne has joined #openttd
22:54:32 *** Mahjong has joined #openttd
23:05:38 *** sim-al2 has joined #openttd
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:44:17 <Samu> 07 - UpdateAirplanesOnNewStation - invalidade go to hangar orders when replacing an airport with a heliport.patch
23:45:32 <LordAro> and replace spaces wirh - or _
23:46:35 <Samu> really? for any special reason?
23:47:34 <Samu> 01_FindNearestHangar__re-arrange_code_for_what's_to_come.patch
23:49:05 <LordAro> no apostrophes either
23:49:31 <LordAro> spaces and quotes tend to cause issues on commandlines
23:50:19 <Samu> is it ok to use double _ ?
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:55:03 <Samu> how am i gonna short this while being descriptive enough
23:59:20 <LordAro> full description is what commit messages are for
continue to next day ⏵