Back to Home / #openttd / 2017 / 02 / Prev Day | Next Day
#openttd IRC Logs for 2017-02-26

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