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

Powered by YARRSTE version: svn-trunk