Log for #openttd on 25th September 2016:
Times are UTC Toggle Colours
00:01:56  <Samu> well... not entirely, but still...
00:23:26  *** FLHerne has quit IRC
00:27:01  *** FLHerne has joined #openttd
00:36:53  *** FLHerne_ has joined #openttd
00:36:53  *** FLHerne has quit IRC
00:40:45  *** sim-al2 has quit IRC
00:40:45  *** Ttech has quit IRC
00:40:45  *** _dp_ has quit IRC
00:40:45  *** umgeher has quit IRC
00:40:45  *** Smedles has quit IRC
00:40:45  *** DDR has quit IRC
00:40:45  *** Ethereal_Whisper has quit IRC
00:40:45  *** Vadtec has quit IRC
00:40:45  *** murr4y has quit IRC
00:40:45  *** fiatjaf has quit IRC
00:40:45  *** txtsd has quit IRC
00:40:45  *** Supercheese has quit IRC
00:40:45  *** Speedy has quit IRC
00:40:45  *** Compu has quit IRC
00:40:45  *** Extrems has quit IRC
00:40:45  *** ABCRic has quit IRC
00:40:45  *** innocenat has quit IRC
00:40:45  *** Sylf has quit IRC
00:40:45  *** ccfreak2k has quit IRC
00:40:45  *** mikegrb has quit IRC
00:40:45  *** efess has quit IRC
00:40:45  *** jonty-co1p has quit IRC
00:40:45  *** Flygon has quit IRC
00:40:45  *** mindlesstux has quit IRC
00:40:45  *** Tharbakim has quit IRC
00:40:45  *** argoneus has quit IRC
00:40:45  *** davidstrauss has quit IRC
00:40:45  *** ST2 has quit IRC
00:40:45  *** theholyduck has quit IRC
00:40:45  *** avdg has quit IRC
00:40:45  *** greeter has quit IRC
00:40:45  *** Sirenia has quit IRC
00:40:45  *** Terkhen has quit IRC
00:40:45  *** Yexo has quit IRC
00:40:45  *** SmatZ has quit IRC
00:40:45  *** Taede has quit IRC
00:40:46  *** dihedral has quit IRC
00:40:46  *** nilez has quit IRC
00:40:46  *** supermop has quit IRC
00:40:46  *** ConductorCat has quit IRC
00:40:46  *** dustinm` has quit IRC
00:40:46  *** Clockworker has quit IRC
00:41:39  *** umgeher has joined #openttd
00:41:39  *** _dp_ has joined #openttd
00:41:39  *** Ttech has joined #openttd
00:41:39  *** sim-al2 has joined #openttd
00:41:39  *** Clockworker has joined #openttd
00:41:39  *** dustinm` has joined #openttd
00:41:39  *** ConductorCat has joined #openttd
00:41:39  *** supermop has joined #openttd
00:41:39  *** nilez has joined #openttd
00:41:39  *** efess has joined #openttd
00:41:39  *** jonty-co1p has joined #openttd
00:41:39  *** Flygon has joined #openttd
00:41:39  *** mindlesstux has joined #openttd
00:41:39  *** Tharbakim has joined #openttd
00:41:39  *** argoneus has joined #openttd
00:41:39  *** ST2 has joined #openttd
00:41:39  *** theholyduck has joined #openttd
00:41:39  *** greeter has joined #openttd
00:41:39  *** Sirenia has joined #openttd
00:41:39  *** davidstrauss has joined #openttd
00:41:39  *** dihedral has joined #openttd
00:41:39  *** avdg has joined #openttd
00:41:39  *** Taede has joined #openttd
00:41:39  *** Yexo has joined #openttd
00:41:39  *** SmatZ has joined #openttd
00:41:39  *** Terkhen has joined #openttd
00:41:39  *** sets mode: +ov Terkhen Terkhen
00:41:40  *** Smedles has joined #openttd
00:41:40  *** DDR has joined #openttd
00:41:40  *** Ethereal_Whisper has joined #openttd
00:41:40  *** murr4y has joined #openttd
00:41:40  *** txtsd has joined #openttd
00:41:40  *** fiatjaf has joined #openttd
00:41:40  *** Vadtec has joined #openttd
00:41:57  *** Supercheese has joined #openttd
00:41:57  *** Speedy has joined #openttd
00:41:57  *** Compu has joined #openttd
00:41:57  *** Extrems has joined #openttd
00:41:57  *** ABCRic has joined #openttd
00:41:57  *** innocenat has joined #openttd
00:41:57  *** mikegrb has joined #openttd
00:41:57  *** ccfreak2k has joined #openttd
00:41:57  *** Sylf has joined #openttd
00:50:29  *** glx has quit IRC
00:52:04  *** guru3_ has joined #openttd
00:53:53  *** ChanServ sets mode: +o Rubidium
00:53:53  *** ChanServ sets mode: +o orudge
00:53:53  *** ChanServ sets mode: +v DorpsGek
00:56:44  *** FLHerne_ has quit IRC
00:56:44  *** Nothing4You has quit IRC
00:56:44  *** chnkr_ has quit IRC
00:56:45  *** guru3 has quit IRC
00:56:45  *** Alkel_U3 has quit IRC
00:56:45  *** Mazur has quit IRC
00:56:45  *** mescalito has quit IRC
00:56:45  *** seatsea has quit IRC
00:56:45  *** debdog has quit IRC
00:56:45  *** Cursarion has quit IRC
00:56:45  *** zeknurn has quit IRC
00:56:45  *** MonkeyDrone has quit IRC
00:56:45  *** goodger has quit IRC
00:56:45  *** LongyanG has quit IRC
00:56:45  *** Cybertinus has quit IRC
00:56:45  *** tneo has quit IRC
00:57:35  *** FLHerne_ has joined #openttd
00:57:35  *** Nothing4You has joined #openttd
00:57:35  *** chnkr_ has joined #openttd
00:57:35  *** guru3 has joined #openttd
00:57:35  *** Alkel_U3 has joined #openttd
00:57:35  *** Mazur has joined #openttd
00:57:35  *** mescalito has joined #openttd
00:57:35  *** seatsea has joined #openttd
00:57:35  *** debdog has joined #openttd
00:57:35  *** Cursarion has joined #openttd
00:57:35  *** zeknurn has joined #openttd
00:57:35  *** MonkeyDrone has joined #openttd
00:57:35  *** goodger has joined #openttd
00:57:35  *** LongyanG has joined #openttd
00:57:35  *** Cybertinus has joined #openttd
00:57:36  *** guru3 has quit IRC
00:57:46  *** LongyanG has quit IRC
00:57:52  *** LongyanG has joined #openttd
00:58:21  *** Cursarion has quit IRC
00:58:51  *** goodger has quit IRC
00:59:06  *** FLHerne_ has quit IRC
00:59:55  *** chnkr_ has quit IRC
01:00:36  *** Mazur has quit IRC
01:00:56  *** Alkel_U3 has quit IRC
01:01:02  *** Mazur has joined #openttd
01:01:16  *** Cursarion has joined #openttd
01:01:38  *** chnkr_ has joined #openttd
01:01:44  *** tneo has joined #openttd
01:02:04  *** Alkel_U3 has joined #openttd
01:02:12  *** goodger has joined #openttd
01:11:53  *** smoke_fumus has quit IRC
01:13:10  *** Samu has quit IRC
01:18:57  *** ToBeFree has quit IRC
01:55:40  *** gelignite_ has quit IRC
02:47:43  *** Biolunar has joined #openttd
03:29:42  *** gnu_jj has joined #openttd
03:38:42  *** gnu_jj has quit IRC
03:55:00  *** Biolunar has quit IRC
04:33:49  *** funkyL has joined #openttd
04:53:04  *** supermop_ has joined #openttd
04:58:55  *** supermop has quit IRC
05:00:37  *** Gja has quit IRC
06:12:59  *** sla_ro|master has joined #openttd
06:13:58  *** Alberth has joined #openttd
06:13:59  *** ChanServ sets mode: +o Alberth
06:37:31  *** andythenorth has joined #openttd
06:42:16  <andythenorth> cat is
07:00:57  *** sim-al2 has quit IRC
07:09:00  <Alberth> \o/
07:09:31  <Alberth> Maybe I should restart the firs game with new road hog?
07:10:48  <andythenorth> how old is yours?
07:11:58  <Alberth> no idea, I don't even have one in the current game
07:12:56  *** keoz has joined #openttd
07:13:02  <Alberth> road-hog-r620.tar    I have
07:13:33  <andythenorth> seems old
07:13:49  <andythenorth> Beta 7 is latest release, r1074
07:14:07  <andythenorth> Beta 7 included a *lot* of improvements :)
07:14:38  <Alberth>    and lots of alphas :)
07:14:39  <andythenorth>
07:14:54  <andythenorth> alphas were…not good :)
07:15:41  <Alberth> nah, just less good :)
07:16:17  <Alberth> ok, let's try that, thanks
07:16:51  <Alberth> what PIPE grf do you use?
07:18:17  <Alberth> I have one with pipes up to 2012,  which is tricky if you are in 2020 :p
07:18:40  <andythenorth> I have PIPE v6.4
07:18:45  <andythenorth> I never make it to 2020 :)
07:19:13  <andythenorth> last pump is 2013 in this one
07:19:23  <andythenorth> same
07:20:22  <Alberth> does seem to work though, I set the no-expire vehicle flag
07:20:40  <Alberth> I started at 2020, to play with maglev only :)
07:21:10  <andythenorth> lawks
07:22:24  <andythenorth> truck looks ‘bigger’ than ship due to chunky shape
07:22:31  <andythenorth> both are 40t
07:22:51  <andythenorth> problem is, ships are mostly below waterline :P
07:29:53  *** Progman has joined #openttd
07:30:35  <Alberth> assume we have a different liquid, eg mercury or so :)
07:31:04  <andythenorth> I think the best solution is not to worry about scale too much :)
07:31:19  <Alberth> but you can show it if the ship is empty
07:32:00  <andythenorth> yes
07:32:30  <Alberth> not worrying works too, people are used to small boats in RL :p
07:33:38  <Alberth> hmm, 120K pounds for a 50 year old ship?
07:34:03  <Alberth> or 45, rather
07:41:50  <Alberth> openttd could really use a window with all the parameter settings :)
07:43:14  <Alberth> or something higher level, combining 1 or more newgrf or GS/AI selections with parameter values
07:51:58  <andythenorth> yes, something like that
07:52:02  <andythenorth> meanwhile
07:52:22  <andythenorth> Sam has a narrow range of capacities (Squid goes up to 1200t or so)
07:52:27  <andythenorth> narrower *
07:52:44  <andythenorth> so the small ships are bigger, relative to Squid
07:52:47  <andythenorth> will look better
07:58:42  <Alberth> looks good, I never used the very small ships
08:01:19  <andythenorth> not very often a need
08:01:30  <andythenorth> and they don’t look good in Squid
08:09:58  *** Supercheese has quit IRC
08:14:25  <Alberth> maybe it is because I don't do supplies much, so I always have large quantities to move
08:17:13  <andythenorth> yes small is mostly supplies or mail
08:17:25  <andythenorth> or food and such
08:17:49  <andythenorth>
08:17:53  <andythenorth> tweaked the small one
08:18:10  <andythenorth> lengths now are super logical
08:29:05  <andythenorth> hmm
08:29:06  <andythenorth> words
08:34:12  <andythenorth> “General Cargo Ship” is equivalent to a box van / box truck
08:34:13  <andythenorth>
08:34:21  <andythenorth> they carry packaged goods
08:35:29  <andythenorth> but the name sounds like it carries anything
08:36:03  <andythenorth> I can’t call them ‘box ship
08:36:10  <andythenorth> because that’s the RL term for a container carrier
08:36:41  <andythenorth> the other RL term is ‘break-bulk’ which is way too confusing for anyone who isn’t a ship nerd
08:36:43  <andythenorth> :P
08:37:54  <andythenorth> meanwhile the equivalent of open wagon / open truck is
08:38:00  <andythenorth> shipz :x
08:38:31  * andythenorth wonders about translating the English names to Dutch or German or something, then back again
08:38:51  <andythenorth> Alberth ^ ? o_O
08:40:51  <Alberth>   <-- follow that link?  :p
08:41:54  <Alberth> maybe "algemeen" which is mostly "general"
08:42:45  <Alberth> multi  sort of implies you have several different cargo holds
08:43:02  <Alberth> for different kinds of cargo
08:43:12  <andythenorth> they have different holds for different cargo, which can be reconfigured
08:43:20  <andythenorth> add / remove interior decks etc
08:43:39  <andythenorth> seems ships aren’t just one giant space :P
08:43:41  <Alberth> "enorme zeewaardige vrachtwagen"  :)      enormous sea-worthy trucks   :)
08:44:07  <andythenorth> in Squid, this was solved by ‘freighter’ for the universal ships
08:44:48  <Alberth> freighter fits better in the idea of smaller ships, I think
08:45:22  <andythenorth> the box ship, could be ‘packaged cargo ship’ or so
08:45:23  <andythenorth> dunno
08:45:45  <andythenorth> the ship types match up with Iron Horse and Road Hog vehicles
08:45:57  <Alberth> :O
08:47:03  <andythenorth> ‘piece goods ship’
08:47:57  <Alberth> multi-purpose  in german is something like  multiple goals
08:49:27  <andythenorth> ha
08:50:46  <Alberth> but names for cargo types seems  a  fair solution
08:50:56  <Alberth> s/for/from/
08:51:36  <andythenorth> the multi-purpose ones can be ‘universal freighter’ for now
08:52:07  <Alberth> sounds good to me :)
09:08:21  *** Biolunar has joined #openttd
09:29:10  *** umgeher_ has joined #openttd
09:33:32  *** umgeher has quit IRC
09:39:14  *** Wormnest has joined #openttd
09:57:11  *** Wolf01 has joined #openttd
09:57:21  <Wolf01> o/
09:58:25  <Wolf01> Studies have shown I should work on NRT
09:59:33  <Alberth> o/
10:01:28  <Alberth> would likely be a good option
10:10:42  <andythenorth> yair
10:10:47  * andythenorth must go to fix a car tyre
10:11:04  <andythenorth> Wolf01: get openttd to load the grf without assert?
10:11:06  <andythenorth> step 1
10:15:47  * andythenorth biab
10:19:36  *** frosch123 has joined #openttd
10:20:36  <Wolf01> Quak
10:21:00  <Wolf01> Uh, maybe I found why it does crash...
10:21:01  <Wolf01> 	&_nif_object,       // GSF_OBJECTS
10:21:01  <Wolf01> 	&_nif_railtype,     // GSF_RAILTYPES
10:21:01  <Wolf01> 	&_nif_airporttile,  // GSF_AIRPORTTILES
10:21:01  <Wolf01> 	&_nif_town,         // GSF_FAKE_TOWNS
10:21:04  <frosch123> moi
10:21:48  <Wolf01> I think that towns were alreasy implemented in game, at least some loading support
10:21:56  <Wolf01> *already
10:22:15  <frosch123> towns are the "related" object for industries, houses, and probably some more
10:22:24  <frosch123> they are no feature on their own
10:22:37  <frosch123> that's why it says "FAKE"
10:22:57  <Wolf01> The order in the array should match the features?
10:23:27  <frosch123> yes
10:23:47  <frosch123> GSF_TRAINS...GSF_END match the grfspecs
10:24:02  <frosch123> GSF_FAKE is just appended at the end to make stuff easier
10:24:08  <Wolf01> So I must add the roadtypes before fake towns
10:24:18  <frosch123> just before GSF_END :)
10:24:49  <Wolf01> That's easy, GSF_FAKE_TOWNS is  already GSF_END
10:25:13  <Wolf01> 	GSF_RAILTYPES,
10:25:13  <Wolf01> 	GSF_AIRPORTTILES,
10:25:13  <Wolf01> 	GSF_ROADTYPES,
10:25:13  <Wolf01> 	GSF_END,
10:25:52  <Wolf01> Ok, it create a new game without asserting now
10:26:06  <Wolf01> 	&_nif_airporttile,  // GSF_AIRPORTTILES
10:26:06  <Wolf01> 	NULL,               // GSF_ROADTYPES
10:26:06  <Wolf01> 	&_nif_town,         // GSF_FAKE_TOWNS
10:26:10  <Wolf01> ^ done that
10:26:12  <frosch123> maybe add an assert_compile to the arrays, while you are at it
10:26:27  <Wolf01> this? assert_compile(lengthof(_nifeatures) == GSF_FAKE_END);
10:26:35  <frosch123> yup :)
10:26:57  <frosch123> oh, it was already there
10:27:05  <Wolf01> Now I should define what is in place of the "null"
10:27:07  <frosch123> i thought you crashed it while running
10:29:14  <Wolf01> I'll commit this for the moment
10:30:12  *** gelignite has joined #openttd
10:30:12  <Wolf01> As andy copied the RailType feature, the RoadType should be almost a copy of NIHRailType
10:43:50  *** Mazur has quit IRC
10:49:27  <Wolf01> Meh, I need another monitor
10:49:40  <Wolf01> Wait, I have 2 monitors
10:50:17  *** Mazur has joined #openttd
10:52:00  *** sla_ro|master2 has joined #openttd
10:53:02  *** ToBeFree has joined #openttd
10:57:10  *** sla_ro|master has quit IRC
11:23:57  *** Mazur has quit IRC
11:25:49  *** Samu has joined #openttd
11:27:07  *** Mazur has joined #openttd
11:31:21  <Wolf01> What the... identifier undefined... and it is defined, it even found it with "go to definition"
11:33:45  <Taede> does the definition happen before the use?
11:34:05  <Wolf01> It's a different file
11:34:26  <Wolf01> Maybe it's not even used
11:40:02  *** smoke_fumus has joined #openttd
11:43:10  <Wolf01> Bah, includes
11:45:56  *** nilez has quit IRC
11:46:26  *** nilez has joined #openttd
11:50:36  <Samu> drag and drop is hard to deal with, but i think i got this right
11:51:28  <Samu> tried to make it compatible with both scenario editor and normal play
11:51:36  <Samu>
11:53:13  <Samu> building canals will build locks now...
11:53:41  <Samu> so... what about the build lock button now?
11:53:55  <Samu> remove it?
11:57:33  <Samu> let me compare with the original
11:58:14  <Wolf01> Don't remove things because another thing does that as "a plus"
11:58:20  <Samu>
11:58:33  <Samu> oki then
11:59:42  <Wolf01> Now create a state machine for locks
12:00:04  <Samu> i have no idea what that is
12:03:56  <Samu> there is a command with flags | DC_FORCE_CLEAR_TILE
12:04:11  <Samu> DC_FORCE_CLEAR_TILE was giving me a headache
12:04:25  <Samu> but i didn't want to change this part
12:04:36  <Samu> i wanted to maintain the original functionality
12:04:46  <Wolf01> Look at where the ships move, how it moves when in the lock, make it stop and move vertically for one height level and then go forward again
12:04:46  <Samu> had to work around this thing
12:05:55  <Wolf01> Then change the lock allowing one ship at time and put a water raising/lowering animation
12:06:17  <Samu> ah, i thing i remember seeing a gif of that
12:06:32  <Wolf01> Not just a gif, that's how it works on TTDPatch
12:06:50  <Wolf01> And don't forget animated doors
12:07:07  <Samu> i saw a gif it posted on the forum, think it was peter1138
12:07:41  <Samu> never played ttdpatch
12:07:57  <Samu> sec, let me find it
12:09:40  <Samu>
12:09:53  <Samu> is petern the same guy as peter1138?
12:11:31  <Wolf01> Who knows
12:16:01  <Alberth>    <-- lock state diagram
12:16:27  <Alberth> black rectangles are states, where the lock waits until the next condition holds
12:16:42  *** sim-al2 has joined #openttd
12:27:43  *** Wormnest has quit IRC
12:32:03  <Samu> woah, too complex for me
12:32:31  <Alberth> just do one path first
12:32:49  <Alberth> eg from the top one to the bottom through the right-most sequence
12:33:41  <Alberth> once you have that, the others are just variations on the same idea
12:34:16  <Alberth> ie the left most path from bottom to top is the same as the right-most path, but in the other direction
12:34:49  <Alberth> those 2 paths together alternatingly move ship down, and a ship up
12:35:43  <Alberth> the paths on the center are for the case where there is a ship at the "wrong" side, where you must first change water level before the ship can enter
12:36:43  <Alberth> but just one direction at first is enough, even
12:37:50  <Alberth> you need to have a lock that waits for a condition as the first step
12:37:58  <Alberth> eg waiting until a ship enters
12:39:28  <andythenorth> Samu: petern is mostly peter1138
12:39:32  <andythenorth> except some days
12:39:43  <andythenorth> but not petert
12:44:22  <Wolf01> Mmmh, I have some problems defining "roadtype_scope" function in the RoadTypeResolverObject, it says "incomplete type"
12:45:44  <Samu> i have no idea where to begin
12:46:00  <Alberth> detect that a ship has entered a lock
12:46:21  <Wolf01> I did the same as the RailTypeScopeResolver, looked for all the symbol usages
12:47:14  <Wolf01> The only thing I removed is the signal graphics feature, as roads don't have signals
12:48:29  <Alberth> it doesn't have a class definition when you access it?
12:48:45  <Wolf01> Yes it does
12:49:02  <Samu> but ships can go through each other everywhere else
12:50:27  <Alberth> maybe start with detecting ships in front of the lock, so you can stop them, except one?
12:53:11  <andythenorth> Wolf01: that’s a problem independent of the test grf?  (I think the test grf is broken w.r.t the roadtype table)
12:53:31  <Wolf01> Yes, I already made it load without the assert
12:53:40  <Wolf01> Just pull from my branches/dev
12:53:54  <andythenorth> ok
12:57:42  <Wolf01> Meh, I'm stupid
12:58:17  <Wolf01> Copy/paste error
12:59:29  <andythenorth> :)
13:01:06  <andythenorth> ach
13:01:32  <andythenorth> so for the first time ever, I start a vehicle set with some ‘schema’ as V453000 favours :P
13:01:44  <andythenorth> instead of just ‘nice vehicles’ or ‘arbitrary numerology'
13:03:04  <andythenorth> Universal Freighter, Piece Goods Ship, Bulk Cargo Ship, Tanker, Edibles Tanker, Livestock Ship, Reefer, Log Ship etc
13:03:16  <andythenorth> just two sizes, ’small’ and ‘large’ for each
13:03:35  <andythenorth> except a few which have ‘mini’, and one universal ‘micro’
13:03:50  <andythenorth> so which types need ‘mini’? :P
13:04:08  <andythenorth> 100t / 100k litres
13:14:04  <Samu> hmm it's like adding a path signal
13:15:11  <Samu> i'm not too motivated to start this now
13:21:14  <peter1138> hi
13:21:17  <peter1138> locks, eh?
13:25:43  <Samu> :( trains are stuck
13:26:01  <Samu> ships, with the lock thing would be stuck too
13:26:07  <Samu> state thing
13:26:52  <peter1138> my lock thing was just visual
13:36:03  <peter1138> as andythenorth said
13:38:26  <Alberth> I don't think you want to do path reservation like trains do, a ship should ask permission to proceed to a lock
13:39:01  *** HerzogDeXtEr has joined #openttd
13:43:31  <Wolf01> Ok andythenorth, I made it work now, it compiles and loads a game without crashing with the test newgrf
13:43:51  <Wolf01> Now I should use what it loads
13:44:43  *** HerzogDeXtEr1 has quit IRC
13:44:51  <Samu> i dont understand this state machine stuff
13:45:06  <Wolf01> Nobody does
13:45:07  <Samu> it's like aircraft in the airports?
13:45:21  <Wolf01> Yes
13:45:33  <Wolf01> Or road ehicles in roadstations
13:45:36  <Wolf01> *vehicles
13:45:58  <Samu> that's too complex, if i recall watching road vehicles, it was so messed up
13:47:10  <Samu> i rather do something else
13:47:27  <Samu> i don't get the whole picture
13:49:25  <Samu> besied, before yesterday I was doing stuff about placing ship depots and how to decide the terraform
13:49:52  <Samu> and my code for that is horribad
13:50:00  <Samu> someone talked about helper functions
13:50:15  <Samu> think i need something like that for this case
13:52:03  <Samu> i'm also working on top of my other code, and not on top of trunk, i'm getting lost
13:53:40  <Samu> - my ship depot
13:53:49  <Samu> - original ship depot
13:55:48  <andythenorth> state machine?
13:55:53  <Samu> the whole terraform decision mess starts at line 65 and ends at line 172
13:56:35  <Samu> it's too much lines, with repetitive code, i know it sucks, i just can't figure out how to improve it
14:06:21  <Alberth> 27 to 63 too?
14:06:31  <Alberth> that looks like 2 times alomost the same code
14:07:31  <Alberth> cleared object code 101 to 106 I can see a few times
14:07:53  <Alberth> make a function for it, and call the function a number of times from the main code
14:08:35  <Alberth> last but not least use at most 1   ?:  in an expression
14:09:16  <Alberth> I can't even read what that does
14:10:51  <Alberth> if you have long lines, split them into several lines, so they break at a logical point instead of whenever the webbrowser thinks it's enough
14:16:42  *** sim-al2 has quit IRC
14:18:18  <Samu> 27 to 63 is repeated not only just for ship depots, i'm using a very similar logic there for buoys, flat dock part and locks
14:20:01  <Samu> buoy code is in waypoint_cmd.cpp, dock code is in station_cmd.cpp, shipt depot and lock code is in water_cmd.cpp
14:20:14  <Samu> it's not in the same place
14:21:37  <Samu> lock code is somewhat slightly different, albeit trying to do the same
14:22:28  <Samu> cleared object code, i'm massively using it for everywhere i'm auto-terraforming
14:23:12  <Samu> buoy, dock, shipt depot, aqueduct, canal, lock
14:23:40  <Samu> canal code is also part of water_cmd.cpp
14:23:53  <Samu> aqueduct code is in tunnelbridge_cmd.cpp
14:24:27  <Samu> in some cases, the tile area isn't the same
14:24:49  <peter1138> hmm, went 47.2 mph today o_O
14:24:57  <Samu> tile area for ship depot is 1x2 or 2x1, for all the others, it's always 1x1
14:25:01  <Alberth> so perhaps a   cleared object area function?
14:26:05  *** Lejving has joined #openttd
14:30:37  <Samu> yes, but where would i put this function?
14:30:45  <Samu> which file?
14:32:29  <Wolf01> A header file which is included by every file you need
14:55:18  *** Biolunar has quit IRC
14:56:21  *** umgeher_ is now known as umgeher
15:02:35  <Samu> object_base.h?
15:03:04  <Samu> object_cmd.cpp?
15:03:12  <Samu> now i'm confused :(
15:03:26  <Samu> ClearedObjectArea is a function in object_cmd.cpp
15:03:51  <Samu> erm, i mean FindClearedObject
15:08:00  *** Samu has quit IRC
15:08:06  *** Samu has joined #openttd
15:08:17  *** JacobD88 has joined #openttd
15:08:25  <Wolf01> Define it in object_cmd.h and implement it in object_cmd.cpp?
15:10:37  <Samu> it needs object_base.h
15:11:26  <Samu> to use ClearedObjectArea, i had to include object_base.h
15:12:03  <Samu> so that means... define it in object_base.h and implement it in object_cmd.cpp?
15:12:51  <Samu> gonna try something, i'm unsure if it will work
15:13:06  <Samu> i'm not sure which parameters will be needed
15:14:44  <Samu> yeah, i dunno how to do it, intercalate functions
15:16:11  <Alberth> easy, make a new function, paste the code you want in it, any variable that is missing is required from outside
15:16:35  <Alberth> ie must be brought in from the parameters
15:25:01  <Samu> i'm unsure how to put the OrthogonalTileArea in the parameters
15:25:34  <Samu> OrthogonalTileArea(TileIndex tile = INVALID_TILE, uint8 w = 0, uint8 h = 0) : tile(tile), w(w), h(h)
15:25:51  <Samu> ClearedObjectArea IHaveNoIdeaFunction(TileIndex findclearedobject_tile, TileIndex coa_first_tile, TileIndex coa_area_tile, uint coa_area_x, uint coa_area_y)
15:34:43  <Samu> what shall i call it?
15:38:36  <Samu> it's not working :(
15:38:54  <Samu> ClearedObjectArea coa = IHaveNoIdeaFunction(tile, tile, tile, 1, 1); - looks weird
15:39:27  <Samu> i can't use TileIndex tile_before = coa->first_tile;
15:39:40  <Samu> expression must have pointer type
15:41:00  <Samu> cannot overload functions distinguished by return type alone
15:41:07  <Samu> no idea what these errors mean
15:45:44  <Samu> nevermind, now it seems to be working, let's see if it builds
15:46:11  <Samu> nope
15:46:14  <Samu> Severity	Code	Description	Project	File	Line	Suppression State Error	C4716	'IHaveNoIdeaFunction': must return a value	openttd	d:\openttd\trunk\src\object_cmd.cpp	473
15:46:33  <Samu> no it shouldn't return anything
15:46:37  <Samu> i don't get it
15:47:02  <Alberth> void FunctionName(...)
15:47:17  <Alberth> "void" means "I have nothing to return"
15:47:43  <Alberth> int FunctionName(...)   :  "int" means "I have an integer to return"
15:47:45  <Alberth> etc
15:47:57  <Samu> ok void
15:48:17  <Alberth> Objects should be passed by pointer or by reference
15:48:34  <Alberth> if you don't modify them, by const pointer or const reference
15:50:11  <Samu> void made it worse
15:50:14  <Samu> 285 errors
15:50:23  <Samu> void ClearedObjectArea *IHaveNoIdeaFunction(TileIndex findclearedobject_tile, TileIndex coa_first_tile, TileIndex coa_area_tile, uint coa_area_w, uint coa_area_h);
15:51:19  <Samu> variable ClearedObjectArea is not a type name
15:51:44  <Samu> expected a ; where?
15:52:13  <Samu> const pointer?
15:53:32  <Samu> identifier pointer is undefined
15:54:18  <Samu> Severity	Code	Description	Project	File	Line	Suppression State Error	C2440	'initializing': cannot convert from 'const ClearedObjectArea *' to 'ClearedObjectArea *'	openttd	D:\OpenTTD\trunk\src\waypoint_cmd.cpp	329
15:55:56  *** D-HUND has joined #openttd
15:58:01  *** debdog has quit IRC
15:59:16  <Samu> i still get 3 errors
15:59:42  <Samu> Severity	Code	Description	Project	File	Line	Suppression State Error	C3490	'first_tile' cannot be modified because it is being accessed through a const object	openttd	D:\OpenTTD\trunk\src\waypoint_cmd.cpp	337
16:00:42  <Samu> C4716	'IHaveNoIdeaFunction': must return a value	openttd	d:\openttd\trunk\src\object_cmd.cpp	473
16:00:52  <Samu> think i'm gonna give up
16:02:35  <Samu> const ClearedObjectArea *IHaveNoIdeaFunction(TileIndex findclearedobject_tile, TileIndex coa_first_tile, TileIndex coa_area_tile, uint coa_area_w, uint coa_area_h)
16:02:48  <Samu> const ClearedObjectArea *coa = IHaveNoIdeaFunction(tile, tile, tile, 1, 1);
16:02:55  <Samu> coa->first_tile = INVALID_TILE;
16:03:08  <Samu> the error is in coa
16:03:14  <Samu> coa->first_tile
16:03:54  <Samu> expression must be a modifiable lvalue
16:04:05  <Alberth> dropping "void" is good, as you have a pointer to return
16:04:44  <Alberth> "const ClearedObjectArea *coa"   means  "coa is a constant, I promise to never change coa"
16:04:59  <Alberth> if that promise does not hold, don't make it const
16:05:49  <Alberth> ie you cannot copy a const pointer into a non-const pointer variable
16:06:02  <Alberth> as the latter allows modification
16:07:31  <Samu> without const i'm down to 1 error: Severity	Code	Description	Project	File	Line	Suppression State Error	C4716	'IHaveNoIdeaFunction': must return a value	openttd	d:\openttd\trunk\src\object_cmd.cpp	473
16:08:41  <Samu> with void i get 285 errors...
16:08:52  <Samu> i don't know, i think this can't be done
16:09:39  <Alberth> you must end with "return <something>"   if you have a result value in your function
16:10:10  <Alberth> eg walking out of the function at the bottom without returning a value won't work
16:10:33  <Alberth> if you state a return value, it's promise you'll always do that
16:10:41  <Alberth> *return type
16:11:16  <Samu> but there's nothing to return
16:11:26  <Samu> i think i failed at it
16:11:39  <Alberth> return NULL;   ??
16:11:53  <Alberth> indicating "this pointer points to nothing"
16:12:00  <andythenorth> peter1138: that’s quite fast
16:12:20  <Alberth> which of course you must deal with after you called the function
16:13:33  <Samu> there's nothing to deal with...
16:13:39  <peter1138> reasonably
16:13:45  <Samu> i'm copy pasting
16:14:52  <Samu>
16:15:40  <Alberth> return coa  after line 8 ?
16:16:01  <Alberth> that's what you have at that point, right?
16:16:16  <Samu> oh, is that it?
16:16:22  <Samu> darn
16:17:38  <Samu> yehhh it builds!
16:17:51  <Samu> let's place a buoy, see if it works
16:21:55  <Samu> it works
16:21:59  <Samu> thx Alberth ´
16:22:13  <Alberth> :)
16:28:03  <Samu> what should this function be named
16:34:13  <Alberth> MakeClearedArea    or something like that
16:34:45  *** Gja has joined #openttd
16:35:23  <Samu> Ah i see, makes sense
16:36:49  <andythenorth> ach RL
16:36:56  <andythenorth> bulk ships carry grain
16:37:08  <andythenorth> but dump trucks and hopper wagons in Road Hog and Iron Horse don’t
16:37:13  <andythenorth> because...reasons
16:48:38  <Samu> i'm noticing that the 2 first tiles
16:48:40  <Samu>
16:48:48  <Samu> they are the same
16:49:47  <Samu> unless i'm missing something, i can remove 1 parameter
16:50:21  <Samu> findclearedobject_tile is the same as coa_first_tile
16:50:54  <Alberth> you have to check that in the places where you call the function
16:51:04  <Alberth> in the function itself that information is lost
16:51:49  <Alberth> also, I don't know what that code does, so I cannot give an answer whether that is true
16:52:01  <andythenorth> hmm time to refactor Sam
16:55:25  <Samu> i think it treats the tiles as already clean for the CMD_LANDSCAPE_CLEAR
16:55:44  <Samu> makes the cost £0
16:55:55  <Samu> but with water tiles, it's somewhat buggy
16:56:48  <Samu> or I don't yet know how it fully works
16:57:44  <Samu> it's good to be used on a command that calls another command
16:57:51  <Samu> and both are clearing
16:58:12  <Samu> won't clear it twice
17:02:29  <Samu> 1
17:02:31  <Samu>
17:05:56  <andythenorth> hmm
17:05:59  <Samu> line 630
17:06:18  <Samu> 630 to 643 - dealing with water
17:06:31  <andythenorth> just 2 ship generations 1850, 1950
17:06:36  <andythenorth> 100 year vehicle life?
17:08:31  <Samu> there's another DoCommand before this one, it's confusing
17:10:02  <Samu> ah
17:10:42  <Samu>
17:10:57  *** Eddi|zuHause2 is now known as Eddi|zuHause
17:11:35  <Eddi|zuHause> you need to learn to follow through with a plan before coming up with a new plan that means to redo all the work done so far without coming closer to a result
17:12:28  <andythenorth> but will he learn without doing? o_O
17:12:42  <andythenorth>
17:13:16  <Samu> line 470, and then line 492, one tests, the other executes, sometimes the costs differ because of water stuff
17:13:59  <Samu> who me?
17:17:26  <andythenorth> anyone
17:18:28  <andythenorth> although unwavering commitment to a plan is not particularly a virtue
17:18:57  <andythenorth> most notably in the face of evidence that the plan needs adjusted
17:19:18  <andythenorth> why don’t these ships have standard offsets?
17:19:21  <andythenorth> who made this? :P
17:20:51  <Rubidium> some Brits?
17:21:13  <andythenorth> mostly just andythenorth
17:22:57  <andythenorth> hmm so ships with 100 year life
17:23:03  <andythenorth> not very realistic :P
17:23:53  <andythenorth> nvm
17:24:45  <Rubidium> what about 25-30 years?
17:25:03  <Wolf01> Cisco Blamed A Router Bug On 'Cosmic Radiation'
17:25:05  <andythenorth> it would mean replacing with same model, as there are only 2 generations
17:25:17  <andythenorth> Wolf01: we blame some bugs on magnetic bees
17:25:41  <Rubidium> andythenorth:
17:26:11  <andythenorth> yeah, figures
17:26:18  <andythenorth> I might just ignore RL here
17:26:31  <andythenorth> it’s easy to change later, as it’s applied to every ship in the grf :P
17:26:33  <Wolf01> So, my pc was hit 3 times by cosmic radiation and once I had to change the motherboard for no reason at all... suddenly bot bios stopped working
17:26:44  <Wolf01> *both
17:27:12  *** Samu has quit IRC
17:27:19  *** Samu has joined #openttd
17:27:43  <andythenorth> bees, magnetic
17:27:47  <Samu> my system died for 5 days 2 weeks ago
17:28:48  <Samu> couldn't boot, went to a shop for repair, and when the replacement mobo came, it suddenly starts working
17:29:04  *** glx has joined #openttd
17:29:04  *** ChanServ sets mode: +v glx
17:29:10  <Samu> replacement mobo wasn't needed, and to this day it is still working
17:29:16  <Samu> very odd
17:29:47  <Samu> for 5 days it refused to even POST
17:30:30  <Wolf01> In my case I think is some EFI bios problem, all the problems occurred when I rebooted, usually after updates
17:31:18  <Samu> everything was indicating towards a mobo failure or cpu failure
17:32:01  <Wolf01> On both motherboards? With different CPU?
17:32:13  <Wolf01> Also I changed the ram
17:32:32  <Wolf01> The only 2 original parts are the GPU and the SSD
17:32:55  <Samu> I'm still running with the exact same components, no replacements
17:33:51  <Samu> I'm always expecting something bad is going to happen ever since
17:34:07  <andythenorth> my computer is a glowing slab of computing substrate
17:34:36  <andythenorth> also, what buy menu extra text is valid?
17:34:49  * andythenorth developed a prejudice against buy menu extra text
17:34:54  <andythenorth> but eh, maybe it’s useful
17:35:35  <andythenorth> loading speed?
17:35:35  <Samu> i almost forgot what I was doing... MakeClearedObject
17:35:43  <andythenorth> payment (decay) bonus?
17:35:50  <andythenorth> intended usage of the vehicle?
17:35:54  <andythenorth> historical notes?
17:35:57  <Samu> ah, the function description
17:36:06  <andythenorth> capacity when refitted to mail versus other cargos?
17:36:11  <Samu> trying to figure out what parameters are really needed
17:39:17  <Samu> TileIndex first_tile;  ///< The first tile being cleared, which then causes the whole object to be cleared.
17:40:02  <Samu> hmm, i used it for other purposes
17:41:15  <Samu> The first tile being "insert command action", which then causes the whole object to be "insert command action".
17:41:53  <Samu> i'm still confused about cleared object area stuff
17:41:58  <Samu> i just know that it works
17:42:21  <Samu> i used it to automatically build locks
17:43:58  <Samu> the first tile being "commanded to build a lock", which then causes the whole lock to be "commanded to build a lock".
17:44:32  <Samu> lock command does indeed have landscape clear
17:45:27  <Samu> feels like I used the wrong function to achieve something, and managed to make it work
17:45:55  <Samu> terraform also clears tiles
17:46:58  <Samu> the first tile being "terraformed", which then causes the whole ??? to be "terraformed"?
17:47:57  <Samu> terraform is even more complex
17:48:28  <Samu> i can raise 1 corner, and it can alter a min of 4 tiles, up to a huge amount of tiles
17:48:49  <Samu> all those tiles are cleared by the terraform command
17:52:04  <Samu> it keeps track of tiles that have already been cleared
17:52:24  <Samu> not necessarily true :(
17:53:17  <Samu> I can't think, I don't know how to describe this function
17:58:49  <Samu> When a lock is to be built with drag & drop canal placement, the first tile that is cleared is the middle tile. I ensured that the previous and next tiles are not cleared. I also did not mark them as cleared, because the cmd-build-lock will be clearing these two. But the middle tile is cleared before building the lock, that's the tile I marked as cleared before executing the build lock command.
18:00:14  <Samu> due to the stupid DC_FORCE_FULL_CLEAR, i have to ensure that the river is maintained in the build lock command
18:00:44  <Samu> i pass that information to the lock command as p1
18:02:55  <Samu> the lock command then passes that information to the makewaterkeepingclass function and everything is set straight
18:09:00  <Samu> I'm lost again :(
18:22:59  *** MonkeyDrone has quit IRC
18:23:24  *** MonkeyDrone has joined #openttd
18:29:01  <Samu> MakeClearedObjectArea seems to be a more fitting name
18:29:22  <Samu> or MarkClearedObjectArea
18:29:42  <Samu> AddClearedObjectArea
18:36:41  <Alberth> add to what?
18:45:22  <Samu> adds an entry to the list of tiles that are already marked as cleared
18:45:26  <Samu> i thnk
18:45:53  <Samu> Appends ?
18:47:38  <Alberth> don't know, I asked because a name of a function should make sense just by itself
18:48:01  <Alberth> Append also appends to something, I think
18:48:31  <Alberth> that "something" would typically go into the function as a parameter
18:48:52  <Samu> there may be already cleared tiles there
18:48:52  <Alberth> although in your case it's a global variable, by the looks of it
18:49:18  <Samu> it's a list of tiles that are cleared
18:49:22  <Alberth> fair enough, if you think appends is the best name, that's it
18:49:42  <Alberth> naming a function is often difficult :)
18:49:53  <Samu> I don't really know how to describe it
18:50:09  <Samu> if it is already cleared, it won't append it
18:50:24  <Samu> already "marked as " cleared
18:52:24  <Samu> some objects, such as ship depot, is 2 tiles, destroying one, destroys the other, and i think cleared object areas also keeps track of these
18:53:03  <Samu> i'm not too sure what to say
18:53:10  <Samu> how to describe it
19:08:29  <Samu> does this make sense
19:08:46  <Samu> this description
19:10:35  *** ConductorCat has quit IRC
19:11:04  <Samu> something is amiss, i'm just not sure what
19:12:29  <Alberth> the @return is used to denote what comes out of the function in context of the call, at that point "coa" variable is not available, just remove it
19:12:59  <Alberth> any reason why  coa_w  is not just  width,  or  w  ?
19:13:56  <Alberth> you don't actually return a list as you say at line 2, do you?
19:14:10  <Alberth> it looks like a pointer to an object to me
19:21:27  <Samu> brb, dinner is ready, sorry
19:28:32  *** Wormnest has joined #openttd
19:29:06  *** JacobD88 has quit IRC
19:36:33  *** drac_boy has joined #openttd
19:36:35  <drac_boy> hi
19:39:02  *** frosch123 has quit IRC
19:39:06  *** Supercheese has joined #openttd
19:49:25  <andythenorth> Squid ships travel faster when empty
19:49:28  <andythenorth> BAD FEATURE?
19:49:36  <Supercheese> fed beature
19:49:40  <Supercheese> fad*
19:50:01  <andythenorth> keep or lose?
19:50:07  * andythenorth about to delete it
19:50:18  * Supercheese shrugs
19:50:24  <andythenorth> lose
19:50:26  <Supercheese> I'm ambivalent
19:50:27  <drac_boy> much 'faster'?
19:52:23  <Samu> back
19:52:24  <andythenorth> 10% or
19:52:25  <andythenorth> so
19:53:15  <Samu> Alberth: a pointer to an object?
19:53:26  <drac_boy> hm sounds normal tbh .. 9 knots empty or 7-8 knots loaded isn't too uncommon
19:53:41  <andythenorth> the main application was log tugs
19:53:54  <andythenorth> slow with a tow, otherwise fast
19:54:24  <Alberth> you return a  ClearedObjectArea   pointer, right?
19:54:48  <Alberth> which is an area, and not a list :)
19:54:55  *** keoz has quit IRC
19:57:02  <Samu> i don't know what i'm returning then
19:57:15  <Alberth> ie you're trying to explain what things are at a higher level than the code. If I want to read details, I'll check the code myself
19:57:51  <Alberth> an area of tiles?
19:58:15  <Alberth> how is it a list?
19:59:24  <Samu> i'm not sure what coa actually is
20:00:03  <Samu> first, it finds for tiles marked as cleared tiles
20:00:13  <Samu> if it matches
20:00:21  <Alberth> yes I can read code
20:00:29  <Samu> well i dont know what it does
20:00:48  <Alberth> well, just leave it as is then
20:00:55  <Samu> it clears
20:01:10  <Samu> darn i'm sorry
20:01:30  <Alberth> np, programming is hard
20:01:50  <Samu> i know it works, but not entirely sure why
20:02:17  <Alberth> the latter is the interesting part :)
20:02:37  <Alberth> but it needs reasoning at a level above the code
20:03:18  <Alberth> which is always complicated to get started with
20:03:48  <drac_boy> going afk for a bit sorry
20:03:50  *** drac_boy has left #openttd
20:04:16  <Samu> I'm using it so that it won't re-clears the same tiles
20:04:39  <Alberth> oh, making a function from a common piece of code is good
20:04:51  <Alberth> it reduces duplication
20:05:07  <Alberth> but it opens a lot of new doors :)
20:05:14  <Samu> keeps track of tiles that have been marked as already cleared during test/execution thingy
20:05:31  <Samu> so it won't mess up with the CommandCost
20:05:41  <Alberth> :)
20:06:07  <Samu> but i dunno, it's not entirely true
20:06:25  <Alberth> what it does, is not the same as why it's there
20:06:30  <Samu> tile types can be changed during execution
20:07:27  <Alberth> but just give it a shot, and then let it rest for a while
20:07:48  <Alberth> making a description becomes easier as you do it more often
20:10:07  <Samu> what do i put at the return?
20:10:32  <Samu> return the pointer to _cleared_object_tiles ?
20:13:57  *** sim-al2 has joined #openttd
20:14:01  <Samu> looks like this now
20:18:14  <Samu> time to make use of it
20:18:17  <Samu> brb
20:27:23  *** Supercheese has quit IRC
20:28:34  <Samu> im listening to this album,
20:28:43  <Samu> so she's french
20:28:50  <Samu> intresting...
20:29:17  <Samu> music from el corte inglés commercial
20:32:44  <Alberth> good night
20:32:54  *** Alberth has left #openttd
20:46:01  *** andythenorth has quit IRC
20:48:17  *** keoz has joined #openttd
21:07:36  *** sla_ro|master2 has quit IRC
21:12:24  *** ConductorCat has joined #openttd
21:30:25  *** gnu_jj has joined #openttd
21:51:09  *** Wormnest has quit IRC
21:55:42  *** gelignite has quit IRC
22:16:18  *** keoz has quit IRC
22:19:11  *** Lejving has quit IRC
22:25:10  *** Progman has quit IRC
22:53:51  *** Gja has quit IRC
23:18:52  *** HerzogDeXtEr has quit IRC
23:25:37  <Wolf01> 'night
23:25:40  *** Wolf01 has quit IRC
23:31:21  *** tokai has joined #openttd
23:31:21  *** ChanServ sets mode: +v tokai
23:38:24  *** tokai|noir has quit IRC
23:58:56  *** smoke_fumus has quit IRC

Powered by YARRSTE version: svn-trunk