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