Config
Log for #openttd on 18th September 2021:
Times are UTC Toggle Colours
00:54:59  *** Strom has quit IRC
00:56:42  *** Strom has joined #openttd
02:13:34  *** D-HUND has joined #openttd
02:16:56  *** debdog has quit IRC
03:02:12  *** _aD has quit IRC
03:15:00  *** pm has joined #openttd
03:15:37  *** pm is now known as Guest202
03:22:21  *** planetmaker has quit IRC
03:29:20  *** glx has quit IRC
04:20:51  *** Flygon has joined #openttd
06:17:31  *** Progman has joined #openttd
06:17:52  *** jottyfan has joined #openttd
06:26:07  <DorpsGek> [OpenTTD/nml] sevenfm commented on issue #209: Cargo callback "profit" probably broken https://git.io/JODbP
06:59:46  *** jottyfan has quit IRC
06:59:55  *** jottyfan has joined #openttd
07:13:07  *** jottyfan has quit IRC
07:14:34  *** jottyfan has joined #openttd
07:16:23  *** jottyfan has quit IRC
07:19:11  *** jottyfan has joined #openttd
07:33:08  *** sla_ro|master has joined #openttd
07:36:42  *** andythenorth has joined #openttd
07:39:43  *** nielsm has joined #openttd
07:48:49  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9524: Fix #9521: Don't load at just removed docks that were part of a multi-dock station https://git.io/JzLtc
08:02:34  <TrueBrain> https://github.com/OpenTTD/OpenTTD/pull/9410 <- rambling of a madman :P "A day in the life of Samu" should the title be :)
08:02:49  <TrueBrain> very hard to decypher what he tried to fix there
08:08:00  <andythenorth> yo
08:08:35  <LordAro> "trying to overbuild one of the lock ends has strange/inconsistent error messages"
08:08:38  <LordAro> i think.
08:10:36  <TrueBrain> My motivation for doing this: I first tried this, then I tried that, and finally this is the result
08:10:42  <TrueBrain> dunno, something is wrong there :D
08:10:57  <TrueBrain> LordAro: it fixes many more weird stuff surrounding building of canals, funny enough
08:11:26  <LordAro> yes, anything past the first paragraph is the 'description'
08:11:33  <LordAro> by accident
08:12:13  <TrueBrain> when you try to build a canal on a waterdepot, it tells you: there is already a canal
08:12:15  <TrueBrain> which is a lie
08:14:37  <TrueBrain> okay .. so we have these two commits:
08:14:37  <TrueBrain> https://github.com/OpenTTD/OpenTTD/commit/0e250f2bdfc8eb7f435f59398766f7774e31610c
08:14:40  <TrueBrain> https://github.com/OpenTTD/OpenTTD/commit/00530f4ccfd6c076b9ca0d4996ce4a185b5a0311
08:15:16  <TrueBrain> one adds "removing the sea" as cost for canals, the other completely removes any cost for water-based clearing :P
08:16:15  <TrueBrain> I think 2 developers had another opinion about the cost for building canals
08:16:33  <TrueBrain> I am honestly surprised why it is even allowed to build a canal on the sea
08:16:41  <TrueBrain> that makes very little sense, in a real world context
08:16:59  <LordAro> it's good for making completely flat coastlines
08:17:02  <LordAro> (that don't flood)
08:17:19  <LordAro> does the first commit predate rivers?
08:17:26  <TrueBrain> no clue
08:18:16  <TrueBrain> Riviers were added in 11926
08:18:26  <TrueBrain> so the commits postdate it by a long shot
08:18:49  <TrueBrain> 5 years before those commits rivers were added :)
08:19:05  <LordAro> really? i'm sure i remember them being added
08:20:18  <TrueBrain> https://github.com/OpenTTD/OpenTTD/commit/4a2f7db99b6e110c7ecca26003f8f09b052b3167
08:20:26  <TrueBrain> no sure why you are making me your slave :P
08:20:49  <TrueBrain> lazy developers :P :P
08:20:51  <TrueBrain> <3
08:21:03  <LordAro> oh, i didn't know they were a thing before they got added to mapgen
08:21:38  <LordAro> even so, before they were regularly in the maps, things (like costs for stuff) could easily be often overlooked
08:22:08  <TrueBrain> the first commit explicitly adds the cost of removing the sea
08:22:12  <TrueBrain> which makes me wonder why :P
08:22:22  <TrueBrain> a lot of code added to make that happen, complexity-wise
08:23:58  <andythenorth> oh noes!
08:26:14  <TrueBrain> I also didn't know canals were in OpenTTD since for-ever :P
08:29:03  <andythenorth> also canals on sea are MVP
08:29:10  <andythenorth> that's how all the best MP games end
08:31:09  <TrueBrain> and I love that CmdBuildCanal can also build rivers and sea
08:31:14  <TrueBrain> not confusing, not at all
08:32:19  <TrueBrain> so I can get the error "Canal already build" while creating sea :D
08:33:19  <LordAro> i sense a classic "TB fixes 10yrs of technical debt" PR coming soon
08:33:30  <TrueBrain> Samu's PR is mostly correct
08:33:33  <TrueBrain> most likely by accident
08:33:42  <TrueBrain> the only thing I currently wonder about ..
08:33:45  <TrueBrain> if you place river over river in SE
08:33:48  <TrueBrain> you dont get an error
08:33:52  <TrueBrain> as .. it is not that useful to error about
08:33:58  <TrueBrain> so should building sea over sea give an error?
08:37:18  <dP> if you don't add sea clearing cost you can clear seas with canals for cheap
08:38:23  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JzLWR
08:38:56  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JzLWr
08:39:10  <TrueBrain> "if", suggesting that choice hasn't been made in 2013 already
08:40:50  *** jottyfan has quit IRC
08:41:25  <TrueBrain> okay, that was an interesting rabbit hole
08:41:49  <TrueBrain> random changing things sometimes results in a working solution .. figuring out why it would be the right thing to do, that is where the hard work comes in :P
08:45:28  <dP> oh, yeah, that's actually kind of a bug in master, probably introduced by 00530f4ccfd6c076b9ca0d4996ce4a185b5a0311
08:45:43  <dP> in vanilla canal costs happen to even out with sea clearing
08:46:08  <dP> but with basecosts it can be exploited since it doesn't add sea clearing
08:47:06  <dP> so realism murdered gameplay :p
09:17:53  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #9325: Feature: Ctrl-Click on vehicle list in GB_SHARED_ORDERS opens order window https://git.io/JG4mh
09:20:43  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #9557: Fix: Prevent train reversing when wholly inside a train depot https://git.io/JzL20
09:21:02  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9557: Fix: Prevent train reversing when wholly inside a train depot https://git.io/JzL2g
09:21:05  *** Samu has joined #openttd
09:21:20  *** iSoSyS has joined #openttd
09:22:40  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #9520: [Bug]: Wrong unreservation behaviour when reversing a train inside a depot when an incoming reservation exists https://git.io/JErKD
09:24:30  *** iSoSyS has quit IRC
09:26:33  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9511: Feature: Add selected toolbar buttons to MacBook Pro Touch Bar https://git.io/JzLah
09:38:57  <TrueBrain> meh @ 9105
09:39:00  <TrueBrain> adding the IP in the chat looks really weird
09:40:50  <TrueBrain> and I never really got an answer why that is useful
09:40:50  <TrueBrain> hmm
09:48:13  <dP> somewhat unrelated but I just though of something...
09:48:20  <dP> how do you ban player that connects via turn?
09:50:32  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9524: Fix #9521: Don't load at just removed docks that were part of a multi-dock station https://git.io/JEMNJ
09:51:30  <Samu> looks good
09:52:12  *** morbidbird has joined #openttd
09:54:14  *** andythenorth has quit IRC
09:59:07  *** m0rbidbird has joined #openttd
09:59:16  *** andythenorth has joined #openttd
10:03:17  *** andythenorth has quit IRC
10:05:26  *** morbidbird has quit IRC
10:07:04  <dP> oh, turn sends client ip to the server, cool
10:08:07  <nielsm> that requires you to trust the TURN server too though
10:08:39  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #9558: Add: [Network] On join, log the ClientID + IP + Name clearly https://git.io/JzLMs
10:09:46  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9105: Improve server logs for administration https://git.io/JzLMV
10:09:59  <dP> nielsm, hm, yeah... can someone just make his own turn server to connect to servers?
10:10:04  <dP> that would just send random ip
10:10:44  <FLHerne> well, then you can IP-ban the turn server if you realise what's going on
10:11:22  <dP> but looks like you'll have to do that on system level, not in the game
10:12:32  <Samu> hmm TrueBrain, removing that if statement makes placing water on water have a cost
10:12:54  <TrueBrain> Samu: hmm .. how do you place water?
10:13:01  <nielsm> yeah if I could just set a TURN server up on my own network and "proxy" myself through 127.0.0.1 and tell them I have any other address and they trust it... kinda impossible to protect against other than banning the TURN server
10:13:19  <TrueBrain> (as far as I know, we only know rivers, canals or sea. Not "water", hence the question)
10:13:38  <Samu> i overbuild a canal on itself and it always taxes me £3750
10:13:58  <Samu> should be saying already built
10:14:34  <TrueBrain> okay, in that case I am wrong :D
10:14:46  <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #9557: Fix: Prevent train reversing when wholly inside a train depot https://git.io/JzLDX
10:15:30  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JzLDA
10:15:47  <Samu> scenario editor is complicating things
10:15:59  <dP> lol, and fake turn can also imitate ips of other players if they're somehow known
10:16:04  <TrueBrain> owh, okay, I see, I missed that it also makes building skip if you are already owner of the tile
10:16:09  <TrueBrain> makes sense, I guess
10:16:28  <dP> what happens if it sends ip of the server I wonder xD
10:17:18  <dP> ok, nvm, server checks to not kick itself
10:17:52  <TrueBrain> nielsm: not sure what scenario you have in mind, but that also requires taking over the Game Coordinator :) As both the server and the client need to connect to the same TURN server ofc :)
10:20:08  <nielsm> good point
10:20:16  <TrueBrain> your scenario does work on the server-side
10:20:27  <TrueBrain> the server could proxy itself through its own TURN server, and fake the IP reported to him
10:20:35  <TrueBrain> but .. yeah .. if you shoot yourself in the foot .. it tends to hurt :P
10:21:02  <TrueBrain> there are easier MITM scenarios :D
10:23:42  <Samu> it will always say can't build canal if an error is to pop up
10:23:53  <Samu> even if i hold ctrl to place sea
10:24:13  <Samu> the command is being multi purposed
10:24:17  <TrueBrain> yeah ...
10:24:21  <TrueBrain> one bug at the time, I would say
10:25:56  <Samu> placing river is different, apparently, need to find out why
10:30:54  <TrueBrain> Just funny how DC_FORCE_CLEAR_TILE grown to be to only do anything useful (for building canals) when there is an MP_OBJECT on the tile
10:30:58  <TrueBrain> for all other cases it doesn't do anything
10:31:28  <TrueBrain> well, no, more specific: for MP_OBJECTs that are on water
10:31:42  <TrueBrain> in that case you magically also pay for removing the sea
10:34:28  <TrueBrain> Fix: reduce cost of building canals over objects on the sea\n\nIt is not like we will drain the sea first, to put water back in it after.
10:34:40  <TrueBrain> Samu: something like that I suggest for the commit that removes DC_FORCE_CLEAR_TILE
10:36:56  <TrueBrain> your other commit becomes a bit easier after that. Something like: Fix: wrong error message was given when building canals over ship depots\n\nIsTileType check also considers ship depots and locks water. IsWaterTile checks for this
10:36:58  <TrueBrain> or something like that
10:37:04  <TrueBrain> makes it a bit more clear in the git history what was going on
10:38:00  <TrueBrain> IRC is not the place for this, oops
10:38:13  <dP> If you think realism canals in openttd assume low depth so building them does require draining most of the sea
10:38:52  <dP> because you can drain canals easily
10:40:30  <TrueBrain> Samu: updated my comment with suggestions. And I would not include any other fix in this PR, as it kinda already addresses two different problems ;) Any other fix can go in a new PR :)
10:44:00  <TrueBrain> these functions always remind me most of OpenTTD is code stacked on code stacked on code, where "it worked for the tested usecases" :P
10:44:18  <TrueBrain> too bad creating a regression-set for this is really difficult :(
10:47:37  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JcgTi
10:47:59  <Samu> think i did it, im too slow editing commits in between
10:48:45  <dP> hm, actually, if you think realism building canals on sea makes no sense at all :p
10:49:05  <dP> there should just be some other way of making level 0 ground that abusing canals
10:49:18  <dP> *than
10:50:39  <dP> and stop other players from blocking ship routes
10:52:10  *** morbidb1rd has joined #openttd
10:54:52  <Samu> if i make it just if (water && !IsTileOwner(current_tile, OWNER_WATER)) continue;
10:55:03  <Samu> things get a little better in scenario editor
10:55:11  <FLHerne> dP: I think of building canals on sea as being like this https://www.google.co.uk/maps/place/Felixstowe/@51.9553117,1.2956606,4605m/data=!3m1!1e3!4m5!3m4!1s0x47d97635581d89a3:0x821bdd4b6b3e6df0!8m2!3d51.961726!4d1.351255?hl=en
10:55:20  <Samu> can overbuild sea on sea without an error
10:55:39  <FLHerne> The water was there already, but you're dredging and building straight concrete walls
10:55:57  <Samu> but if it is a canal... it's still erroring
10:56:34  <FLHerne> I'm sure the Dutch people have a better example
10:57:55  <Samu> "can't build a canal here, already built", but im holding Ctrl, to place a sea, it's the wrong message
10:59:26  *** m0rbidbird has quit IRC
11:00:37  <Samu> ok i see
11:00:45  <Samu> canal owner is OWNER_NONE
11:00:51  <Samu> sea owner is OWNER_WATER
11:01:36  <Samu> I think it's possible to make it overbuild a sea on a canal, let me think
11:05:13  <dP> FLHerne, so, basically, using canals as embankments?
11:05:51  *** morbidb1rd has quit IRC
11:06:44  <TrueBrain> Samu: maybe the check should just be: if "wc" is canal, check there is no canal. If "wc" is sea, check there is no sea. And for river. Or something.
11:06:48  <TrueBrain> it seems that is now the intended functionality
11:07:21  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JzLAx
11:07:45  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #9524: Fix #9521: Don't load at just removed docks that were part of a multi-dock station https://git.io/JzLxL
11:08:01  <TrueBrain> but, not something for this PR :) One bug at the time :P
11:08:11  <dP> FLHerne, problem with sea canals in openttd is that they're the same as land ones so they imply having the same "depth"
11:08:17  <FLHerne> dP: I suppose so
11:09:00  <FLHerne> dP: I think they're still 'canal' to grf though
11:09:02  *** andythenorth has joined #openttd
11:09:12  <FLHerne> so ships can be forced to go more slowly or whatever
11:09:19  <TrueBrain> right, that leaves a few reviews of a few PRs of mine, and a review of a PR of andythenorth , and one bug .. closing in on 12.0 :)
11:09:26  <dP> FLHerne, yeah, that too
11:09:53  <FLHerne> Anyway, the normal place to build canals on sea is along the shore, and that should be pretty shallow already
11:09:58  <andythenorth> it's unclear if my PR is finished
11:10:12  <FLHerne> random canal tiles in the middle of the ocean would be hard to explain in real-life terms
11:10:17  <FLHerne> but no-one actually builds those
11:11:06  <dP> FLHerne, openttd doesn't have the proper concept of "depth". there is river/canal "depth" and there is "sea" "depth"
11:11:22  <FLHerne> I know that
11:11:32  <FLHerne> but I don't really see the problem
11:11:44  <FLHerne> in my mind, sea near the shore is shallow because that's how seas are
11:11:54  <FLHerne> so building canals there seems perfectly reasonable
11:12:48  <dP> problem is that building canals avoids the cost of clearing the sea
11:13:00  <FLHerne> TrueBrain: There's the newgrf bridges PR https://github.com/OpenTTD/OpenTTD/pull/9161TrueBrain:
11:13:15  <FLHerne> but that probably needs too much review to make 12.0
11:13:28  <dP> you don't pay for clearing sea when you build canal because "it's already water" and then you don't pay when you clear canal because it's suposed to be shallow
11:13:32  <TrueBrain> no clue; I don't do NewGRF reviews :P
11:13:50  <dP> and the end result is that it's impossible to raise the cost of clearing sea even with newgrf
11:13:56  <FLHerne> hm
11:14:33  <dP> so everyone just builds land-bridges :p
11:14:56  <andythenorth> we do need to train some victims for newgrf reviews though :P
11:15:06  * andythenorth trying to figure it if this is done or not https://github.com/OpenTTD/OpenTTD/pull/9093
11:16:01  * andythenorth sitting outside in unseasonable bright sun
11:16:10  <andythenorth> can't see laptop screen so well
11:16:19  <Samu> I think I did it, wow, what an overcomplicated check
11:16:30  <Samu> if (water && (wc == WATER_CLASS_CANAL && !IsTileOwner(current_tile, OWNER_WATER) || wc == WATER_CLASS_SEA && IsCanal(current_tile) && !IsTileOwner(current_tile, OWNER_NONE))) continue;
11:18:07  <Samu> i can overbuild sea on sea, sea on canal
11:18:39  <Samu> can overbuild canal on sea
11:18:45  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #9559: Fix #9484: update locale currencies settings mapping https://git.io/JzLhV
11:18:56  <TrueBrain> LordAro: specially for you ^^
11:19:17  <Samu> can't overbuild canal on canal, oh well... at least the error message makes sense now
11:19:27  <TrueBrain> Samu: make it into more than one if statement ;)
11:20:31  <TrueBrain> and why no river check?
11:20:49  <Samu> let me test
11:21:17  <TrueBrain> and you are missing some (), and the ||  will act weird here :P
11:21:21  <TrueBrain> it might not be doing what you think it does :)
11:22:09  <Samu> can build river on canal and on sea
11:22:12  <Samu> with no error
11:22:38  <TrueBrain> yeah, this if-statement does the reverse :)
11:22:46  <TrueBrain> it is trying to prevent building river on river
11:22:48  <TrueBrain> sea on sea
11:22:50  <TrueBrain> canal on canal
11:22:53  <Samu> but i may need a canal of some owner other than none
11:22:59  <TrueBrain> but the first 2 give the wrong error, and can only be done in SE, so .. who cares really
11:23:27  <TrueBrain> so one can argue, that it should only check for canal on canal, of which the owner is not from SE :)
11:24:19  <andythenorth> ok so my PR needs to reset the new var 4E if a train consist is rearranged
11:24:27  <andythenorth> can't find a method for that yet
11:24:53  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #9410: Fix: Inconsistent error message when overbuilding canal on a lock/ship depot tile https://git.io/JcgTi
11:25:11  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #9521: [Bug]: on a multidock station, if i remove one of the docks while there's a ship loading/unloading, it still continues to load/unload https://git.io/JE6tY
11:25:14  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #9524: Fix #9521: Don't load at just removed docks that were part of a multi-dock station https://git.io/JEMNJ
11:25:24  <andythenorth> maybe CmdMoveRailVehicle ?
11:26:19  <andythenorth> hmm this PR is not ready :P
11:26:30  * andythenorth wandered out of depth
11:26:45  <andythenorth> lifeguard?
11:27:11  <TrueBrain> meh; would have been nice if it could be included in 12.0
11:27:20  <TrueBrain> but .. yeah .. I wouldn't even know where to start to help out :)
11:29:33  <andythenorth> it just needs to update the var in 2 places
11:29:58  <andythenorth> maybe 1 place only
11:30:11  <andythenorth> and I don't know what the constant INVALID_DATE resolves to
11:30:25  <Samu> okay, with a canal owned by a company, when I overbuild a sea on the canal, that 'if check' will trigger "continue"
11:30:33  <andythenorth> does it resolve to -1 and get yielded to newgrf
11:30:41  <Samu> but will still error out with already built
11:30:57  <Samu> so a sea isn't placed anyway which is what worried me
11:31:10  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9024: Change: switch game playing in the menu based on selected landscape https://git.io/Jztvm
11:31:13  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed pull request #9024: Change: switch game playing in the menu based on selected landscape https://git.io/JOI9I
11:34:47  <TrueBrain> I think if my PRs are reviewed, I fixed all the 12.0 milestone thingies .. but hard to tell in the GitHub interface :(
11:34:53  <TrueBrain> I want GitHub Issues!!
11:40:25  * andythenorth has issues
11:53:19  <TrueBrain> I just don't like that these things run in private betas :P I understand it .. I just don't like it :D
12:11:53  *** glx has joined #openttd
12:11:53  *** ChanServ sets mode: +v glx
12:12:52  *** tokai|noir has joined #openttd
12:12:52  *** ChanServ sets mode: +v tokai|noir
12:19:48  * andythenorth doesn't like hard to diagnose bugs that only show up about 30% of the time the compile runs :(
12:19:50  *** tokai has quit IRC
12:20:06  <andythenorth> and only in a multiprocessing pool :P
12:20:43  <andythenorth> I've bisected to I think reliable failing commit
12:20:46  <andythenorth> but it's a big commit :P
12:20:47  <andythenorth> https://github.com/andythenorth/iron-horse/commit/7c12699b6796bbad92dcac6454b65f2a774e6c98
12:21:18  <andythenorth> this code is endless abstracted sets and lists to configure a sprite drawing pipeline :D
12:21:30  * andythenorth had better have lunch eh
12:31:16  <DorpsGek> [OpenTTD/nml] 2TallTyler opened issue #238: NMLC error from Produce block incorrectly refers to switch-block https://git.io/Jzt3q
12:37:37  <andythenorth> bingo
12:37:50  * andythenorth had inspiration while cooking pasta sauce
12:38:05  <andythenorth> some files are being written twice, in separate threads
12:38:22  <andythenorth> these are temp files which get deleted after a file_cmp
12:38:38  <andythenorth> but the file_cmp fails the second time because the file is missing due to the other thread removing it
12:48:39  <andythenorth> multiprocessing: now you have n problems
12:52:49  <Samu> weird, openttd 12.0-beta2 doesn't run, only shows me a black window
12:53:14  <Samu> all of a sudden
12:54:26  <Samu> i closed debug mode in visual studio and now it runs, that's really strange, why would that matter?
12:54:36  <Samu> it's a standalone copy
13:02:36  <DorpsGek> [OpenTTD/OpenTTD] RailwAI commented on issue #8048: Path is not released, after it was reserved through another train causing a crash https://git.io/JvQtG
13:17:23  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JztRS
13:27:47  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain reopened issue #8048: Path is not released, after it was reserved through another train causing a crash https://git.io/JvQtG
13:28:42  <TrueBrain> Samu: if you would read the motivation of #9560, would you understand what your PR is fixing?
13:28:48  *** sla_ro|master has quit IRC
13:29:04  <TrueBrain> please remember we don't have mind-read devices ;)
13:29:48  * andythenorth has pinned down a list full of duplicates
13:29:51  <andythenorth> but not....why :P
13:30:08  <andythenorth> I could just call set() on it, but I don't like that sort of hammer
13:30:18  <TrueBrain> Samu: you don't write what you expect, why you think it is wrong, what you think is right .. you just list a bunch of lines, without any context. Please don't do this to us :(
13:30:20  <andythenorth> why not find what the root cause is and fix that?
13:30:25  <andythenorth> hmm
13:30:43  <Samu> give me a min, I'm still thinking
13:31:16  <TrueBrain> do that kind of thinking before opening the PR :P
13:31:33  <Samu> i think line 486 is unreachable
13:31:35  <TrueBrain> before you hit that "Create Pullrequest" button, take a step back and wonder: if someone had no knowledge of what I just did .. what does he need to know to understand it?
13:32:45  <dP> #8048 is kind of a user error, even if game somehow fixed reservations after rail building it would basically remove crashes when using pbs
13:32:53  <dP> though I personally would prefer it that way
13:35:25  <dP> well, I guess there are two somewhat separate issues here, updating paths and reservations on network change and going past reserved track
13:38:01  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #8048: Path is not released, after it was reserved through another train causing a crash https://git.io/JvQtG
13:42:50  <dP> would be nice to have as an option imo, would make changing busy networks more manageable
13:43:06  <dP> right now it's sometimes easier to just nuke it all and build anew
13:48:20  <Samu> wow, i think I did it! a much simpler fix, one does it all:
13:49:10  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JztRS
13:52:17  <Samu> "Can't build water of water" is a bit confusing
13:52:25  <Samu> doesn't seem to be it
13:52:58  <TrueBrain> also, first checking if the owner is one thing, next checking if the owner is not something else .. is a bit redundant
13:53:09  <TrueBrain> "Are you Samu? Are you not TrueBrain?"
13:53:14  <TrueBrain> I mean .. ;)
13:53:40  <Samu> are you the owner but not OWNER_NONE
13:54:03  <Samu> in editor you're owner_none
13:54:08  <TrueBrain> so check for that ;)
13:54:18  <Samu> that's what it is doing
13:54:27  <TrueBrain> no, you are checking if the TILE is owned by OWNER_NONE
13:55:06  <Samu> ... but... it works! :p
13:55:16  <TrueBrain> yeah .. which is a common theme with your PRs :)
13:55:30  <TrueBrain> but just because it works, doesn't mean anyone understand what it is doing ;)
13:55:57  <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #9557: Fix: Prevent train reversing when wholly inside a train depot https://git.io/Jztrh
13:56:27  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #9520: [Bug]: Wrong unreservation behaviour when reversing a train inside a depot when an incoming reservation exists https://git.io/JErKD
13:56:30  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #9557: Fix: Prevent train reversing when wholly inside a train depot https://git.io/JzL20
13:57:29  <Samu> like this? if (water && IsCanal(current_tile) && IsTileOwner(current_tile, _current_company) && !Company::IsValidID(_current_company))
13:57:52  <Samu> nop, im confused now
13:58:14  <TrueBrain> at least the idea behind that line is an improvement; now to figure out how to do it right :D
13:58:22  <TrueBrain> but with a line like that, the intention becomes much more clear
13:58:26  <TrueBrain> more natural to read for others
13:59:22  <TrueBrain> either way, maybe circle back to what you are actually trying to fix. As I think you mostly confuse yourself with approaching this from the error messages
13:59:34  <TrueBrain> without that "if" statement, the only thing that "breaks" is that you can build a canal on your own canal
13:59:42  <TrueBrain> all other scenarios are as they should, right?
13:59:44  <DorpsGek> [OpenTTD/OpenTTD] michicc commented on issue #8048: Path is not released, after it was reserved through another train causing a crash https://git.io/JvQtG
13:59:55  <TrueBrain> sea on sea, only a SE thingy, doesn't need an error
14:00:14  <Samu> i want to be able to overbuild a canal on a canal if i am in the scenario editor only, if i'm not, then i want the already built error to show up
14:00:36  <TrueBrain> what about a canal build in SE, can you build over that in-game?
14:01:14  <Samu> oh, good question, gotta test
14:01:22  <TrueBrain> no, what do you expect ;)
14:01:35  <TrueBrain> basically, the landscape clear function just below this if, captures most issues
14:01:42  <Samu> no idea, gonna test
14:02:00  <Samu> oh snap, it overbuilds
14:02:01  <TrueBrain> you cannot test what you expect :)
14:02:06  <TrueBrain> you can only test what you implemented :P
14:02:49  <TrueBrain> but again, take a step back, as you are really just changing random lines in the hope it works :) That is not a good approach to fix any bug
14:03:01  <TrueBrain> the landscape clear call, ensures that it is not a canal of another company, for example
14:03:06  <TrueBrain> it will simply refuse that
14:03:21  <TrueBrain> so what case is that "if" really trying to cover? and for what reason?
14:04:02  <TrueBrain> from what I understand, there really is only one case: if you try to build a canal over your own canal, it should refuse that. But the landscape clear will allow it, as .. yeah, feel free to destroy your own canal
14:04:15  <TrueBrain> so the only case we need to address, is when you try to build a canal over your own canal
14:13:13  <Samu> the canal is OWNER_NONE, I am a company, i can overbuild that canal and pay £3750 :(
14:13:27  <TrueBrain> sounds legit :)
14:13:47  <TrueBrain> do keep the perspective of: how often is this going to happen?
14:14:06  <Samu> when a company bankrupts
14:14:57  <TrueBrain> and if you consider it worth-your-time to fix, consider if it is related to the issue you are already fixing
14:25:48  <DorpsGek> [OpenTTD/OpenTTD] randstring opened issue #9561: [Crash]: Game crashed on switching windows with Alt-Tab https://git.io/Jzt12
14:32:35  *** virtualrandomnumber has joined #openttd
14:33:57  *** virtualrandomnumber has quit IRC
14:45:19  <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #9559: Fix #9484: update locale currencies settings mapping https://git.io/JztS9
14:52:26  <Samu> damn it, i did it! yeah!!
14:52:34  <Samu> took me a while to figure out
14:58:58  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JztRS
14:59:34  <andythenorth> hmm I have 'fixed' my compile problem
14:59:41  <andythenorth> but the fix is not making any sense
14:59:51  <andythenorth> I've just inserted `break` to a loop :P
14:59:58  * andythenorth distrusts
15:00:32  <andythenorth> oh I see
15:00:36  <andythenorth> I've changed a reference
15:00:46  <andythenorth> so the loop referent object is changed
15:00:47  <andythenorth> lol
15:00:57  <andythenorth> the break stops the loop, so the problem is now masked
15:00:59  <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on discussion #9551: Vehicle orders GUI: Learning from other games https://git.io/JuKCH
15:02:48  *** jottyfan has joined #openttd
15:04:19  <andythenorth> yeah fuck this conditional crap
15:14:12  *** jottyfan has quit IRC
15:18:35  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JztAq
15:23:56  <Samu> still unsure what to make of this comment /* can't make water of water! */
15:24:28  <Samu> but whatever, code wise it now does what I want
15:24:35  *** jottyfan has joined #openttd
15:25:24  <Samu> I'm not good at describing things
15:34:01  *** jottyfan has quit IRC
15:38:27  *** Wormnest has joined #openttd
16:04:20  <DorpsGek> [OpenTTD/nml] glx22 commented on issue #238: NMLC error from Produce block incorrectly refers to switch-block https://git.io/Jzt3q
16:08:50  <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on discussion #9551: Vehicle orders GUI: Learning from other games https://git.io/JuKCH
16:51:46  <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #9556: Fix: add back 'Spectate' option to company toolbar menu https://git.io/JzqmA
16:52:01  <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #9558: Add: [Network] On join, log the ClientID + IP + Name clearly https://git.io/Jzqmj
17:00:45  *** sla_ro|master has joined #openttd
17:13:18  *** Wormnest has quit IRC
17:27:30  *** WormnestAndroid has quit IRC
17:28:05  *** WormnestAndroid has joined #openttd
17:54:29  *** Wormnest has joined #openttd
17:58:15  *** jottyfan has joined #openttd
17:59:53  *** jottyfan has quit IRC
18:28:00  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #9556: Fix: add back 'Spectate' option to company toolbar menu https://git.io/Ju5HF
18:28:03  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed pull request #9532: Change: Return 'New company/Spectate' option to company toolbar menu https://git.io/JEpP6
18:28:19  <TrueBrain> < 60 open PRs :o
18:30:05  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9559: Fix #9484: update locale currencies settings mapping https://git.io/JzqRj
18:32:45  *** Flygon has quit IRC
18:33:32  <TrueBrain> lol, had to make it a constexpr, but static_assert works :D
18:37:10  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #9559: Fix #9484: update locale currencies settings mapping https://git.io/JzLhV
18:38:29  <TrueBrain> Samu: "bad in explaining" is not an excuse to not even try ;)
18:38:33  <TrueBrain> in fact, this is pretty much worse
18:38:38  <TrueBrain> as now we are left to guess what you intended to do :)
18:39:18  <TrueBrain> IsTileOwner vs GetTileOwner without a clear reason why, for example
18:39:43  <TrueBrain> why do you now disallow building canals over canals created in SE .. no clue
18:39:46  <TrueBrain> it just .. is :P
18:40:14  <TrueBrain> so yeah, please don't make us to all the work you should be doing, just because "I'm not good at describing things"
18:40:18  <TrueBrain> to = do
18:40:51  <Samu> hi
18:42:05  <Samu> Company::IsValidID(_current_company) is only valid when in-game, not in the editor
18:43:17  <TrueBrain> I will leave my questions in the PR, as I have 7 :P
18:43:24  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JzqE9
18:44:08  <TrueBrain> this is where comments in code are for, to explain these complex and hard to decipher if-statements :)
18:46:05  <TrueBrain> also something to think about: why IsValidID, and not _game_mode != GM_EDITOR as a few lines above? I do not know the answers, I just have these questions :)
18:47:01  <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/Jzqun
18:47:02  <DorpsGek>   - Update: Translations from eints (by translators)
18:47:03  *** Wormnest has quit IRC
18:48:23  <TrueBrain> okay, not being able to build over SE-created canals is just weird
18:48:25  <TrueBrain> as I can demolish it
18:48:27  <TrueBrain> and build it after
18:48:31  <TrueBrain> so that makes very little sense to me
18:50:21  <Samu> that is so to avoid paying the price
18:50:35  <TrueBrain> ?!
18:50:45  <Samu> it is already canal
18:51:19  <TrueBrain> you say words, but I cannot place it in context, sorry :(
18:51:34  <Samu> ok will try to answer the questions
18:51:39  <Samu> in a reply
18:51:52  <TrueBrain> most of these questions have to be answered in code ;)
18:52:18  <TrueBrain> but my problem with the PR, if I understand it correctly: Make scenario, place canals, save scenario, load scenario, build canal over existing canal: not allowed. Demolish canal and build, does work.
18:52:20  <TrueBrain> that is just weird
18:52:46  <TrueBrain> I can place a canal over a river, over sea, but not over an SE-build canal? I have to demolish it first? And the error is "there is already a canal here"?
18:52:54  <TrueBrain> might be deliberate, but it feels weird ;)
18:53:39  <TrueBrain> (and if deliberate, the comment should match that, ofc :D)
19:00:51  <TrueBrain> on second thought, I guess that makes canals similar to roads .. meh, I can see why it would be like this. But yeah, document in a comment, and everything will be swell
19:01:05  <TrueBrain> makes me wonder why SE can build canals ..
19:01:21  <TrueBrain> shouldn't they only be able to build rivers? I dunno ..
19:04:37  <dP> why not?
19:13:11  *** Wormnest has joined #openttd
19:15:21  * andythenorth is confused
19:15:25  <andythenorth> what is all the price stuff?
19:23:45  <andythenorth> hmm
19:23:52  <andythenorth> back to fixing my own mistakes
19:24:24  <andythenorth> after not thinking about it for 2 hours, my brain just decided I only need to change about 4 lines of code
19:24:33  <andythenorth> I love it when that happens :P
19:29:36  *** jottyfan has joined #openttd
19:33:15  *** ordenador_ has joined #openttd
19:36:16  <ordenador_> Hi all, whats up? One question: where can i report a crahsing caused by one specific NewGRF? Its not about the NewGRF, since it works for versions previous to 12.0-beta2... I just tested the beta and this NewGRF causes crashing, so i get surprised
19:36:43  <nielsm> on github
19:37:02  <nielsm> a newgrf is not supposed to be able to crash the game, so it is a bug in the game
19:37:07  <TrueBrain> ordenador_: crashes, as in, game crashing etc, please report those here: https://github.com/OpenTTD/OpenTTD/issues/new/choose
19:37:15  <ordenador_> Ok thanks
19:37:55  <ordenador_> Sorry, my nick is Montana, i dont know why it switched to Ordenador. I will report it on github
19:38:06  <ordenador_> Thanks!
19:40:22  *** jottyfan has quit IRC
19:47:08  <Samu> man, im so slow, i can't... explain things clearly
19:50:22  <TrueBrain> the only way to learn is by doing
19:50:32  <TrueBrain> when you stop doing, is the moment you give defeat
19:51:10  * andythenorth confirms
19:52:18  <peter1138> hi
19:52:41  <TrueBrain> hello !
19:53:07  <andythenorth> hello!
19:53:12  <andythenorth> did we have lunch?
19:53:30  <peter1138> hours ago, almost dinner time
19:55:59  * andythenorth eating dinner
20:06:12  *** Wormnest has quit IRC
20:07:46  <andythenorth> rar
20:07:51  <andythenorth> fixed my compile bug
20:07:58  <andythenorth> and uncovered a different bug, and fixed that
20:19:04  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/Jzq1h
20:19:30  <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #9561: [Crash]: Game crashed on switching windows with Alt-Tab https://git.io/Jzt12
20:22:49  <Samu> what to write in the comment
20:23:26  <Samu> Allow overbuilding except in these cases
20:23:57  <Samu> not quite what it does
20:25:06  <Samu> it's some sort of error message redirector
20:27:25  <TrueBrain> In general, if you cannot explain something with a simple comment, it is an indication the code might be too complex / wrong
20:28:58  <Samu> doesn't feel wrong atm
20:29:12  <Samu> something about it is right
20:29:38  <TrueBrain> No doubt
20:31:41  *** ordenador_ has quit IRC
20:34:03  <Samu> 		/* Allow to make water of water, except in these specific situations.
20:34:03  <Samu> 		 * The checks done via CMD_LANDSCAPE_CLEAR can provide better error messages if any. */
20:46:45  *** Wormnest has joined #openttd
20:57:36  <DorpsGek> [OpenTTD/OpenTTD] RIS2000 commented on issue #8498: Add some way to find and recover crashed vehicles https://git.io/JLbdS
20:59:31  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9560: Fix: Incorrect error messages on placing water on scenario editor https://git.io/JztRS
20:59:34  <andythenorth> oof
20:59:44  <andythenorth> 8498 makes me want to quit
20:59:47  <andythenorth> lol
20:59:50  <andythenorth> so irrational
21:03:53  <FLHerne> That seems extreme
21:04:39  <FLHerne> I don't understand why they want that, but what's offputting about it?
21:05:09  <FLHerne> It's just another weird feature request that fits one person's workflow
21:20:59  <Samu> gotta go sleep. Something tells me tomorrow my PR is probably rejected. :|
21:21:10  <Samu> cyas
21:23:55  *** andythenorth has quit IRC
21:29:11  *** Samu has quit IRC
21:30:58  *** Strom has quit IRC
21:32:41  *** Strom has joined #openttd
21:35:43  *** Strom has quit IRC
21:37:21  *** Strom has joined #openttd
21:42:19  *** sla_ro|master has quit IRC
21:49:33  *** WormnestAndroid has quit IRC
21:49:49  *** WormnestAndroid has joined #openttd
22:05:50  *** nielsm has quit IRC
22:09:39  *** Strom has quit IRC
22:10:59  *** _aD has joined #openttd
22:16:01  *** Gustavo6046 has quit IRC
22:16:52  *** Gustavo6046 has joined #openttd
22:24:35  *** Strom has joined #openttd
22:48:53  *** Gustavo6046 has quit IRC
22:51:07  *** Gustavo6046 has joined #openttd
23:13:54  <DorpsGek> [OpenTTD/nml] glx22 opened pull request #239: Fix: example_train grf triggering an error message in OpenTTD https://git.io/JzmU1
23:32:33  *** Gustavo6046_ has joined #openttd
23:37:08  *** Gustavo6046 has quit IRC
23:37:09  *** Gustavo6046_ is now known as Gustavo6046
23:46:45  *** Progman has quit IRC

Powered by YARRSTE version: svn-trunk