IRC logs for #openttd on OFTC at 2017-02-26
            
00:11:06 *** Progman has quit IRC
00:14:46 *** skapazzo has quit IRC
00:23:19 *** HerzogDeXtEr has joined #openttd
00:26:11 *** iSoSyS has quit IRC
00:29:32 *** HerzogDeXtEr1 has quit IRC
00:32:08 *** Wormnest has quit IRC
01:00:56 *** ConductorCat has joined #openttd
01:12:17 <Wolf01> 'night
01:12:23 *** Wolf01 has quit IRC
01:37:47 *** smoke_fumus has quit IRC
01:41:39 *** maciozo has quit IRC
01:53:19 *** iSoSyS has joined #openttd
01:59:46 *** gelignite has quit IRC
02:01:35 *** Arveen2 has joined #openttd
02:06:30 *** Arveen has quit IRC
02:12:48 *** silly-tux has joined #openttd
02:36:55 *** drac_boy has joined #openttd
02:37:42 <drac_boy> sorry to be not-game-rleated again but just curious if anyone here know if its not too uncommon to have a tank engine thats basically lower half for water and upper half for firefuel re the boilerside bunkers?
02:40:38 <ConductorCat> :3
02:41:11 *** iSoSyS has quit IRC
02:42:08 <drac_boy> hi conductorcat .. need any mices? ;)
02:45:29 * drac_boy gives conductorcat the grf of a caboose to ride on anyway
02:53:17 *** FLHerne has quit IRC
02:53:48 *** iSoSyS has joined #openttd
02:54:59 *** drac_boy has quit IRC
03:17:32 *** supermop_home has quit IRC
03:20:12 *** FLHerne has joined #openttd
03:21:38 *** HerzogDeXtEr has quit IRC
03:22:33 *** FLHerne has quit IRC
03:26:42 *** supermop has joined #openttd
03:34:13 *** supermop_ has joined #openttd
03:38:47 *** supermop__ has quit IRC
03:41:15 *** silly-tux has quit IRC
03:51:56 *** iSoSyS has quit IRC
04:19:48 *** tokai has joined #openttd
04:19:48 *** ChanServ sets mode: +v tokai
04:26:40 *** tokai|noir has quit IRC
04:47:51 *** glx has quit IRC
05:09:47 *** supermop__ has joined #openttd
05:14:57 *** supermop_ has quit IRC
08:12:26 *** andythenorth has joined #openttd
08:14:29 *** supermop_ has joined #openttd
08:17:16 <andythenorth> moin
08:20:17 *** supermop__ has quit IRC
08:31:37 *** sla_ro|master has joined #openttd
08:44:42 *** Progman has joined #openttd
09:09:02 *** efess has quit IRC
09:20:27 *** matt11235 has joined #openttd
09:23:05 *** Alberth has joined #openttd
09:23:05 *** ChanServ sets mode: +o Alberth
09:23:09 <Alberth> moin
09:34:36 <andythenorth> https://xkcd.com/349/
09:34:48 * andythenorth just wanted default lang for Iron Horse to be english-us :P
09:35:49 <Alberth> :)
09:36:09 <andythenorth> somehow I’m refactoring makefile for 4 grf projects :P
09:36:48 <Alberth> refactoring makefile is probably a good thing, it was way too complicated for its purpose, imho
09:37:27 *** supermop has quit IRC
09:37:41 <Alberth> I don't understand how firs is supposed to work with cb37
09:38:01 <Alberth> you needed the new 0800 extension, right?
09:38:17 <Alberth> so how did you make that without hacking nml as well?
09:40:38 <Alberth> http://devs.openttd.org/~alberth/cb37.patch <-- I have this patch, but it keeps displaying cargo amounts
09:41:48 <Alberth> I am quite confused whether it does what it should do
09:43:42 * andythenorth takes the questions in order :)
09:44:17 <andythenorth> ‘refactoring the makefile’ = tidying up some of Makefile.in, I’m not touching the main Makefile, it’s scary ;)
09:44:33 <Alberth> :o
09:44:45 <andythenorth> FIRS trunk now uses the existing cb 37 https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Cargo_sub-type_display_for_industries_.2837.29
09:44:58 <andythenorth> which does not remove the ‘cargo waiting to be processed’ text
09:45:11 <Alberth> in autotools world, *.in is the template to *
09:45:25 <andythenorth> current cb 37 also shows the ‘0 tonnes of catfood’ text
09:45:28 <andythenorth> which FIRS does not want
09:45:54 <andythenorth> the FIRS commits I made so far are half-way house to prove frosch’s idea is the correct one
09:46:02 <andythenorth> I didn’t touch nml :)
09:46:10 * andythenorth reads the patch
09:46:25 <Alberth> so maybe I should make a few screenshots?
09:46:34 <andythenorth> or I apply the patch
09:46:38 <andythenorth> whichever is quickest
09:47:58 <Alberth> I think I'll eventually need screenshots anyway, I saw some weird ECS stuff which I don't understand
09:50:45 <andythenorth> https://paste.openttdcoop.org/pafao1c2t
09:50:58 <Alberth> http://devs.openttd.org/~alberth/firs_cb37.png
09:52:10 <andythenorth> [D] and [A] are...?
09:52:19 * andythenorth guesses, probably wrong
09:52:30 <andythenorth> Demanded, Accepted?
09:53:18 <Alberth> http://devs.openttd.org/~alberth/default_cb37.png
09:53:36 <Alberth> debug string prefixes so I know which string it prints
09:53:53 <Alberth> see lang/english.txt patch
09:54:19 <andythenorth> oic :)
09:54:52 <Alberth> ie, ignore :)
09:55:20 <andythenorth> was there an actual spec for cb results? Or just the agreement on what text to print as per frosch’s paste (linked above)?
09:57:32 *** supermop has joined #openttd
09:59:04 <Alberth> http://devs.openttd.org/~alberth/ecs_cb37.png this looks quite broken
09:59:10 <Alberth> in various ways
09:59:25 <Alberth> we do have a spec, one moment
10:00:36 <Alberth> https://wiki.openttd.org/Frosch/New_Results#CB_37:_Industry_window_acceptance.2Fcargo_text
10:01:38 <Alberth> modulo off-by-100 bug CFF -> BFF
10:05:05 <Alberth> Funding window is broken too, for ECS
10:06:17 *** bwn has quit IRC
10:06:49 * andythenorth looks
10:08:45 <andythenorth> so it looks like FIRS should use the “Display no cargo amount, but display string D000 - D3FF instead.” route
10:08:54 <andythenorth> and I would put the cargo name on the text stack
10:09:09 *** Supercheese has quit IRC
10:09:11 * andythenorth wonders if all the results make sense
10:09:35 <Alberth> 800-BFF but I agree that was the idea
10:09:58 <andythenorth> it seems odd that 0401 doesn’t display the subtype
10:10:18 <Alberth> I fail to understand how ECS funding case got broken
10:11:01 * andythenorth reading cb 37 spec
10:14:15 *** bwn has joined #openttd
10:16:51 <Alberth> :o GarryG makes nice improvements on the harbour graphics
10:19:48 <andythenorth> what broke in the ECS funding case?
10:22:25 *** HerzogDeXtEr has joined #openttd
10:24:06 <Alberth> it prints "cargo(undefined string)"
10:25:10 <Alberth> maybe my patch is just too complicated now
10:27:53 <Alberth> it should doing what it did before, but also return which case the code should print
10:28:12 <Alberth> then deal with that new return value in the accepted cargo case only
10:31:33 *** Progman has quit IRC
10:40:47 <Alberth> let's make a new clone, and try again :)
10:42:01 <Alberth> also, time for some tea
10:47:27 *** FLHerne has joined #openttd
11:04:42 *** efess has joined #openttd
11:10:34 *** Stimrol has joined #openttd
11:14:03 <Alberth> oh, I see now what I missed with ECS, the grf version check!
11:15:58 <Alberth> that's not in the spec by frosch :)
11:43:18 *** Wormnest has joined #openttd
11:57:39 *** Wolf01 has joined #openttd
11:57:53 <Wolf01> Moin
12:05:57 <Alberth> o/
12:07:05 *** FLHerne has quit IRC
12:07:18 *** FLHerne has joined #openttd
12:19:27 *** supermop has quit IRC
12:23:05 *** Samu has joined #openttd
12:23:11 <Samu> hi
12:23:29 * Wolf01 -> lunch
12:25:55 <Alberth> :o logs floating in the water, such GarryG :)
12:45:20 <Samu> the other day I had an idea for road vehicles
12:46:40 <Samu> when a road vehicle is loading/unloading on a non-drive through station, its running costs are paused for the duration it is loading/unloading
12:47:17 *** matt11235 has quit IRC
12:47:20 *** iSoSyS has joined #openttd
12:47:45 <Samu> i want to simulate the engine being turned off
12:47:50 <Samu> on those stations
12:47:57 <Alberth> there are newgrfs for trains that do that
12:48:16 <Alberth> I would expect you can code such a newgrf for RVs too
12:48:27 <Samu> oh, nice, which one
12:48:46 <Alberth> I think NARS, but not sure
12:48:48 *** supermop has joined #openttd
12:49:31 <Alberth> pikka made the set
12:53:52 <andythenorth> oh water based sawmill
12:53:54 <andythenorth> interesting
12:56:38 <Samu> which version is it?
12:56:54 <Samu> i downloaded one but the train is still deducting running costs
12:58:21 <Samu> oh, it's a parameter i see
12:58:24 <Samu> sec
13:00:18 <Samu> nice, i see it working
13:00:46 <Samu> it doesn't completely remove the costs, it reduces it greatly
13:09:38 *** Mucht has joined #openttd
13:12:04 <Samu> aha, that's unfair :( /* Halve running cost for multiheaded parts */
13:15:09 <Samu> cargo can affect running costs?
13:15:11 <Samu> weird
13:16:53 <Wolf01> <Alberth> :o logs floating in the water, such GarryG :) <- now it's our job to make them move with a barge :P
13:19:00 <Wolf01> BTW, must fix that "can't build trams in SE" bug
13:22:52 <Alberth> we'll ask Garry for a log crane :)
13:30:34 <andythenorth> logs can float on their own
13:30:36 <andythenorth> no barg
13:30:40 <andythenorth> barge *
13:30:52 <andythenorth> needs ‘flow’ route type
13:31:00 <andythenorth> basically Factorio :P
13:31:08 <Wolf01> Yeah
13:31:24 <andythenorth> ‘OpenTTD should never have pipes or belts’
13:31:40 <andythenorth> said all the people now dedicating their lives to F :)
13:31:44 <Wolf01> And animated stations with factorio inserters
13:33:06 <Wolf01> You won't have any running cost, but very high maintenance cost
13:33:19 <Wolf01> *property maintenance
13:33:38 <Alberth> it costs money, no matter how you call it :p
13:35:22 <Wolf01> Let's think about it, $500k for placing a single tile, $100k/month of maintenance, it could be a nice money sinkhole
13:36:51 <Wolf01> You can simulate it by having invisible road vehicles and filling up every possible space, you will only have 1 lane used, but as returning vehicles are invisible you won't notice it :P
13:37:13 <Wolf01> And with NRT you can make waterways
13:37:22 <andythenorth> the thing I have in mind would manage rate automatically somehow
13:37:30 <andythenorth> whereas RVs have to be constructed :)
13:38:00 <andythenorth> i.e. the flow route would have a min…max range when constructed
13:38:09 *** Samu has quit IRC
13:38:40 * andythenorth can only define half the idea right now :)
13:39:08 <andythenorth> there would be a capacity / tile / minute or so
13:39:31 <Wolf01> BTW, more serious things, I'm with the idea of removing the CanBuildVehicleInfrastructure() function and makin 4 different versions of it
13:39:52 <andythenorth> if you build a 500t / min flow route tile, it might have a min of 200t
13:40:06 <andythenorth> so if you don’t have 200t waiting, it doesn’t move it to the next tile
13:40:20 <andythenorth> whereas the 100t / min flow tile might work down to 20t
13:40:35 <Wolf01> Full load all cargo
13:40:44 <andythenorth> I have the idea that each tile just moves from an entry point (1 edge) to an exit point (1 edge)
13:40:57 <andythenorth> chaining the tiles makes a route
13:40:59 <Wolf01> Needs no-crossings-patch
13:41:27 <andythenorth> there might be splitters and stuff, but that’s F really I think
13:42:33 <Wolf01> Just use stations
13:42:52 <Wolf01> With cargodist you have automatic transfer
13:58:08 <andythenorth> back tonight
13:58:09 *** andythenorth has quit IRC
14:04:28 *** matt11235 has joined #openttd
14:27:03 *** sla_ro|master has quit IRC
14:41:11 *** matt11235 has quit IRC
14:41:28 *** matt11235 has joined #openttd
14:42:30 *** Samu has joined #openttd
14:51:37 *** Stimrol has quit IRC
14:53:43 <Wolf01> Ok, now I just need frosch
14:54:46 *** frosch123 has joined #openttd
14:55:09 <Wolf01> So it is
14:55:17 <Wolf01> [14:53:43] <Wolf01> Ok, now I just need frosch
14:55:17 <Wolf01> [14:54:46] * Joins: frosch123
14:55:25 <Wolf01> Also, quak
14:56:26 <Wolf01> I'm rewriting that CanBuildVehicleInfrastructure, it seem to work in SE now
14:56:39 <Alberth> hola
14:57:14 <Wolf01> But I don't really know what I'm doing :P
14:58:28 <Alberth> just typing random words in irc :p
14:59:03 <Alberth> https://devs.openttd.org/~alberth/diffs/cb37/ <-- 3rd attempt, and I like it
14:59:37 <Alberth> also seems to work, for as far as it goes without newgrf with the new option
14:59:46 <frosch123> moi
15:00:40 <frosch123> i need to start the washing machine first :)
15:01:03 <Alberth> no command-line interface for that? :)
15:01:25 <Alberth> clearly not yet IoT-enabled :p
15:10:41 *** maciozo has joined #openttd
15:21:16 *** iSoSyS has quit IRC
15:23:49 <frosch123> 10 does more than it says
15:24:16 <frosch123> it moves GetAllCargoSuffixes out of if (HasBit(ind->callback_mask, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_mask, CBM_IND_PRODUCTION_256_TICKS)) {
15:24:38 <frosch123> oh, it's also in the else case :o
15:24:44 <frosch123> so, it's a nop
15:26:36 <frosch123> 20 lies about @return
15:27:11 <frosch123> i would also name the CSD_ things differently. mixing in negations makes them hard to read
15:27:32 <frosch123> how about CSD_CARGO, CSD_CARGO_AMOUNT, CSD_CARGO_TEXT, CSD_CARGO_AMOUNT_TEXT ?
15:31:08 <Wolf01> https://paste.openttdcoop.org/pud7xhwzn <- this is for VEH_ROAD only, other types should use the old version with NRT changes reverted, also rail should be moved to its own and check for railtypes; also I'm not sure if I miss a check for rtid.subtype for some cases (that's why I passed the entire rtid) or I could just pass the basetype
15:32:05 <frosch123> in the grf_version < 8 case, the GB() != 0xFF part should be in the return if, not in the second
15:34:34 <frosch123> personally i would use "else if" instead of all the "return"
15:34:36 <frosch123> but your choice :)
15:35:28 *** iSoSyS has joined #openttd
15:38:29 <frosch123> 30: the CSD_AMOUNT should fall-through to CSD_STRING, not CSD_NO_SUBTYPE, right?
15:41:29 <Alberth> and I just replaced the CSD_ names :p
15:41:57 <frosch123> i like the string names, i would name the CSD ones the same
15:42:14 <Alberth> yeah, makes sense
15:43:54 *** FLHerne has quit IRC
15:44:13 *** FLHerne has joined #openttd
15:46:27 *** smoke_fumus has joined #openttd
15:48:37 *** supermop has quit IRC
15:52:42 <Samu> i noticed something in the detailed window
15:53:11 <Samu> the running cost per year
15:53:30 <Samu> says £5,948/yr while not in a station
15:53:52 <Alberth> GB() != 0xFF handles the x00..xFE upper limit only, in https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Cargo_sub-type_display_for_industries_.2837.29 in particular, the table says 0xFF only as 'no text'
15:54:05 <Samu> but when it's in a station it's £1,617/yr
15:54:11 <Samu> using NARS grf
15:54:19 <frosch123> the spec never contains the details :)
15:54:24 <Samu> shouldn't this value be constant?
15:54:46 <frosch123> before grfv8 there existed something like "8 bit callback", where ttdp only tested the al register
15:54:58 <Alberth> :D
15:55:07 <Alberth> ok, I'll change it then :)
15:55:18 <Alberth> Samu: the newgrf says not
15:56:08 <Samu> but what should it be displaying?
15:56:23 <Samu> I actually thought it would be the max running cost
15:56:38 <Samu> that it was a constant value
15:56:51 <frosch123> https://devs.openttd.org/~frosch/texts/cb.csv <- look what fun we had in 2008 to make ottd completely compatible with all the grfs that exploited the ttdp fishyness of ignoring bits sometimes
15:58:52 <Samu> just tried to edit openttd to test road vehicle in a standard station, and i see a bus with a cost of £0/yr
15:59:12 <Samu> and then back to £426 when not
15:59:15 <Samu> it's a bit odd
16:06:13 <Alberth> fall-through from 1st to 2nd case is 400 -> 401 case, while fall-through from 1st to 3rd case would be 400 -> 800-BFF which needs an additional string, also it's not what your proposal says https://paste.openttdcoop.org/pafao1c2t
16:07:27 <Alberth> http://devs.openttd.org/~alberth/diffs/cb37_2
16:11:59 <frosch123> yep, you are right about the fall-through, i blame the previous CSD_ names :p
16:12:06 *** iSoSyS has quit IRC
16:12:19 <Alberth> quite likely, I found it also very confusing :)
16:13:14 <Alberth> 30 needs an additional empty line before the 'default' case
16:13:43 <frosch123> queue looks nice, i would put something about the new cb results into the commit message
16:14:50 <Alberth> along the lines of your example, perhaps
16:15:38 <Alberth> or maybe just the new 0800 and 0401, I'll have a look
16:15:38 <frosch123> it does not need the complete specs, just a note about the new results 401 and 800+bff
16:15:51 <Alberth> ah :)
16:15:52 <frosch123> s/+/-/
16:16:39 *** Progman has joined #openttd
16:17:23 *** Angel has joined #openttd
16:17:55 <Angel> Hi guys. Quick question and I suppose there's a quick simple answer to it. How do I view messages sent to Server?
16:18:14 <Angel> Dedicated server.
16:19:09 <frosch123> it prints stuff to console
16:19:28 <frosch123> check "-d net=..." options to get more
16:19:45 <Angel> Sorry? :D
16:21:22 <Alberth> start openttd from a console, ie a bash shell or a command.com window
16:21:40 <Angel> I have it running as a service.
16:21:47 <Alberth> or perhaps some powershell thingie
16:21:48 <Angel> Linux.
16:22:26 <Alberth> it dumps output to stdout, which usually goes somewhere as defined in the service
16:22:37 <Alberth> alternatively you can catch and redirect it
16:22:44 <Angel> hmm, that would be /var/log
16:22:48 <Angel> Why I didn't think of that.
16:22:51 *** supermop has joined #openttd
16:23:00 <Alberth> ie ls > myfile
16:24:35 <Alberth> by default it's not that much, but with the -d net=4 option you can get more (use higher number, up to 9) or less (use lower number)
16:25:19 <Alberth> not sure what number is default, probably 0 or 1 or so
16:28:02 <supermop> good morning
16:29:27 *** sim-al2 has quit IRC
16:29:29 <Angel> I guess the players aren't supposed to send messages to servers. :D
16:30:02 <frosch123> player chat goes via the server
16:30:11 <frosch123> there is no direct client<->client communication
16:30:29 <DorpsGek> Commit by alberth :: r27749 trunk/src/industry_gui.cpp (2017-02-26 16:30:25 +0100 )
16:30:30 <DorpsGek> -Codechange: Fold cb37 cargo suffix text in a structure.
16:30:33 <Angel> Yes, but if it's a tad difficult to get messages sent from players to the server.. That's what I meant.
16:30:34 <supermop> so I stayed up quite late last night drawing wires
16:31:00 <frosch123> Angel: what kind of messages do you mean?
16:31:16 <frosch123> there are multiple existing tools which extend stuff htere
16:31:45 <frosch123> like the admin port, various server-side scripts and bots, irc-bridges, ...
16:31:47 <Angel> Scenario: Player joins, and writes a message to the Server.
16:32:07 <Angel> Admin port is a bit over my head.
16:33:11 <Angel> Well, thanks guys for answers. :)
16:33:42 <DorpsGek> Commit by alberth :: r27750 trunk/src/industry_gui.cpp (2017-02-26 16:33:39 +0100 )
16:33:43 <DorpsGek> -Codechange: Add cb37 result type to the cargo suffix.
16:34:21 <DorpsGek> Commit by alberth :: r27751 /trunk/src (industry_gui.cpp lang/english.txt) (2017-02-26 16:34:15 +0100 )
16:34:22 <DorpsGek> -Feature: Display cargo suffix of accepted cargoes in industry view based on cb37 result type.
16:34:23 <DorpsGek> Industry-sets that have no stockpiling get better control over the displayed accepted cargo information.
16:34:24 <DorpsGek> - result 0401 only prints the accepted cargo
16:34:25 <DorpsGek> - results 0800-0BFF prints the accepted cargo and a string (but not the amount)
16:35:00 <DorpsGek> Commit by alberth :: r27752 /trunk/src/lang (57 files in 2 dirs) (2017-02-26 16:34:57 +0100 )
16:35:01 <DorpsGek> -Cleanup: Remove obsolete strings from other languages as well.
16:36:49 *** Angel has quit IRC
16:44:46 <Alberth> newgrf wiki also updated
16:46:41 <frosch123> nml usually has some constants for the special values
16:46:46 <frosch123> like 401 and 800 + stringid
16:49:07 <Alberth> yesterday that didn't work, but I'll try again :)
16:53:48 <Alberth> CB_RESULT_NO_TEXT is a dead end :p
16:53:59 <Wolf01> https://paste.openttdcoop.org/pquqqwb5q frosch123, could you review this please? It's against the can-build-vehicle-infrastructure branch
17:25:48 <Alberth> I can give you details to fix, but I don't know the big picture
17:25:55 <Alberth> Wolf01: ^
17:26:17 <Wolf01> Any suggestion is welcome
17:28:52 <Alberth> You're throwing road things out of CanBuildVehicleInfrastructure and adding an overload. Please also add an assert that you cannot use the former for road things
17:29:55 <Wolf01> Yup, the old one will be used for air and docks in future, it will be modified later
17:31:25 <Alberth> can't say anything useful about weird looking INVALID_OWNER versus INVALID_COMPANY (line 87/88), but line 93 must be after line 92, or have { } added
17:32:48 <Wolf01> I found that it stores OWNER instead of COMPANY
17:35:06 <frosch123> is/will that function also be called for OWNER_DEITY?
17:35:18 <frosch123> in that case if should probably behave like scenario eidtor
17:35:42 <Alberth> line 251 doesn't do double indent, and line 252 has creative && at the start of the line, which we never do
17:35:50 <Wolf01> Yes, that should be the case, as I changed the function to be used in editor too
17:36:13 *** sla_ro|master has joined #openttd
17:36:56 <frosch123> + HasBit(roadsubtypes, RoadVehicle::From(v)->rtid.subtype) && RoadVehicle::From(v)->rtid.subtype == rtid.subtype <- the second condition likely wants to test basetype instead of subtype
17:37:26 <Wolf01> The basetype is already filtered
17:37:27 <frosch123> i would also reverse the order of the cecks
17:38:07 <frosch123> Wolf01: no, i am talking about like 251
17:38:23 <Alberth> doxycomment 219-227 makes little sense to wrap like that, as surrounding code is much longer as well (just my opinion, it's not a reason for refusing the patch)
17:39:56 <Wolf01> I should check the entire rtid there
17:42:17 *** Arveen has joined #openttd
17:46:27 <frosch123> is it my turn?
17:46:35 <frosch123> https://devs.openttd.org/~frosch/diffs/stringlimit/ <- i split it up more
17:47:30 *** Arveen2 has quit IRC
17:52:53 *** gelignite has joined #openttd
18:01:52 <Wolf01> https://paste.openttdcoop.org/p5hou9kty revised with the last changes
18:02:45 <Alberth> 01: uint index = GB(internal_string_id, 11, 5); -> uint index = GetStringIndex(internal_string_id); is actually a bugfix?
18:03:14 *** ZirconiumX has joined #openttd
18:04:12 <frosch123> haha, did not even notice that :) but yes
18:05:33 <frosch123> let's run the regression test, and see whether it affects it
18:07:24 <frosch123> Wolf01: in line 220 you remoe all the vehicle type checks
18:07:46 <frosch123> same in 231
18:08:16 <frosch123> oh, that is road stuff, never mind
18:08:22 <Wolf01> Yes, road doesn't use that function
18:08:34 <Wolf01> BTW, http://imgur.com/a/EQCpC I found 2 strange things, and a bug, while drawing catenary, some parts seem to be drawn twice (they are darker) and one pylon is missing on the round
18:09:32 <Alberth> oh, lol :) -#define TABSIZE 11
18:09:48 <frosch123> you added special stuff for game scripts to ExistingRoadSubTypesForRoadType, but not to CanBuildVehicleInfrastructure, intentional?
18:10:21 <frosch123> Wolf01: 256 makes no sense to me
18:10:26 <Wolf01> I think CanBuildVehicleInfrastructure need more work
18:10:32 <frosch123> why check the whole rtid, and then again the subtype
18:10:54 <Alberth> 02: s/accross/across/ (single c)
18:11:27 <frosch123> Alberth: "TAB_SIZE = 1 << TABSIZE" obviously :)
18:11:29 <Wolf01> ruadsubtypes may be filtered for company and date
18:11:33 <Wolf01> *road
18:12:10 <Wolf01> I could just check for just basetype against rtid
18:31:13 *** Snail has joined #openttd
18:32:43 <Samu> i'm a bit rusty
18:32:46 <Samu> bool loading_unloading = HasBit(this->vehicle_flags, VF_CARGO_UNLOADING) || HasBit(this->vehicle_flags, VF_LOADING_FINISHED) || HasBit(this->vehicle_flags, VF_STOP_LOADING);
18:33:11 <Samu> can I simplify?
18:33:31 <Alberth> 10: src/script/api/script_error.cpp where did 'case 15' and 'case 31' go, as fall-through for 4 ?
18:33:44 <frosch123> they were removed in ottd 0.6
18:33:50 <frosch123> or 0.7
18:33:55 <Alberth> wow :)
18:34:34 <frosch123> 15 is TEXT_TAB_OLD_CUSTOM and only used in savegame conversion
18:34:42 <frosch123> 31 is the predecessor to RAW_STRING
18:35:08 <Alberth> I found 15 indeed elsewhere in the patch
18:36:06 <Alberth> Samu: I am sure we are all dying to find out if you can
18:38:55 <Samu> from all those 9 bit flags, find out if at least 1 of these 3 is set
18:39:07 <Samu> how do I do it?
18:39:17 <Samu> actually, 10
18:41:04 <Alberth> I am not sure it's useful to change what you have
18:46:01 <Samu> i failed :( i'm getting a true for some reason
18:46:37 <Samu> HasBit(this->vehicle_flags, VF_LOADING_FINISHED)
18:46:49 <Samu> vehicle_flags value is 9
18:46:56 <Samu> VF_LOADING_FINISHED is 0
18:47:12 <Samu> HasBit(9, 0) = true :(
18:48:18 <Samu> i must see how hasbit is used
18:50:14 <Alberth> 9 has bit 0 set
18:51:54 <Samu> 98 7654 3210
18:52:03 <Samu> 9 is the flag for the service interval :(
18:52:10 <Samu> i did something bad
18:53:37 <Alberth> frosch123: 30: +stringid = strtoul(str, &p, 16); <-- fold the uint32 var declaration of it into here? (strings.cpp, near line 820)
18:53:37 <Alberth> I would like to keep the << 11 and the 2048 TAB_SIZE value, perhaps multiply/divide by TAB_SIZE instead of shift? (could be introduced earlier)
18:53:55 <Alberth> Samu: bit 9 is not the same as integer value 9
18:54:19 <Alberth> bit 9 has value 2^9 = 512
18:54:48 <Alberth> there is also a >> 11 , of course
18:55:19 <Alberth> otherwise looks fine to me
18:58:22 <frosch123> what do you mean? one constant instead of two for 11 and 2048?
18:59:01 *** andythenorth has joined #openttd
19:02:46 <Alberth> have one constant, instead of the magic connection between 2048 and << 11
19:02:55 *** iSoSyS has joined #openttd
19:02:56 <Alberth> o/ andy
19:03:14 <Alberth> pony has arrived in openttd
19:03:51 <andythenorth> :o
19:04:10 * andythenorth sees commits :)
19:04:20 <Alberth> still working on nml, but perhaps it's simpler than I think
19:05:05 * andythenorth compiles
19:06:22 * andythenorth needs a faster computer :(
19:06:55 <andythenorth> specifically also a cooler computer :P
19:07:18 <andythenorth> apparently after about 1 minute or so of compiling, this generation of mac turns the i7 speed down for thermal protection :P
19:07:28 <andythenorth> so it goes slower than nominal clock speed
19:08:07 <Alberth> lol
19:08:07 <andythenorth> biab
19:08:15 <andythenorth> child #1 is playing ottd
19:12:29 <frosch123> https://paste.openttdcoop.org/p7xuyxuk9?/p7xuyxuk9 <- Alberth: does it need more than that?
19:13:34 <frosch123> can't decide between NO_TEXT_NO_AMOUNT and NO_AMOUNT_NO_TEXT :)
19:26:33 <andythenorth> potato / potato
19:26:47 <andythenorth> NO_TEXT_NO_AMOUNT if you want my 2p
19:26:50 *** FLHerne has quit IRC
19:29:52 <andythenorth> ok so I need to add 0800 to my FIRS strings? o_O
19:30:02 <andythenorth> or is nml going to do that?
19:31:44 <Alberth> that's why the constant is added :)
19:32:17 <andythenorth> how will I return a constant and a string? :o
19:32:22 * andythenorth might be dense :)
19:32:23 <Alberth> frosch123: likely it's enough, I didn't grasp until recently you could literally do number + string
19:33:11 <Alberth> andythenorth: return CB_RESULT_IND_NO_AMOUNT + string(...); I think
19:33:30 <Alberth> since the CB.. is 0x800
19:33:35 <andythenorth> makes sense, will need to be obvious in docs though :)
19:33:40 <andythenorth> that’s a non-intuitive thing to d o
19:33:42 <andythenorth> do * :)
19:34:12 <Alberth> I was about to test that when other stuff took priority
19:34:45 <Alberth> let me know if it works
19:35:37 <Alberth> or until fr0sch committed that in nml, add 0x800 :)
19:35:52 * andythenorth tests
19:36:33 <frosch123> apparently my hg queue is against ottd trunk from june 2015 :)
19:36:56 <Alberth> didn't happen that much since that time :p
19:37:10 <Alberth> mostly translation updates
19:39:49 <andythenorth> invalid result: 0x5802
19:40:06 <andythenorth> looks like that’s out of the allowed range
19:40:13 * andythenorth digs some more
19:40:53 * andythenorth wonders what range the texts are in
19:41:04 <frosch123> interesting, so there is more magic in nml?
19:41:20 <andythenorth> “return 0x800 + string(STR_CARGO_SUBTYPE_DISPLAY_SECONDARY_CARGO_DELIVERED);”
19:41:55 <frosch123> so when using string like that it returns D000+x, but if using it direclty with return it is just x ?
19:42:07 <andythenorth> seems so
19:42:23 <Eddi|zuHause> so 0x800+0x7FF&string()?
19:42:59 <andythenorth> ihttp://dev.openttdcoop.org/attachments/download/8372/industry-window-text-8.png
19:43:02 <frosch123> action2var.py:912 is the culprit
19:43:09 <Eddi|zuHause> (just a guess, i was not following the discussion)
19:43:10 <frosch123> so alberth was right, it's not that easy
19:43:43 <Eddi|zuHause> you probably need a CONSTRUCT_RESULT(blah, string) thingie
19:44:32 <frosch123> no, i think we just remove the +/- stuff from nml
19:45:07 <frosch123> though it's used for stringstack
19:45:50 <DorpsGek> Commit by translators :: r27753 /trunk/src/lang (63 files in 2 dirs) (2017-02-26 19:45:43 +0100 )
19:45:51 <DorpsGek> -Update from Eints:
19:45:56 <Eddi|zuHause> have i mentioned that the textstack needs replacing with an actual stack?
19:46:21 <frosch123> Eddi|zuHause: did you at least finish the review of default setting values?
19:46:38 * andythenorth awaits ‘hard mode’ also
19:46:45 <andythenorth> entertaining thread :)
19:47:02 <Eddi|zuHause> frosch123: what do you mean? i sent in a patch like 5 years ago, and of that only half was committed
19:47:07 <frosch123> does 'hard mode' mean 'disable build on slopes'?
19:47:17 *** supermop has quit IRC
19:47:33 <frosch123> Eddi|zuHause: so why is original acceleration still the default?
19:47:47 <andythenorth> frosch123: freight weight multiplier 32
19:47:54 <Eddi|zuHause> that's Rubidium's fault. it was almost definitely in my patch
19:47:55 <andythenorth> yes why is original acceleration still the default?
19:48:03 <andythenorth> I just had to change it for child #1 in his game
19:48:06 <frosch123> andythenorth: i blame ddit
19:48:13 <frosch123> eddit
19:48:15 <frosch123> eddi
19:48:18 <andythenorth> 2700hp engine, 200t train, 11mph on a slope
19:48:31 <andythenorth> noticeably silly :)
19:50:08 <andythenorth> and could we not have ‘acceleration: improved | unusable’ :P
19:50:08 *** FLHerne has joined #openttd
19:50:24 <Eddi|zuHause> - SDT_VAR(GameSettings, vehicle.train_acceleration_model, SLE_UINT8, 0,MS, 0, 0, 1, 1, STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL, TrainAccelerationModelChanged),
19:50:26 <Eddi|zuHause> + SDT_VAR(GameSettings, vehicle.train_acceleration_model, SLE_UINT8, 0,MS, 1, 0, 1, 1, STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL, TrainAccelerationModelChanged),
19:50:26 <andythenorth> ‘realistic’ isn’t the selling point, ‘playable’ is
19:50:28 <Eddi|zuHause> there...
19:50:33 *** Stimrol has joined #openttd
19:50:57 <Eddi|zuHause> 6. Jan 2010 settings1.diff
19:51:04 <frosch123> you probably forgot the savegame conversion
19:51:35 <Eddi|zuHause> no, i was just overruled...
19:52:15 <frosch123> who plays with original acceleration?
19:52:25 <Eddi|zuHause> i have no idea
19:52:34 <Eddi|zuHause> people who never change the default settings :p
19:55:32 <andythenorth> people who have been hoarding a precious savegame
19:55:41 <andythenorth> probably, honestly, a lot of players by accident
19:55:57 <Eddi|zuHause> frosch123: this is my current settings.ini (minus some leftover hacks) https://paste.openttdcoop.org/psx0hwnhn
19:56:10 <Eddi|zuHause> where "current" is already ages ago
19:56:26 <Eddi|zuHause> r26594
19:57:48 <frosch123> so train acceleration and rv acceleration
19:57:56 *** ZirconiumX has quit IRC
19:58:00 <frosch123> pause and drag/drop seems to be uncommon
19:58:18 *** supermop has joined #openttd
19:58:24 <frosch123> pause is likely confusing for new players
19:58:40 <frosch123> i personally do not use drag/drop, but i guess it may be more intuitive for new players
19:58:50 <Eddi|zuHause> it might be a personal preference of mine...
19:59:04 <Eddi|zuHause> i usually spend a while browsing around before deciding where to build
19:59:14 <Eddi|zuHause> it's a bit silly to have the time pass
20:02:13 <frosch123> you should also do that at work
20:02:36 <Eddi|zuHause> have i mentioned that i started my new job?
20:03:20 <Eddi|zuHause> upside is that i make more money. downside is that i have to actually be there...
20:03:39 <frosch123> train driver?
20:04:08 <Eddi|zuHause> no, PLC programming, and general IT stuff
20:04:47 <andythenorth> general IT stuff sounds dangerously like you’ll be asked to fix the wifi
20:08:27 <andythenorth> so nml needs more magic?
20:10:33 <frosch123> what happens if you use 0x3800 ?
20:10:52 <frosch123> instead of 0x800
20:11:01 <Samu> how do i convert a value into a bit set?
20:11:21 * andythenorth compiles FIRS
20:11:58 <frosch123> hmm, only works with +, not with |
20:12:02 <frosch123> so, too hackish
20:12:10 *** Mucht has quit IRC
20:12:23 <andythenorth> supermop: docklands http://railpictures.net/photo/608079
20:12:43 <Samu> wanna convert, for example 9 into 1 << 9, which is 512
20:13:34 <andythenorth> frosch123: 0x3800 appears to work, afaict
20:13:39 <Eddi|zuHause> andythenorth: yeah, possibly, but the current IT staff there won't give me access to anything
20:13:45 <andythenorth> fortunate
20:14:02 <andythenorth> ‘fixing wifi’ doesn’t require programming skills
20:14:03 <Eddi|zuHause> they fear i might break their precious system
20:15:05 <frosch123> is there a modern version of BOFH?
20:15:20 <andythenorth> http://dev.openttdcoop.org/attachments/download/8373/industry-window-text-9.png
20:15:28 <andythenorth> is BOFH finished?
20:15:36 <Eddi|zuHause> frosch123: you mean one where they updated the ridiculously low HD space values?
20:15:44 <Samu> I can't do 1 << 67, it's wrong
20:16:00 <frosch123> Eddi|zuHause: sounds unrealistic
20:16:14 <andythenorth> the differing : chars make me twitch :)
20:16:14 <frosch123> admins only partitioning 10% of the hdd is a common problem in my company
20:17:08 <Samu> 67 is 1 << 0 + 1 << 1 + 1 << 6
20:18:53 <andythenorth> so the nml patch should add 0x3800?
20:20:59 <frosch123> no idea, may required sleeping some days frist
20:21:26 <frosch123> i think 3800 is too hackish
20:21:44 <Samu> looking for a bit math expert
20:22:44 <andythenorth> fair
20:22:58 <andythenorth> seems like it needs a parameterised function
20:23:04 <Samu> 67 is 00 0100 0011 in bits
20:23:11 <Samu> 3 flags are set
20:23:11 <frosch123> or a new expressiontype
20:23:14 <andythenorth> or stick a specific value in a register :P
20:23:16 <andythenorth> the other route
20:23:27 <frosch123> between String and ConstantNumeric
20:23:29 <Samu> 9 is 10 0000 0000 in bits, 1 flag is set
20:24:18 <Samu> 67 & 9 = magic?
20:24:39 <Eddi|zuHause> i'm fairly sure there are existing examples of CONSTRUCT_RESULT(blah, bum) type thingies
20:24:42 <Samu> nop,
20:24:49 <Samu> 67 & 9 = 1 ... why not 0
20:24:52 <Samu> I can't understand
20:27:57 <LordAro> wat
20:28:07 <LordAro> 9 == 1001
20:28:21 <Samu> i am so confused
20:28:24 <LordAro> 67 == 100011
20:28:51 <Eddi|zuHause> with a bit of numeric-literal syntax
20:28:53 <Samu> i want 9 to be the 10th bit
20:29:04 <Samu> 67 is a set of 3 bits
20:29:13 <LordAro> wat
20:29:14 <Eddi|zuHause> like 9 == 01001
20:29:28 <LordAro> Eddi|zuHause: well yes, i figured leading zeros weren't necessary
20:29:41 <Eddi|zuHause> well, it's relevant in this case
20:30:03 <Eddi|zuHause> because many languages treat leading 0 as "this is a binary number"
20:30:27 <Samu> LordAro: VF_CARGO_UNLOADING = 1, VF_LOADING_FINISHED = 0 and VF_STOP_LOADING = 6
20:30:29 <Eddi|zuHause> so 10 does not equal 010
20:30:57 <LordAro> Eddi|zuHause: i nearly did the 0b as a prefix, but decided that would be too confusing
20:30:58 <Eddi|zuHause> because 10 is decimal where 010 is binary
20:31:08 <Samu> 1 << VF_CARGO_UNLOADING | 1 << VF_LOADING_FINISHED | 1 <<VF_STOP_LOADING = 67
20:31:12 <LordAro> 0 prefix is octal, ofc :p
20:31:17 <Eddi|zuHause> octal is also a possibilty, yes
20:31:22 <Eddi|zuHause> i mixed that up
20:31:49 <LordAro> Samu: ok, so what is 1 << 0 ?
20:31:58 <LordAro> (hint: it's quite easy)
20:32:08 <Samu> 1?
20:32:12 <LordAro> correct :p
20:32:14 <LordAro> 1 << 1 ?
20:32:24 <Samu> 2
20:32:27 <LordAro> indeed
20:32:30 <LordAro> and 1 << 6 ?
20:32:35 <Samu> 64
20:32:41 <LordAro> correct
20:32:49 <LordAro> now, if you bitwise OR them all together
20:33:01 <Samu> 67
20:33:03 <LordAro> :)
20:33:20 <Samu> i got a variable that I want to treat as bit flags
20:33:42 <Samu> if the value is 9, it means the bit 9 is set, and i dunno how to check against these 3
20:33:58 <LordAro> decidedly does not mean that bit 9 is set
20:34:09 <LordAro> it means that it has the value of 9
20:34:16 <LordAro> which is equivalent to 1001
20:34:27 <LordAro> (in binary, for pedants like Eddi|zuHause)
20:34:40 <andythenorth> .devzone/ is very smart
20:34:44 <andythenorth> really simple configuration
20:34:55 <frosch123> i think octal should be used for temperatures in fahrenheit
20:35:18 <Samu> i can't use HasBit
20:35:27 <frosch123> andythenorth: submit it to open-desktop.org, or whatever they are called
20:35:43 <LordAro> Samu: why not?
20:35:57 <Samu> it treats the value 9 as 1001 indeed
20:36:39 <Samu> which is not what i want
20:36:56 <LordAro> if you want the 9th bit, you probably want 1 << 9
20:37:00 <LordAro> @calc 1 << 9
20:37:00 <DorpsGek> LordAro: Error: Something in there wasn't a valid number.
20:37:03 <LordAro> heh
20:37:27 <Samu> i think i can't do it like that
20:37:38 <Samu> it may store multiple flags
20:38:18 <LordAro> shouldn't matter
20:39:00 <Samu> i saw it have a value of 72 once
20:39:06 <Samu> 1 << 72... is too big
20:39:22 * andythenorth wonders what custom_tags.txt is doing in FIRS
20:39:31 <andythenorth> and why IH, RH etc don’t need it
20:39:50 <frosch123> andythenorth: version number or date in grf description?
20:39:56 <andythenorth> yes
20:40:04 <andythenorth> I need to dig through ‘why’ though
20:40:05 <DorpsGek> Commit by frosch :: r27754 /trunk/src (7 files in 3 dirs) (2017-02-26 20:39:58 +0100 )
20:40:06 <DorpsGek> -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs.
20:40:31 <andythenorth> it’s not in any of my other projects, and it’s preventing me moving the lang dir into src
20:40:38 <DorpsGek> Commit by frosch :: r27755 /trunk/src (4 files) (2017-02-26 20:40:32 +0100 )
20:40:39 <DorpsGek> -Codechange: Move TAB_SIZE to strings_type.h and use it consistently.
20:40:59 <DorpsGek> Commit by frosch :: r27756 /trunk/src (10 files in 4 dirs) (2017-02-26 20:40:53 +0100 )
20:41:00 <DorpsGek> -Codechange: Add StringTab enum
20:41:15 <Samu> 72 is the stored value for 2 flags, just checked
20:41:18 <Samu> VF_TIMETABLE_STARTED
20:41:20 <DorpsGek> Commit by frosch :: r27757 /trunk/src (5 files in 3 dirs) (2017-02-26 20:41:14 +0100 )
20:41:21 <DorpsGek> -Change: Make StringID 32bit.
20:41:26 <Samu> and VF_STOP_LOADING
20:41:36 <DorpsGek> Commit by frosch :: r27758 /trunk/src (5 files in 2 dirs) (2017-02-26 20:41:30 +0100 )
20:41:37 <DorpsGek> -Change: Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k.
20:42:29 <frosch123> andythenorth: why would it stop you from moving another dir?
20:43:25 <Samu> 9 is the stored value for 1 flag only, the VF_SERVINT_IS_PERCENT
20:46:45 <Eddi|zuHause> andythenorth: custom_tags is so the makefile can insert the version into the lang files. it should be an autogenerated file and not part of the repo
20:48:08 <frosch123> https://paste.openttdcoop.org/pmcpcamvc?/pmcpcamvc <- the acceleration stuff was already present in the savegame conversion, though with incorrect savegame version numbers
20:48:16 *** Supercheese has joined #openttd
20:48:29 <frosch123> so, i claim that changing them was already intended in 2010, just noone checked it properly
20:50:12 *** glx has joined #openttd
20:50:13 *** ChanServ sets mode: +v glx
20:50:47 <Supercheese> New strings wot
20:50:54 <Eddi|zuHause> the savegame conversion bit should only be needed for versions from before the setting was introduced, right?
20:50:58 <Supercheese> Hmm
20:51:36 <Samu> if (HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) - i dont understand how this works correctly... i'm trying to do something similar and i'm failing
20:51:53 <Supercheese> hah
20:52:02 <Supercheese> The webtranslator tells me, "There were error(s)"
20:52:13 <Supercheese> Why bother with parenthetical s
20:52:22 <Supercheese> "There were error" makes no sense
20:53:15 <frosch123> Eddi|zuHause: yes, but rv accel was added in 139, not 133
20:53:45 <Samu> vehicle_flags is a uint
20:54:10 <frosch123> Supercheese: "there was error"? :)
20:54:24 <glx> Samu: used as a bitfield
20:54:31 <Supercheese> Sure, but it doesn't say, "There was/were error(s)"
20:54:52 <Supercheese> Anyway, not a real problem, just a silly thing I noticed
20:56:44 <Samu> i'm trying something similar: if (HasBit(this->vehicle_flags, VF_LOADING_FINISHED)
20:57:02 <Samu> and if vehicle_flags value is currently 9
20:57:11 <Samu> it does return true instead of falsed
20:58:39 <Samu> 9 & 0 = 1 :(
20:58:48 <glx> bit 0 is set
20:59:02 <glx> bit 3 is set too
20:59:16 <glx> 9 = 1001
20:59:24 <LordAro> Samu: '&' is not checking a specific bit
20:59:32 <LordAro> it's doing bitwise and on 2 numbers
20:59:34 <Samu> oh, 9 & 1
21:00:45 <Samu> look at economy.cpp line 1650
21:00:52 <Samu> it's being used there
21:01:42 <Wolf01> Back... but not in black
21:01:59 <Samu> vehicle_flags can have a max of 10 flags, from 0 to 9
21:03:37 <Samu> bit 9 is always in the way
21:03:45 <Samu> so, hmm what can i do?
21:03:54 <glx> bit 9 is 2^9
21:05:01 <Samu> vehicle_flags is 72 at times, which is a mix of 2 flags being set
21:05:13 <Wolf01> frosch123, about the check for roadtype, the function should be used to filter on the exact subtype, not a set of them, the button might be disabled if no roadtypes are buildable, but single toolbars need to chech the subtype too
21:05:25 <glx> of course you can have multiple flags set a the same time
21:05:35 <Wolf01> That's why I pass RoadTypeIdentifier instead of just RoadType
21:06:01 <Samu> hmm a bitfield
21:06:03 <Wolf01> The problem is to avoid redundant or even useless checks inside the loop
21:06:49 <Wolf01> For example I ask "can I build ELRL for company 1 at date 1875?"
21:07:12 <Wolf01> ELRL is not buildable, but RAIL is
21:07:37 <Wolf01> But I asked for ELRL :P
21:07:59 <Wolf01> Maybe I'm a bit over-specific
21:09:26 <Samu> hmm, line 1650 of economy.cpp is doing HasBit(9, 1)
21:09:55 <Samu> isn't this wrong?
21:10:27 <Samu> bit 1 is not set
21:10:35 <andythenorth> hmm, not custom_tags.txt, it’s the lang dir flag for the makefile that’s wrong
21:10:37 <glx> it returns false
21:10:48 <DorpsGek> Commit by frosch :: r27759 trunk/src/strgen/strgen.cpp (2017-02-26 21:10:41 +0100 )
21:10:49 <DorpsGek> -Fix: strgen compilation
21:10:55 <andythenorth> seems FIRS makefile is different to IH etc
21:10:58 <Samu> heh, luckily it returns false
21:10:59 <frosch123> Wolf01: then move the bitmask test outside of the loop?
21:11:10 *** Snail has quit IRC
21:11:10 *** cHawk has quit IRC
21:11:10 *** blathijs has quit IRC
21:11:10 *** techmagus has quit IRC
21:11:10 *** DDR has quit IRC
21:11:10 *** Smedles has quit IRC
21:11:10 *** dvim has quit IRC
21:11:10 *** urdh has quit IRC
21:11:10 *** Warrigal_ has quit IRC
21:11:10 *** Vadtec has quit IRC
21:11:10 *** greeter has quit IRC
21:11:10 *** ST2 has quit IRC
21:11:10 *** mikegrb has quit IRC
21:11:10 *** Supercheese has quit IRC
21:11:10 *** supermop has quit IRC
21:11:10 *** bwn has quit IRC
21:11:10 *** ConductorCat has quit IRC
21:11:10 *** Compu has quit IRC
21:11:10 *** dustinm` has quit IRC
21:11:10 *** tycoondemon has quit IRC
21:11:10 *** _dp_ has quit IRC
21:11:10 *** gnu_jj has quit IRC
21:11:10 *** Ttech has quit IRC
21:11:10 *** Extrems has quit IRC
21:11:10 *** davidstrauss has quit IRC
21:11:10 *** efess has quit IRC
21:11:10 *** HerzogDeXtEr has quit IRC
21:11:10 *** supermop_ has quit IRC
21:11:10 *** Speedy has quit IRC
21:11:10 *** Maarten has quit IRC
21:11:10 *** Tharbakim has quit IRC
21:11:10 *** Flygon has quit IRC
21:11:10 *** innocenat has quit IRC
21:11:10 *** ccfreak2k has quit IRC
21:11:10 *** fiatjaf has quit IRC
21:11:10 *** Guest85 has quit IRC
21:11:10 *** Sylf has quit IRC
21:11:10 *** TheIJ has quit IRC
21:11:40 *** Warrigal_ has joined #openttd
21:11:40 *** mikegrb has joined #openttd
21:11:40 *** Vadtec has joined #openttd
21:11:40 *** ST2 has joined #openttd
21:11:40 *** greeter has joined #openttd
21:11:40 *** urdh has joined #openttd
21:11:40 *** dvim has joined #openttd
21:11:40 *** Smedles has joined #openttd
21:11:40 *** DDR has joined #openttd
21:11:40 *** techmagus has joined #openttd
21:11:40 *** blathijs has joined #openttd
21:11:40 *** cHawk has joined #openttd
21:11:40 *** Snail has joined #openttd
21:11:40 *** Sylf has joined #openttd
21:11:40 *** fiatjaf has joined #openttd
21:11:40 *** ccfreak2k has joined #openttd
21:11:40 *** TheIJ has joined #openttd
21:11:40 *** Guest85 has joined #openttd
21:11:40 *** innocenat has joined #openttd
21:11:40 *** Flygon has joined #openttd
21:11:40 *** Tharbakim has joined #openttd
21:11:40 *** Maarten has joined #openttd
21:11:40 *** Speedy has joined #openttd
21:11:40 *** supermop_ has joined #openttd
21:11:40 *** HerzogDeXtEr has joined #openttd
21:11:40 *** efess has joined #openttd
21:11:40 *** Supercheese has joined #openttd
21:11:40 *** supermop has joined #openttd
21:11:40 *** bwn has joined #openttd
21:11:40 *** ConductorCat has joined #openttd
21:11:40 *** Compu has joined #openttd
21:11:40 *** dustinm` has joined #openttd
21:11:40 *** tycoondemon has joined #openttd
21:11:40 *** _dp_ has joined #openttd
21:11:40 *** gnu_jj has joined #openttd
21:11:40 *** Ttech has joined #openttd
21:11:40 *** Extrems has joined #openttd
21:11:40 *** davidstrauss has joined #openttd
21:11:52 <Wolf01> frosch123 you mean the one at line 265?
21:12:03 <Samu> if the service interval was at bit 10
21:12:23 <Samu> it would return true when it was checking for VF_CARGO_UNLOADING
21:12:54 <Samu> HasBit(10, 1)
21:13:16 <Wolf01> Also, is FOR_ALL_VEHICLES useful in SE?
21:13:21 <frosch123> HasBit(roadsubtypes, rtid.subtype) directly after the ExistingRoadSubTypesForRoadType
21:14:03 <frosch123> it does not hurt, but the owner check won't trigger
21:14:41 *** ChanServ sets mode: +v Rubidium
21:14:41 *** ChanServ sets mode: +v orudge
21:14:41 *** ChanServ sets mode: +v peter1138
21:14:41 *** ChanServ sets mode: +v Alberth
21:15:03 <andythenorth> hmm, it would be nice to only have one Makefile
21:15:29 <andythenorth> I don’t know which one is canonical, FIRS, or the others
21:15:38 <Wolf01> Also I should unserstand which constants to use there, as company/owner are the same thing
21:16:06 <andythenorth> diff isn’t telling me anything I can make decisions with
21:16:13 <glx> Samu: the flags are like a row of electrical switches, and HasBit() checks the status of a given switch
21:20:02 <Eddi|zuHause> andythenorth: there's a makefile project on the devzone
21:20:09 <Wolf01> glx, the best part is that was samu which explained to me where I misunderstood how to use a flag
21:20:24 <Samu> t.t
21:20:29 *** DDR has quit IRC
21:20:32 <Samu> alzeimer
21:20:35 <andythenorth> definitely I am here https://xkcd.com/349/
21:20:46 <andythenorth> I just wanted default lang for Iron Horse to be US English :P
21:21:03 <andythenorth> now I have broken FIRS and am re-writing the Makefiles for 4 projects :|
21:21:08 <Wolf01> Ha!
21:22:10 <Wolf01> And not happy, you are using an experimental version of nml which breaks more things?
21:23:12 <andythenorth> nah, that’s fine
21:23:31 <Supercheese> makefiles
21:23:33 * Supercheese shudders
21:23:36 <Supercheese> black magick they be
21:23:52 <andythenorth> latest makefile from devzone breaks Road Hog http://dev.openttdcoop.org/projects/make-nml/repository/entry/Makefile
21:25:49 <frosch123> andythenorth: one of the super guys has a project with en_US as default
21:26:08 <andythenorth> oh that bit’s trivial :)
21:26:16 <frosch123> but we need to delete the eints project on the server to activate that
21:26:19 <andythenorth> oic
21:26:23 <andythenorth> not so good
21:26:24 <frosch123> eints does not allow switching base languages for existing projects
21:26:34 <andythenorth> maybe I leave it
21:27:01 <andythenorth> I’m surprised no foamers have complained that my UK English is US English in IH
21:27:26 <frosch123> we have one guy who applies for UK translator
21:27:29 <Supercheese> Nah just means you're doing it right ;)
21:27:35 *** Stimrol has quit IRC
21:27:36 <frosch123> but i am not sure whether he understood what he was doing
21:27:43 <Supercheese> (definitely not biased whatsoever, nope)
21:27:54 <Samu> this->vehicle_flags - how do i convert this to bitfield thingy?
21:28:01 <Samu> maybe that will do it
21:28:14 * andythenorth reverts everything and backs away
21:28:38 <andythenorth> any more work on this is likely to result in needing my backup drive :P
21:28:41 <Wolf01> Samu, it's already bitfield
21:28:45 <frosch123> Supercheese: "English (Simplified)" and "English (Traditional)"?
21:28:51 <frosch123> but what is en_AU ?
21:28:52 <Supercheese> Classic :D
21:28:57 <Supercheese> English (Upside Down)
21:28:59 <andythenorth> ‘stralian
21:29:03 <andythenorth> the makefile stuff is clearly flail
21:29:18 <andythenorth> all my projects are broken w.r.t to the canonical project in devzone
21:29:31 <frosch123> i think the canonical project is broken itself
21:29:45 <andythenorth> it’s remarkably sophisticated
21:29:58 <frosch123> not sure whether it work at any point in time, but somewhen people stopped working on it
21:31:08 <DorpsGek> Commit by frosch :: r27760 /trunk/src (saveload/afterload.cpp table/settings.ini) (2017-02-26 21:31:02 +0100 )
21:31:09 <DorpsGek> -Change: Enable realisitic train and road vehicle acceleration by default.
21:31:52 <Samu> then why is it not working?
21:32:03 <Wolf01> Oh, good one frosch123 :)
21:32:19 <andythenorth> :)
21:32:45 <Samu> bool loading_unloading = HasBit(this->vehicle_flags, VF_LOADING_FINISHED) != 0;
21:32:51 <Wolf01> I always forget that and can't figure out why vehicles don't work as intended
21:33:12 <Wolf01> HasBit already returns bool
21:33:25 <glx> != 0 is useless
21:33:27 <Samu> ok let me try that then
21:35:53 <Samu> bool HasBit(9, 0) hmm
21:36:14 <andythenorth> Alberth: small things :) http://dev.openttdcoop.org/attachments/download/8373/industry-window-text-9.png
21:36:34 <Samu> HasBit<unsigned short> returned true bool
21:36:35 <andythenorth> small changes = big difference
21:36:44 <Samu> doesn't work for me :(
21:37:23 <Wolf01> What if the bit 9 is really set?
21:38:21 <Samu> bit 9 is really set
21:38:50 <Wolf01> No, sorry, bit 0
21:39:24 <Samu> loading finished?
21:39:41 <Samu> hmm maybe you're right
21:39:43 <Wolf01> You are asking for the bit 0
21:40:11 <Samu> loading is finished indeed, vehicle is coming out of station
21:40:23 <Samu> damn it
21:40:29 <andythenorth> hmm
21:40:32 <andythenorth> 3 ‘clean’ targets
21:40:47 <andythenorth> clean, distclean, maintainer-clean
21:41:00 <Samu> damn i'm such a fool
21:41:22 <planetmaker> hi :)
21:41:28 <Wolf01> o/
21:41:29 <frosch123> andythenorth: they are official targets of some important standard
21:41:34 <frosch123> hoi pm
21:41:38 <planetmaker> andythenorth, 'clean' should normally suffice
21:41:44 <Samu> looks like i can't use loading finished
21:42:01 <planetmaker> maintainer-clean cleans basically everything as the maintainer can rebuild everything from scratch
21:42:12 <Wolf01> What are you trying to achieve?
21:42:22 <planetmaker> and dist-clean cleans everything except some 'hard' stuff which might be generated by non-standard tools
21:42:31 <frosch123> Wolf01: https://xkcd.com/349/ <- andy's roadmap for today
21:42:38 <planetmaker> iirc that is. And yes, they're standard targets as suggested by make docs
21:42:56 <Wolf01> Yeah, I've seen it
21:42:57 <Samu> i want to make running costs equal to 0 while the vehicle is loading or unloading at a non drive through station, to simulate engines being turned off
21:42:58 <frosch123> he just passed the 10 hour mark
21:43:38 <andythenorth> yup
21:43:41 <andythenorth> sharks are circling
21:43:48 <andythenorth> although I did watch Lego Batman also
21:44:29 <Wolf01> Samu, then !HasBit(veh_flags, 0) and check for "is in station"
21:44:58 <Eddi|zuHause> andythenorth: as a rule of thumb: "clean" only cleans generated code files, and "distclean" also cleans generated data files
21:45:43 <andythenorth> I’ve been extending ‘clean’ to rm everything that’s not in the repo
21:45:44 <Eddi|zuHause> andythenorth: so after "clean" you still only need a compiler, where after "distclean" you might need lots of external tools
21:46:04 <andythenorth> to be honest, I could just ‘rm *’ and ‘hg revert --all'
21:46:07 <Eddi|zuHause> e.g. if you export png files from gimp and stuff
21:46:11 <andythenorth> instead of maintaining a ‘clean' target
21:46:25 <Eddi|zuHause> andythenorth: no.
21:46:37 <Eddi|zuHause> andythenorth: clean should only delete files that the makefile actually creates
21:46:58 <Eddi|zuHause> andythenorth: an unsuspecting user might otherwise lose temporary files like patches and stuff
21:47:08 <andythenorth> understood, I was proposing an alternative to using make
21:47:10 <Eddi|zuHause> or Makefile.local and stuff
21:47:20 <andythenorth> I could abandon ‘make clean'
21:47:32 <planetmaker> what makefile troubles you?
21:47:33 <Eddi|zuHause> that's a terrible idea
21:47:54 <Eddi|zuHause> because if you don't use make clean yourself, how do you support other people who want to use it?
21:48:03 <andythenorth> I don’t currently
21:48:16 <andythenorth> as in, I don’t understand the tool, so I’m almost certainly using it wrong
21:48:26 <Eddi|zuHause> but that's an essential part of open-source-development
21:48:27 <andythenorth> so I make changes, but with no idea of the goal or correct method
21:48:49 <andythenorth> planetmaker: can’t get FIRS to pick up a non-standard lang dir location from Makefile.config
21:48:56 <andythenorth> Road Hog, Iron Horse etc get it fine
21:50:47 <Eddi|zuHause> andythenorth: example: say you generate png files with gimp, and use cpp+nml to compile the grf. then you provide a tar with the pngs and the pnml files
21:51:18 <Eddi|zuHause> andythenorth: then make clean should remove the .nml file which is output by cpp, and make distclean should also remove the png files
21:51:26 <andythenorth> so this is wrong http://dev.openttdcoop.org/projects/iron-horse/repository/entry/Makefile.in
21:52:38 <Wolf01> https://paste.openttdcoop.org/pzdjy2zkb frosch123, could be a bit better now?
21:53:35 <Eddi|zuHause> andythenorth: the idea here is that some people can build your project without depending on gimp
21:53:52 <andythenorth> how?
21:54:09 <Eddi|zuHause> andythenorth: because you provide the .pngs in the tarball
21:54:20 <andythenorth> but that’s including generated files in the repo
21:54:24 <andythenorth> or is it just for dist?
21:54:27 <andythenorth> just for dist
21:54:28 <andythenorth> ok
21:54:34 * andythenorth answers own question
21:55:06 <Eddi|zuHause> you could also provide the generated files in the repo, if they're rarely changed
21:55:13 <Eddi|zuHause> like openttd.grf
21:55:15 <andythenorth> that’s usually wrong
21:55:20 <andythenorth> 'usually'
21:55:52 <andythenorth> causes people to whine about repo bloat, which is an irritating social effect
21:56:37 <Eddi|zuHause> yes, there are pros and cons to be decided there
21:57:06 <andythenorth> so I should delete the caches with maintainer-clean
21:57:12 <andythenorth> that’s tedious
21:57:31 <Eddi|zuHause> i don't know what these caches do
21:57:36 <andythenorth> cache stuff
21:57:46 <Eddi|zuHause> clean should be the right place for those
21:57:48 <andythenorth> they’re not distributed :P
21:59:16 * andythenorth reading the gnu docs
22:00:21 <andythenorth> ok it makes sense
22:00:27 <andythenorth> https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets
22:01:24 <andythenorth> also Road Hog makefile seems to work for FIRS
22:01:31 * andythenorth hates cargo-culting stuff with no understanding
22:02:35 *** sla_ro|master has quit IRC
22:05:25 <Eddi|zuHause> andythenorth: ok, if i read this right, i got clean and distclean backwards. clean should remove .nml and .png while distclean should retain .png (since they were in the tarball)
22:06:27 <andythenorth> that’s ok :) I read the docs :)
22:06:50 <andythenorth> I have no intention of using or supporting any targets except clean
22:07:37 <andythenorth> but now it’s a decision, not an accident
22:10:15 <Alberth> one happy andy? :)
22:10:27 <Alberth> (refering to the picture you sent me)
22:11:00 <andythenorth> totally
22:11:06 <andythenorth> no more misleading text
22:11:14 <andythenorth> also no more wall of text in FIRS industry windows
22:11:26 <andythenorth> and no more translation churn with all the ‘3t per 8t’ crap
22:11:29 <Alberth> at least not what you didn't add ;)
22:12:29 <Alberth> and I agree, Makefile is total overkill, I might have time to take a look if you want
22:13:04 <Alberth> somewhen this week-ish
22:13:10 <andythenorth> that would be cool :)
22:13:26 <andythenorth> if I could understand it better, I could maintain it better ;)
22:14:07 <Alberth> it's not that complicated, you just need to reason backwards in it
22:14:46 <andythenorth> the challenge is that it provides a universal framework for grf projects
22:14:54 <andythenorth> so it offers a lot of power that I don’t need
22:15:06 <Alberth> yeah, I have little faith in universal * things, in general
22:15:26 <andythenorth> it has worked this far, without trouble
22:15:38 <Alberth> no offence to its author
22:15:55 <andythenorth> :)
22:16:16 <Alberth> so what broke it?
22:16:46 <Alberth> or, why were you messing with it?
22:17:08 <andythenorth> FIRS makefile wouldn’t take nml flags to set a custom lang dir
22:17:30 <andythenorth> seems that replacing the FIRS makefile with the Road Hog makefile works fine
22:17:41 <andythenorth> but I don’t know which is newer / closer to canonical :)
22:17:51 <Alberth> lol, but we got a road industry set?
22:18:01 <andythenorth> and I don’t know which targets I’m supposed to test, as I only use ‘make install’ and ‘make clean'
22:18:03 <andythenorth> so eh
22:18:17 <Alberth> and just "make" I guess
22:18:46 <frosch123> Wolf01: the same applies for the second loop, doesn't it?
22:19:10 <Wolf01> No, if you have the vehicle you must be able to build the road
22:19:11 <andythenorth> I would prefer one makefile, with less GIMP etc
22:19:24 <andythenorth> which I copy-paste to all my current projects
22:19:36 <Wolf01> Or you wouldn't be able to send it to a depot if you remove it by mistake
22:19:57 <Alberth> stripping stuff is likely not so difficult, but it's too late now, nn :)
22:20:02 <andythenorth> and a common approach to setting filename / revisions for builds would be helpful
22:20:14 <andythenorth> also FIRS appears to depend on python2.7 for hg, afaict
22:20:27 <andythenorth> whereas the compile is >= python3.4
22:20:31 <andythenorth> (nml)
22:20:50 <Alberth> lots of small issues :)
22:21:08 <andythenorth> I am testing the python2.7 thing, it might be cruft
22:21:20 <planetmaker> andythenorth, there's little to do about hg being a python2 application
22:21:39 <planetmaker> nor nml can be rolled-back to python2, thus it needs both pythons
22:21:46 <andythenorth> that’s what the comment says in Makefile.config also ;)
22:21:46 <supermop> need a good name for a grf of wires
22:21:48 <andythenorth> hg is hg
22:22:28 <planetmaker> python3 still has not the proper character handling which hg needs to treat files as it needs
22:22:39 <planetmaker> or might have with python 3.5 or 3.6, dunno yet
22:22:44 <andythenorth> the build seems to have worked without it
22:22:50 <planetmaker> without what?
22:23:22 <planetmaker> well, it needs hg - not python2 directly
22:23:36 <planetmaker> But hg usually has - possibly its own - python2
22:23:53 <planetmaker> not sure how it's done on windows... but yeah
22:23:58 <andythenorth> http://dev.openttdcoop.org/projects/firs/repository/entry/Makefile.config#L21
22:24:07 <andythenorth> is the line I have just deleted, with no apparent problem
22:26:57 <andythenorth> nml_langcheck is dead?
22:27:00 <andythenorth> 2012
22:27:12 <andythenorth> superseded by eints, surely?
22:27:17 <planetmaker> yes, I think it's not needed anymore with the invention of eints
22:27:20 <Eddi|zuHause> sounds like something that eints does
22:29:08 <planetmaker> andythenorth, the PYTHON(2) variable likely only is used in the Makefile (or some versions of it) in order to determine the build date
22:29:20 <planetmaker> REPO_DAYS_SINCE_2000 ?= $(shell $(PYTHON) -c "from datetime import date; print (date(`echo "$(REPO_DATE)" | sed s/-/,/g | sed s/,0/,/g`)-date(2000,1,1)).days")
22:29:25 <planetmaker> ^^ I found that via grep
22:29:52 <planetmaker> thus you might break the versioning of filenames when packaging the builds
22:29:53 <andythenorth> ah, so that’s not failing because I’ve replaced the FIRS Makefile with the Road Hog Makefile
22:29:56 <planetmaker> but maybe not
22:30:21 <andythenorth> I first want all my current projects configured same (there are 4 or 5)
22:30:29 <andythenorth> then they can be improved / simplified
22:30:34 <planetmaker> understandably :)
22:31:25 <planetmaker> NEWGRF_VERSION ?= $(shell let x="$(REPO_DAYS_SINCE_2000) + 65536 * $(REPO_BRANCH_VERSION)"; echo "$$x")
22:31:30 <frosch123> supermop: wired systers
22:31:39 <Alberth> I'll ask again whether my offer is still needed :)
22:31:40 <planetmaker> so magic that branches get different newgrf versions
22:31:41 <Alberth> nn
22:31:46 *** Alberth has left #openttd
22:33:15 <planetmaker> and that NEWGRF_VERSION is given the compiler to be built into the NewGRF as a flag, so that the builds get a time stamp which also shows ingame
22:34:29 <andythenorth> I think that’s missing from most of my makefiles, likely they’re outdated
22:34:46 <andythenorth> they’re all copied from (probably) FISH
22:34:54 <andythenorth> which might have aged badly
22:37:32 *** mescalito_ has quit IRC
22:38:50 *** sim-al2 has joined #openttd
22:43:53 <Eddi|zuHause> andythenorth: older makefile versions used the (local) revision number
22:44:30 <Eddi|zuHause> not sure which is more useful
22:46:20 <andythenorth> I like the local rev
23:04:10 <andythenorth> also bed
23:04:12 *** andythenorth has left #openttd
23:07:22 *** frosch123 has quit IRC
23:10:20 *** Progman has quit IRC
23:20:11 <Samu> uhmm...
23:22:48 *** Gja has quit IRC
23:27:48 *** matt11235 has quit IRC
23:58:35 *** Wormnest has quit IRC