Log for #openttd on 3rd May 2019:
Times are UTC Toggle Colours
00:01:26  <DorpsGek_II> [OpenTTD/OpenTTD] ldpl opened pull request #7560: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**13
00:03:11  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7270: Introduce CMake (and removing all other project-related code)
00:03:36  <glx> I think I properly handled the NRT merge
00:39:18  *** Samu has quit IRC
00:46:35  *** Wormnest has quit IRC
00:54:35  *** Wormnest has joined #openttd
01:46:53  *** Wormnest has quit IRC
01:47:35  *** tokai|noir has quit IRC
01:51:06  *** tokai has joined #openttd
01:51:06  *** ChanServ sets mode: +v tokai
01:55:31  *** Flygon has joined #openttd
01:59:04  *** Wormnest has joined #openttd
02:33:51  *** D-HUND has joined #openttd
02:37:13  *** debdog has quit IRC
02:47:03  *** Supercheese has quit IRC
02:47:24  *** Supercheese has joined #openttd
02:58:53  *** Gustavo6046 has quit IRC
03:02:46  *** HerzogDeXtEr has quit IRC
03:05:23  *** glx has quit IRC
03:07:08  *** Supercheese has quit IRC
03:07:29  *** Supercheese has joined #openttd
03:08:31  *** Wormnest has quit IRC
03:25:09  <DorpsGek_II> [OpenTTD/OpenTTD] dorobouNeko opened issue #7561: Fix for power/running cost sorting algorithm.
03:31:45  <DorpsGek_II> [OpenTTD/OpenTTD] tbasten opened issue #7562: Feature Request: Add drag functionality to land purchase tool
05:40:58  *** andythenorth has joined #openttd
06:31:01  *** tycoondemon has joined #openttd
06:33:37  <peter1138> Ye sno
06:37:31  <peter1138> andythenorth, another useful SYL contribution...
06:37:38  <andythenorth> endless
06:38:12  <peter1138> andythenorth, telling other people not to bug JGR! lolz
06:38:19  <andythenorth> "ikr"
06:38:30  <andythenorth> it's not that I'm never an asshole
06:38:36  <andythenorth> it's just that I know when I am
06:46:43  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7560: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**13
07:27:19  *** andythenorth has quit IRC
07:34:05  *** sla_ro|master has joined #openttd
07:37:15  *** Supercheese has quit IRC
07:37:37  *** Supercheese has joined #openttd
07:41:35  *** gelignite has joined #openttd
07:50:04  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh merged pull request #7544: Fix #7481: Don't modify oil rig stations during removal
07:50:09  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed issue #7481: kdtree.hpp crash when Oil Rig is removed
07:52:42  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #7562: Feature Request: Add drag functionality to land purchase tool
07:54:12  <DorpsGek_II> [OpenTTD/OpenTTD] tbasten commented on issue #7562: Feature Request: Add drag functionality to land purchase tool
07:55:06  *** andythenorth has joined #openttd
07:58:24  *** Supercheese has quit IRC
08:22:45  <andythenorth> 3 company colours? o_O
08:27:55  <peter1138> No.
08:28:11  <peter1138> But I can maybe carry on working on RGB colours if that's desired.
08:29:49  <peter1138> Weird how station coverage display isn't quite working how I designed it :p
08:58:01  <DorpsGek_II> [OpenTTD/OpenTTD] ldpl commented on pull request #7560: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**13
09:00:50  <_dp_> actually, afaict full client id has undefined size :/
09:00:51  <_dp_> coz enum
09:03:20  <_dp_> so for all c++ standard cares it can be 8 bits and crash everything
09:04:42  <_dp_> also it's not just client id, a lot of openttd code assumes enums to be 4 bytes
09:07:04  <Eddi|zuHause> isn't that what assert_compile should handle?
09:07:46  <_dp_> typed enums ftw
09:09:37  *** tycoondemon has quit IRC
09:16:47  *** tycoondemon has joined #openttd
09:17:16  <peter1138> Okay so maybe I should resurrect my client-id-wrapping patch.
09:19:12  <peter1138> But even so, 16 bits is better than 13 bits.
09:19:19  *** APTX_ has joined #openttd
09:19:24  <_dp_> can we just do a quick fix for 1.9.2 and proper stuff later?
09:23:49  <_dp_> idk what your patch does but to me it seems 8 bits of id is enough as 32 are only needed while connecting which is only between server and that specific client so probably doesn't need id at all
09:25:01  <Eddi|zuHause> a "connection ID" separate from "client ID"?
09:25:27  <_dp_> Eddi|zuHause, yeah, or it may not need id at all
09:25:45  <_dp_> Eddi|zuHause, it doesn't seem like anything needs to reference it by that id
09:25:48  <_dp_> at that point
09:25:57  <Eddi|zuHause> i don't know enough about the internals to judge that
09:26:17  <_dp_> I didn't dig too deep either
09:26:44  <_dp_> imo it's 1.10-type fix anyway to proper deal with it
09:27:04  <_dp_> just because it'll change some underlying stuff and will need more testing
09:29:29  <peter1138> Well, I'd rather tha quick fix was with 16 bits than 13 bits.
09:30:02  <peter1138> Or just wait til 1.10 :p
09:30:15  <peter1138> Everybody plays JGRPP these days anyway, apparently.
09:30:17  <_dp_> ok, how should I do it, just add another commit to pr or finally learn all git-amend-whatever thing? xD
09:30:40  <peter1138> git amend is super easy, I don't know what you'd need to learn.
09:31:17  <_dp_> idk either, just never done it before
09:31:19  <peter1138> Just add "--amend" and ... it will amend the last commit.
09:31:42  <_dp_> mostly using mercurial so this whole history rewriting is kinda new to me xD
09:31:46  <peter1138> If it's not the last commit, then you just make a new commit and then use fixup with rebase.
09:31:51  <peter1138> mercurial was shit though.
09:36:32  * LordAro covers planetmaker's ears
09:37:30  <Artea> hi
09:37:37  *** gareppa has joined #openttd
09:37:41  <Artea> year 3515
09:37:57  <peter1138> That's exciting!
09:38:32  <Eddi|zuHause> don't bother coming in here before year 5000000
09:38:47  <peter1138> Anyway 8 bit client ID means you can't have 255 connections.
09:39:29  <peter1138> There's a few reserved values.
09:40:07  <Artea> I need a maker to my planet
09:40:15  <_dp_> oh, I'm sure noone will care if that becomes 253 :p
09:41:45  <Artea> I need a standalone console :(
09:42:26  * _dp_ has about 20 tabs of console open
09:42:46  <Artea> webadmin for ottd please
09:44:10  <_dp_> Artea,
09:44:17  <_dp_> :p
09:46:30  <Artea> :P
09:46:35  <Artea> your have timestamps
09:46:38  <Artea> :o
09:47:30  <Artea> bah
09:47:38  <Artea> 7 airplanes crashed
09:48:31  <Artea> Yann is going win
09:48:50  <Artea> he is making more money than me right now
09:54:27  *** Gustavo6046 has joined #openttd
09:58:44  *** gelignite has quit IRC
10:03:25  *** gareppa has quit IRC
10:05:35  *** andythenorth has quit IRC
10:08:25  *** Gustavo6046 has quit IRC
10:22:41  <DorpsGek_II> [OpenTTD/OpenTTD] ldpl updated pull request #7560: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**13
10:31:58  *** andythenorth has joined #openttd
11:19:33  <andythenorth> is it lunch?
11:19:37  <andythenorth> how many carolies?
11:23:12  <Artea> not yet
11:23:17  <Artea> Dragon Ball Super is on
11:34:58  * Artea on elGuitar Tom - Shawn's Got the Shotgun
11:38:51  <Artea> this DooM Concert is so awesome
11:53:52  <peter1138> I've not lunched yet.
11:54:27  <peter1138> Mine is ~ 170 carolies though, cos I added brie.
11:55:38  <peter1138> Mmm, that's pretty mature brie...
11:56:39  <Artea> aiiiiiiiii
11:56:51  * Artea on EGT - Nobody Told Me About iD
11:58:19  <peter1138> I think it was à consummer avant mid-April.
12:00:51  <Artea> peter1138:
12:01:02  <Artea> I <3 that mix
12:04:17  <peter1138> MOD files, eh?
12:04:33  <peter1138> Well, tracker-style visualisation, anyway.
12:05:25  <peter1138> And now my caek has gone.
12:05:30  *** Samu has joined #openttd
12:05:43  <Artea> :o
12:06:52  <peter1138> 500 carolies after lunch. I should have more.
12:16:38  *** HerzogDeXtEr has joined #openttd
12:24:13  *** gelignite has joined #openttd
12:24:44  <andythenorth> I had mostly salad
12:24:51  <andythenorth> but also halloumi
12:24:53  <andythenorth> meat free
12:24:57  <andythenorth> one meat a day
12:25:02  <andythenorth> fix climate change
12:41:16  <peter1138> Oh not again andythenorth
12:47:35  <Artea> UAC OS v2.0
12:48:13  <Artea> that helmet in Brutal DooM is awesome
12:59:44  *** gnu_jj has quit IRC
13:00:08  *** gnu_jj has joined #openttd
13:25:53  *** nielsm has joined #openttd
13:35:42  <Samu> Rythorn Airline AI has won for the first time!
13:35:51  <Samu> vs Rondje
13:54:59  * Artea on OTTD - Harp harmony 'n humor
14:14:57  *** HerzogDeXtEr1 has joined #openttd
14:17:39  *** spnda has joined #openttd
14:18:31  *** Wormnest has joined #openttd
14:20:55  *** HerzogDeXtEr has quit IRC
14:28:57  *** Gumle2 has joined #openttd
14:44:08  <spnda> So uh, has the docker issue on linux been fixed yet?
14:54:32  <LordAro> spnda: yes
14:54:38  <LordAro> if you rebase your PR, it should build
14:54:40  <LordAro> probably.
14:56:36  <spnda> just rebase and then simply push?
14:57:13  <LordAro> force push, yeah
14:58:52  <DorpsGek_II> [OpenTTD/OpenTTD] spnda updated pull request #7550: Add: Screenshot window (& simplify the about/help DropDown)
15:02:24  *** sla_ro|master has quit IRC
15:25:25  *** Flygon has quit IRC
15:57:16  *** Gustavo6046 has joined #openttd
16:19:26  *** andythenorth has quit IRC
16:20:43  *** glx has joined #openttd
16:20:44  *** ChanServ sets mode: +v glx
16:24:18  *** Progman has joined #openttd
16:28:14  *** andythenorth has joined #openttd
16:34:31  *** VoId23[m] has joined #openttd
16:37:03  <andythenorth> pretty quiet
16:37:38  <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] commented on issue #7296: Can't type non-latin symbols from keyboard in game on linux
16:38:53  <V453000> YO LOL HOW U DOIN
16:39:03  * V453000 shouts
16:39:43  <nielsm> oh right, maybe the newgrf version ("revision number") should be bumped in master because of NRT?
16:40:28  <andythenorth> maybe
16:40:40  <andythenorth> and also we should bump bananas when we do a release
16:42:20  <glx> is a good idea ?
16:46:48  <Eddi|zuHause> hm... is there an alternative console key? because the current one happens to be on a dead key, and that doesn't seem to work
16:47:11  <glx> press it twice ?
16:48:16  <Eddi|zuHause> doesn't work either
16:48:37  <glx> on windows I think it works, but I can't really test
16:49:15  <Eddi|zuHause> maybe i just use a different keyboard layout...
16:49:17  <andythenorth> oof
16:49:22  <andythenorth> so is nforenum maintained?
16:49:25  <nielsm> glx: it's probably a good idea to get rid of that grow function yes
16:49:49  <Eddi|zuHause> andythenorth: you mean more or less than nmlc?
16:49:51  <nielsm> (and get less raw pointers)
16:49:57  <LordAro> andythenorth: i'm not entirely sure anyone knows how to bump bananas
16:50:06  <andythenorth> Eddi|zuHause: no I mean specifically, instead of nml's vague situation
16:50:29  <andythenorth> I thought nforenum had been officially dropped
16:50:34  <LordAro> glx: i like it (grow removal)
16:50:57  <Eddi|zuHause> andythenorth: i really don't think the situation is any different.
16:51:02  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7563: Remove grow() helper function
16:51:04  <nielsm> glx, typo in midifile.cpp:131, "info" should be "into"
16:51:46  <glx> I copy pasted the above function ;)
16:52:00  <nielsm> oops
16:52:25  <LordAro> glx: block->data.end()-1 could be .back()
16:52:38  <DorpsGek_II> [OpenTTD/OpenTTD] Nik-mmzd commented on issue #7296: Can't type non-latin symbols from keyboard in game on linux
16:52:52  <glx> ah yes, that seems better
16:54:15  <andythenorth> oh I see
16:54:21  <andythenorth>
16:54:27  <andythenorth> we/i/s
16:55:04  <peter1138> andythenorth, my issue is you going around telling everyone it's unmaintained just becuase it HASN'T NEEDED TO BE CHANGED
16:55:17  <peter1138> Woah caps lock :/
16:55:23  <andythenorth> yeah I'm NOT ARGUING ABOUT THAT
16:55:29  <andythenorth> I was about to adjust my post
16:56:06  <andythenorth> more accurately, the former maintainers are not here, and/or have said they will not maintain it
16:56:32  <glx> it's in grfcodec repo anyway
16:57:15  <andythenorth>
16:57:34  <glx> it's on github now :)
16:57:36  <andythenorth> oh lordaro has commits there :)
16:58:03  <peter1138>
16:58:15  <LordAro> i deny everything
16:59:09  <Eddi|zuHause> 18:33	<Eddi|zuHause>	you need state machines for transition tiles
16:59:10  <Eddi|zuHause> 18:33	<Eddi|zuHause>	i.e. it will never(TM) happen
16:59:14  <Eddi|zuHause> uhm... yeah.
16:59:30  <Eddi|zuHause> apparently nothing changed in two years :p
16:59:53  <peter1138> It's always "you need a state machine" rather than "hey guys I've MADE this state machine that WORKS"
17:01:01  <andythenorth> should I search for 'eddi' and 'state machine' :)
17:01:06  <andythenorth> we all have our thing :P
17:01:47  <Eddi|zuHause> is that better than "eddi" and "is/are overrated"?
17:03:24  <andythenorth> top result seems to be unrelated :P Eddi|zuHause
17:03:30  <andythenorth>
17:03:58  <andythenorth> it's like a bizarre car crash, watching front end web devs learn about state
17:04:17  *** Wolf01 has joined #openttd
17:04:21  <Eddi|zuHause> i don't think your search method is particularly optimized :p
17:04:33  <andythenorth> "Eddi|zuHause state machine webster"
17:04:45  <andythenorth> could probably do better
17:04:56  <Eddi|zuHause> more like ""
17:05:04  <Wolf01> o/
17:05:22  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #7563: Remove grow() helper function
17:06:01  <andythenorth>
17:06:07  <andythenorth> "<frosch123> Eddi|zuHause: how about ripping out the state machine of airports instead :p"
17:06:18  <Wolf01>
17:06:25  <spnda> I can't seem to find the code where a roadveh (bus) gets told to stop at a station, can anyone help me out?
17:07:15  <andythenorth> 164 results for state machine and eddi :P
17:07:22  <glx> should be somewhere around orders handling
17:07:54  <spnda> uh I'll check there...
17:08:19  <spnda> Ah yes, that seems to be what I am searching for, order_cmd.cpp
17:08:33  <peter1138> Eh, vehicle tick handler will do the actual stopping.
17:08:52  <spnda> Well it's more about orders for what I am searching about
17:08:54  <Eddi|zuHause> andythenorth: the words "eddi" and "state machine" appear 97 times in the same line in my log
17:08:58  <spnda> Not the actual way of how it stops
17:10:08  <Eddi|zuHause> [15. April 2010] [16:43:57] <Eddi|zuHause>    ... anyway, it's basically SimCity 4-style "puzzle tiles" with newgrf-airport-style state machines for vehicle movement
17:11:28  <Eddi|zuHause> apparently nothing changed in 9 years
17:12:39  <andythenorth> 'nothing' :D
17:12:42  <spnda> Are there any methods to get the destination of a cargo, or all destinations of all cargos at a station?
17:18:34  <Eddi|zuHause> what kind of "method" are you looking for?
17:18:59  <Eddi|zuHause> in the gui, you can click on the little "+" icon
17:20:32  <Eddi|zuHause> but those numbers are only simulated, based on probability, only the neyt hop numbers are actually known to the station/cargo at any moment
17:21:31  <spnda> What enum value, I guess, do I pass to Vehicle->type?
17:22:22  *** Corns has joined #openttd
17:22:28  <spnda> Eddi|zuHause, well yeah, a method which lists all stations all of the passengers/cargo at a station want to go to
17:22:42  <spnda> If that doesn't exist I guess I'll have to do it myself
17:23:20  <glx> it should exist in gui, but maybe without an explicit function
17:24:05  <Corns> feature request: voluntary company merging in multiplayer
17:24:19  <spnda> oh hey corns
17:24:25  <Corns> hello :)
17:24:46  <Corns> is it just a matter of exposing the command request?
17:25:31  <Eddi|zuHause> Corns: might open up some abuse potential
17:25:57  <Corns> how so?
17:26:07  <Corns> oh like, the company deliberately inducing heavy expenses before merge
17:26:10  <spnda> ok to make it easy, can I check if a station has a specific cargo at the station?
17:26:37  <Eddi|zuHause> spnda: check from where?
17:26:49  <spnda> Code, C++
17:27:05  <Eddi|zuHause> needs more context
17:27:46  <spnda> Like uh, I have a StationID, and I want to check if the station with that ID has cargo, passengers, waiting at exactly that station at that moment
17:28:31  <Eddi|zuHause> spnda: maybe you want to look at the station list window for reference
17:29:17  <glx> StationViewWindow::BuildCargoList() may do something like that
17:30:15  <spnda> glx, that doesn't take a StationID though
17:31:35  <Eddi|zuHause> spnda: there might exist a "Station::FromID(id)" function
17:32:09  *** andythenorth has quit IRC
17:34:17  <glx> basically BuildCargoList() parses st->goods[i].cargo where st is a station
17:35:11  <spnda> Oh I was looking at the wrong BuildCargoList
17:35:46  <glx> well one BuildCargoList calls the other one :)
17:39:08  <spnda> so I could just do st->goods, where st is my StationID, and would it return the amount?
17:39:44  <Corns> Eddi|zuHause oh i see, abuse via starting new companies and merging them into a main company
17:39:55  <Corns> in order to get free infrastructure/funds
17:40:40  <peter1138> Time restrict it, and... do accounting properly :p
17:40:59  <Corns> maybe they could require - yeah, an age or company value requirement
17:41:55  <Corns> modifiable in game settings (per save so that multiplayer server owners can control it)
17:43:06  <glx> spnda: no, st is a Station, not a StationID, but you can get a Station from the StationID
17:44:39  <spnda> What's that functions name called
17:44:43  <Corns> bleh i'm gonna shelve that idea for now and go back to pathfinding
17:48:12  <glx> Station::Get(stationID) should give you the station from the id
17:52:07  <glx> then you'll have st->goods[cargo_type].cargo with the cargo packets of cargo waiting in this station
17:53:12  <spnda> Yeah I figured
17:53:20  <spnda> I'm doing station->goods[0].cargo.AvailableCount;
17:53:52  <spnda> Actually I have to replace that 0 with the cargo_type...
17:54:02  <glx> 0 is CT_PASSENGERS
17:54:42  * peter1138 mumbles something about assuming cargo types :/
17:54:49  <spnda> What's the difference between CT_PASSENGERS and CC_PASSENGERS?
17:55:16  <glx> peter1138: in the enum it is ;)
17:55:29  <peter1138> Cargo type vs cargo classes.
17:55:31  <glx> but of course can be redefined by newgrf
17:55:38  <spnda> ah right...
17:55:59  <glx> a cargo type can be of some cargo class
17:56:18  <glx> like a tourist cargo can have passenger class
17:56:33  <glx> IIRC
17:58:55  *** Corns has quit IRC
18:02:35  *** andythenorth has joined #openttd
18:11:22  *** Gumle2 has quit IRC
18:12:21  <spnda> Is there some kind of indicator for a Station that it has been server before so that it will load up cargo from the sorrounding areas?
18:15:21  <nielsm> station->goods[cargonum].HasVehicleEverTriedLoading()
18:15:24  <nielsm> presumably
18:15:35  <nielsm> I just looked in station_base.h for things that looked relevant
18:21:00  <spnda> didn't see that method, thanks
18:22:27  *** Gumle2 has joined #openttd
18:41:36  <spnda> Guys, this bool always returns true, why?
18:47:34  <spnda> ohhhhh none of those methods are actual methods of GoodsEntry...
18:48:32  <spnda> but of StationCargoList... so it should work... huh
18:57:29  <spnda> does it maybe not return 0 when there is no cargo?
19:07:13  <andythenorth> so NRT newgrf docs....copy the railtype page and edit it?
19:08:10  <andythenorth>
19:08:21  <nielsm> I guess?
19:08:32  <nielsm> if it's not as much work as starting over
19:08:58  <nielsm> it might be safer to copy the structure but rewrite all the content
19:09:13  <nielsm> otoh it's a wiki so little mistakes can be fixed easily
19:11:28  <andythenorth> I don't want to be faffing around over word choices :)
19:11:41  <glx> spnda: using CC_PASSENGERS is wrong here
19:11:59  <spnda> Ok I'll use CT again
19:12:19  <glx> and total is avail + reserved
19:13:27  <glx> so I guess it returns true before the amount check
19:14:06  <glx> unless a vehicle tried loading
19:15:39  <peter1138> src/lang/korean.txt:3691: FATAL: Command '<empty>' can't have a gender
19:15:40  <peter1138> Hmm
19:16:18  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7441: Feature: Per-group wagon removal flag
19:18:41  <glx> validation fail in eints I guess
19:19:32  <glx> -STR_REPLACE_REPLACING_WHEN_OLD                                  :낡으면 {ENGINE}(으)로 교체
19:19:32  <glx> +STR_REPLACE_REPLACING_WHEN_OLD                                  :낡으면 {ENGINE}{G "으" ""}로 교체
19:22:34  <spnda> glx, the bus had tried to load a few times
19:22:50  <spnda> but it still returned true
19:23:36  <glx> put a breakpoint in the function to check what happens then
19:26:30  *** frosch123 has joined #openttd
19:27:24  <peter1138> Mmm, single malt whisky
19:32:04  <andythenorth> quak
19:32:32  *** APTX_ has quit IRC
19:32:37  *** APTX_ has joined #openttd
19:32:59  <glx> should we fix korean.txt or should we expect the translators will do it ?
19:33:36  <nielsm> don't assume the translators will see build errors
19:33:38  <glx> it's just missing a 0
19:36:38  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7564: Fix 6f33cfd05: incorrect {G} usage in korean translation
19:36:53  <glx> that's something eints should be able to check
19:37:51  <nielsm> at the very least eints should probably try to run the real strgen on each file before it commits
19:38:05  <nielsm> and hold back languages that fail
19:38:08  <glx> and report errors yes
19:39:27  <frosch123> i think i fixed that same issue years ago in wt3 :p
19:39:38  <spnda> How do I go to the next order?
19:40:11  <nielsm> spnda: you mean make a vehicle skip current order?
19:40:17  <spnda> yes
19:40:29  <nielsm> for that you should probably trigger the "skip order" command
19:41:18  <spnda> I can only find CMD_SKIP_TO_ORDER, is that it?
19:41:47  <frosch123> andythenorth: ripping out airport state machines:
19:43:27  <spnda> SkipToNextRealOrderIndex()?
19:43:28  <glx> hehe for {G} the looked arg is the following arg, but for {P} it's the previous arg
19:44:17  <andythenorth> frosch123: madness :)
19:44:24  <nielsm>
19:44:25  *** erratic_ has joined #openttd
19:45:02  <nielsm> frosch123: intense
19:46:58  <frosch123> nielsm: i still like the idea that only the terminal adds to the catchment area
19:47:03  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7564: Fix 6f33cfd05: incorrect {G} usage in korean translation
19:47:04  <frosch123> is that also included in your version?
19:47:32  <nielsm> frosch123: no, I hadn't considered anything like that
19:47:35  <nielsm> but it sounds reasonable
19:47:49  <nielsm> especially now we have shaped catchments
19:48:47  <nielsm> hmm idea for feature name: ART (Airports with Rules and Tiles)
19:48:52  <frosch123> oh, i even wanted a bus/truck-stop like split between pax and cargo terminal
19:49:24  <frosch123> nielsm: some other dude did some interactive minigame where you could build airports in 2d, to test vehile movement
19:49:44  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 merged pull request #7564: Fix 6f33cfd05: incorrect {G} usage in korean translation
19:50:11  <frosch123>
19:50:30  <nielsm> lol 11 years old
19:51:01  <frosch123> yeah, i would have guessed 2010
19:51:13  <frosch123> but apparently it was quite close to my attempt
19:51:25  <frosch123> well, "attempt" is exaggerating :p
19:51:34  *** sla_ro|master has joined #openttd
19:52:03  <frosch123> essentially i made it to learn ottd gui code
19:52:34  <peter1138> Let me guess, it just needs a state machine...
19:53:01  <frosch123> state machines don't solve problems
19:53:04  <frosch123> they create problems
19:54:31  * andythenorth is a state machine
19:57:30  <nielsm> so how long until aircraft are moving around on it? :)
19:57:37  <nielsm> and do you need any help?
19:57:59  <glx> let's do the state machine in xml then :)
19:58:06  <peter1138> ini-xml-json
19:58:59  <andythenorth> invent our own yaml-ish
19:59:23  <nielsm> AML, airport markup language
20:00:52  <andythenorth> what's the problem with airports? :)
20:01:14  <frosch123> they are flat an huge
20:01:28  <frosch123> you need sloped taxiways on interesting maps
20:01:56  <frosch123> also, fixed layouts are boring
20:02:07  <nielsm> can real aircraft even traverse slopes of any significance during taxiing?
20:03:11  <nielsm> (I don't know if the forces on the wheels would be different from those during takeoff/landing, and if they'd be able to control speed in a safe way)
20:03:16  <frosch123> don't they use the same engines for taxiing as the yuse for flying?
20:04:02  <nielsm> yeah the wheels don't have motors, they just push around with the air engines
20:04:43  <nielsm> also need taxiway bridges!
20:04:44  *** erratic_ has quit IRC
20:04:47  <andythenorth> lots of airports are on slopes, but not steep
20:05:04  <frosch123> aircraft have way stronger acceleration than cars, so they should be fine on slopes
20:06:19  <andythenorth> you don't want to be landing downslope, obvs
20:06:59  <andythenorth> too easy to do a roll-off
20:07:54  <glx> anyway landing gears can handle the landing so a slope is nothing
20:08:45  <andythenorth> there's a fair slope on Filton near my house (now disused),-2.5710164,3a,75y,269.26h,63.99t/data=!3m6!1e1!3m4!1sj1MOGgucZshdBxA4FlFeEg!2e0!7i16384!8i8192
20:09:35  <glx> and there's also push/pull tractors that can attach to front wheel
20:09:35  <andythenorth> the runway peaks in the middle, with a 27m drop to one side, and 15m to the other
20:09:54  <spnda> Why does this not make the vehicle go to the next order? DoCommandP(v->tile, v->index, (v->cur_implicit_order_index + 1) % v->GetNumOrders(), CMD_SKIP_TO_ORDER);
20:10:59  <andythenorth> overshoot did happen landing downhill on that runway
20:11:39  <andythenorth> obviously building a petrol station at the end of the runway was 'fine'
20:12:12  * spnda likes the gif that comes up if I click next
20:12:32  <glx> what wrong could happen anyway ;)
20:16:14  <V453000> I finished drawing my first ipad train today :)
20:16:32  <V453000> pixel pushing might still find a place in my life after all
20:16:46  <andythenorth> :D
20:25:05  <spnda> I can't get my DoCommandP to work..sad
20:28:55  <nielsm> what is your order skip in response to
20:29:10  <nielsm> player doing something, or automatic based on some condition?
20:29:29  <nielsm> because DoCommandP is only for directly player-triggered actions (typically clicking the gui)
20:29:34  <spnda> oh
20:29:39  <spnda> well this is a condition
20:29:43  <spnda> what do I do then
20:29:54  <nielsm> ther should be another DoCommand
20:30:14  <nielsm> which does not preflight the command and such
20:32:51  *** chomwitt has joined #openttd
20:34:42  <spnda> So how do I get the VehicleID from Vehicle?
20:35:07  <nielsm> vehicle->index
20:35:12  <nielsm> works for almost anything
20:35:19  <spnda> Thought so
20:35:19  <nielsm> thing->index to get its id
20:35:30  <spnda> Why is DoCommand overloading then
20:35:38  <spnda> DoCommand(v->tile, v->index, (v->cur_implicit_order_index + 1), CMD_SKIP_TO_ORDER);
20:35:51  <spnda> 'no overload function takes 4 arguments'
20:37:40  <nielsm> you're missing an argument before the command itself
20:37:41  <nielsm> DoCommandFlag flags
20:37:46  <nielsm> CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags, uint32 cmd, const char *text = nullptr);
20:39:03  *** Gumle2 has quit IRC
20:43:33  <spnda> nielsm, this doesn't do anything either: DoCommand(v->tile, v->index, (v->cur_implicit_order_index + 1), DC_EXEC, CMD_SKIP_TO_ORDER);
20:44:02  <nielsm> you lost the modulo order count at some point
20:45:00  <spnda> oh true...
20:50:52  *** spnda has quit IRC
20:53:31  <V453000> andythenorth: vs
20:53:50  <V453000> haz lights
20:53:52  <V453000> 300% realism
20:54:45  <nielsm> the trains look very tiny in the first
20:55:22  <V453000> yeah, one of the reasons they don't exist anymore :P
20:56:08  <andythenorth> litez
20:56:10  <andythenorth> ftw
20:56:11  <andythenorth> V453000:
20:56:15  <andythenorth> iz layers?
20:56:16  <andythenorth> or pixels?
20:56:30  <nielsm> pickles
20:56:37  *** spnda has joined #openttd
20:57:01  <spnda> Uh I am back my IRC client just hung up or so
20:57:17  <V453000> pixelz
20:57:21  <V453000> no layerz
20:57:26  <spnda> So uh I've proven now it works as expected, just the skip order command still doesn't actually skip the command
20:58:03  <nielsm> imma sleep, gn
20:58:07  <V453000> utilizing layers is on the menu, but not for this one yet
20:58:29  <spnda> gn nielsm
20:58:40  <spnda> oh might be because I didn't add the %, I added & lol
21:04:14  <andythenorth> I use layers for rear lights
21:04:24  <V453000> :D
21:04:27  <V453000> well
21:04:30  <andythenorth> could use recolour sprite, but eh
21:04:33  <andythenorth> dunno how
21:04:51  <V453000> I do use those in rainbow slugs
21:04:54  <V453000> and I'll use them in wagons too
21:05:29  <V453000> your tendency to add shittons of different cargoes makes me want to create a future-proof maintainable system for cargo wagons
21:05:42  <V453000> so they will split into layers so that recolouring cargoes is feasible
21:05:58  <V453000> while keeping CC stripes etc of course :)
21:06:05  *** nielsm has quit IRC
21:08:40  *** arikover has joined #openttd
21:10:20  <andythenorth> lolz :)
21:12:59  <spnda> DoCommand(v->tile, v->index, ((v->cur_implicit_order_index + 1) % v->GetNumOrders()), DC_EXEC, CMD_SKIP_TO_ORDER);
21:13:09  <spnda> why the hell is the vehicle not getting the orders skipped
21:18:43  <Wolf01> V453000, I would like to gift F to a friend, if I buy it on steam, he could redeem the drm free version too or I must buy it on the site?
21:29:57  <glx> only steam key from steam
21:35:13  *** gelignite has quit IRC
21:40:14  <spnda> Is there another way to skip the current order other than DoCommand or DoCommandP? Both don't work for me
21:41:42  <glx> you can put a breakpoint in CmdSkipToOrder() to trace it
21:44:27  <glx> oh and the command must be executed as the owner of the vehicle, else it will fail
21:45:09  <andythenorth> V453000: pls draw rest of horse trains, thx bai
21:47:19  <spnda> I started OpenTTD with the VS Debugger thing.... It's just a white screen and it's been loading forever now
21:48:18  <spnda> Ah it's loaded now
21:50:12  *** sla_ro|master has quit IRC
21:52:06  <spnda> glx, I have the trace of the CmdSkipToOrder function, what do I do with that
21:53:04  <glx> with a breakpoint at start of the function you can go step by step and see where it returns
21:58:43  <spnda> Just would be nice if the VS Debugger actually worked
22:07:25  *** andythenorth has quit IRC
22:09:18  <peter1138> It does.
22:09:25  <spnda> Not really
22:09:28  <spnda> Sometimes
22:10:35  *** frosch123 has quit IRC
22:11:06  <spnda> Anyway, I have this data now and from what I see is that it does return where I think it would and right above it should be executing CmdSkipToOrder(), which isn't skipping to the next order
22:14:04  <spnda> I think it's due to this code inside the if inside the definition for CmdSkipToOrder(): v->GetNumOrders() < 2. As there are only 2 orders for this vehicle and as the list is an index, I'd assume it starts at 0, so 1 is less than 2.
22:15:44  <peter1138> Don't confuse indices with counts.
22:17:38  <spnda> Do you see anything wrong here? CmdSkipToOrder(v->tile, DC_EXEC, v->index, ((v->cur_implicit_order_index + 1) % v->GetNumOrders()), "");
22:35:05  <spnda> I'm clueless... I've no idea why this is not performing that command
22:36:18  <glx> 2 orders so v->GetNumOrders() == 2
22:37:16  <spnda> ah ok, and what does v->cur_implicit_order_index return?
22:38:12  <glx> but if you go in CmdSkipToOrder() step by step you should clearly determine what return statement is executed as the next step will be the closing }
22:38:45  *** chomwitt has quit IRC
22:39:51  <glx> v->cur_implicit_order_index is the current implicit order as its name indicates :)
22:41:51  <spnda> Maybe it was working, just that that math, 1+1 / 2 is 1, so it wouldn't skip back to the 1st order, where it started.
22:42:09  <glx> it's a modulo
22:42:21  <glx> 1 + 1 = 2, modulo 2 = 0
22:42:30  <spnda> 0 != 2
22:42:39  <glx> remainder of the division
22:42:59  <spnda> yeah, but I want to get 2, wouldn't I? because that's the number of the order
22:43:15  <glx> you can't get 2 if there's only 2 orders
22:43:24  <glx> first order is 0, second is 1
22:43:32  <spnda> oh as I thought...
22:44:10  <glx> your math is correct, check the variables in the function
22:44:37  <spnda> 0 + 1 = 2, modulo 2 = 0.5?
22:44:40  <spnda> 1.5*
22:44:46  <glx> 0 + 1 = 1
22:44:50  <spnda> yeah *
22:44:56  <glx> modulo 2 = 1
22:45:12  <glx> and 2%2 = 0
22:46:08  <glx> x%y is x - (x / y) * y
22:47:01  <glx> or something like that
22:47:11  <spnda> well that would give 1
22:47:20  <spnda> for 2%2
22:47:47  <peter1138> You know what a remainder is?
22:47:56  <glx> 2 - (2/2)*2 = 2 - 1*2 = 2 - 2 = 0
22:48:28  <spnda> remainder, the amount left over. Why the hell did I say 1
22:49:18  <glx> anyway check the value of the variables if it's really returning on the first test line
22:50:01  <spnda> Just for test purposes I just put in "1" instead of all the variables, and it's still not skipping the order, so it's probably not that
22:50:31  <glx> and if you put 0 ?
22:50:39  <glx> just to make sure
22:51:49  <glx> in the debugger you can see all variables in the function, either on mouse hover, or in the variables windows
22:52:45  <spnda> I put 0, still doesn't skip the order
22:52:59  <glx> so you should be able to check all tests by hand
22:53:18  <spnda> (Eventhough that is kinda expected behaviour there as it is on 0, and it should switch to 1, but is staying at 0)
22:53:28  *** Samu has quit IRC
22:54:19  <glx> it doesn't switch because it returns before the switch
22:55:18  <spnda> so uh i'd have to wait until that funciton is finished executing?
22:56:08  <glx> the order is switched at lines 1125/1126
22:58:57  <glx> and it will skip to the next real order, implicit orders will be ignored
23:00:24  <glx> but really, going through the function step by step will tell you exaclty what happens
23:03:40  <glx> possible failures for the first test: wrong index (unlikely), new order (passed to the command) == current order, invalid new order, only 1 order
23:03:51  <glx> then there's the owner check
23:04:52  <glx> can fail is _current_company is not the owner of the vehicle
23:05:00  <glx> *if
23:05:12  <spnda> then it checks if it's loading, and it should leave the station if, then tells the selected to be equal to the real_order_index and then to the implicit_order_index and invalidates the vehicle orders
23:05:57  <spnda> then just returns a CommandCost()
23:05:58  <glx> no it's the opposite, it sets real_order and implicit order to the value you passed
23:07:26  <spnda> Well from all I see inside that function, the values and coditions don't apply so the function should go through fine.
23:08:01  <glx> use step by step to check what happens, that's the only way
23:09:48  <spnda> Well now I am even more confused why this is not running as expected
23:10:18  <glx> if the order doesn't changed then something make it return early as error, or there's less than 2 manual orders, ie orders explicitely set via the order window
23:11:53  <spnda> I set 2 orders manually over the order window. v is not null, v is the primaryvehicle, the selection should not be the index of the implicit order (unsure about this one),
23:12:17  <spnda> the selection is definitely not more than the amount of orders of the vehicle and is 2.
23:12:48  <spnda> And I have ownership of the vehicle
23:13:34  <glx> but _current_company may be another company when you DoCommand()
23:13:51  <glx> maybe you should show the full code :)
23:14:32  <spnda> glx,
23:19:40  <glx> hmm I see, _current_company is probably not your company when Order::ShouldStopAtStation() is called
23:21:11  <spnda> so, can I do anything about that?
23:23:49  <peter1138> Yeah, don't call a command from that context.
23:24:46  <glx> indeed all vehicle handling is done as OWNER_NONE
23:25:45  <glx> and why would you want to skip order there, as anyway if the vehicle doesn't stop it will auto skip
23:26:31  *** Wolf01 has quit IRC
23:26:50  <spnda> it autoskips? I don't think it does
23:34:39  <spnda> I am fairly sure now it does not
23:37:39  <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #7059: Town name language choice affects number of towns / world population
23:41:14  <spnda> Could I not do _current_company = v->owner, right before I call DoCommand?
23:41:51  *** Samu has joined #openttd
23:43:03  *** arikover has quit IRC
23:46:13  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7547: Change: Allow building road stops over self-owned one-way/blocked road.
23:47:19  <glx> ok I checked, it does skip
23:47:29  <glx> doesn't
23:50:09  *** spnda has quit IRC

Powered by YARRSTE version: svn-trunk