Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 19 20 [21]

Author Topic: DFHack plugin embark-assistant  (Read 55531 times)

RedDwarfStepper

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #300 on: January 31, 2021, 07:50:49 am »

Yes, you're correct. It should be "adjusted." there as like in all of the surrounding code, so yes please, take care of that one.
Will do.

Personally I find it easier to discuss these issues here.
Fine by me.

I think there is one more or something is off somehow somewhere else:
Please compare this line and this one with this one.
By using the
Code: [Select]
world_tile pointer it also uses x and y instead of "adjusted."
Should I adapt that one as well or is there an underlying reason I don't see?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #301 on: January 31, 2021, 01:21:49 pm »

I don't quite follow what you're after. The two first references seem to be to two different versions of the same code. The is_brook flag check has to be for the current world tile, as that property is independent of the biome, and so cares only for which world tile the tile resides in.

The third reference is to biome related code, and so needs to use adjusted coordinates.

Thus, unless I've missed your point (entirely possible) the code shouldn't be changed.
Logged

RedDwarfStepper

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #302 on: January 31, 2021, 04:16:13 pm »

The is_brook flag check has to be for the current world tile, as that property is independent of the biome, and so cares only for which world tile the tile resides in.
The third reference is to biome related code, and so needs to use adjusted coordinates.
Ah - that was what I meant when I wondered if there is a reason for the difference.
So, just to make sure there is no misunderstanding: To retrieve the proper value for the "is_lake" flag the coordinates have to be "biome adjusted", but for the "is_brook" flag that is not true and the none-adjusted coordinates must be used, yes?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack plugin embark-assistant
« Reply #303 on: February 01, 2021, 03:25:51 am »

Correct.

To be overly explicit (not that I think it's really needed):

- "is_lake" is a biome type property and it's used to determine soil depth, which is also tied to the biome. The biome is tied to a host world tile, which may or may not be the current one.
- "is_brook" applies to all MLTs in the world tile, regardless of whether the biome of those are tied to surrounding world tiles or not (it only has any effect on the MLTs that actually have a watercourse in them, of course). That should mean that any watercourse joining "the official" brook watercourse in that world tile should also be a brook, even if it wasn't upstream, although I haven't investigated if that conclusion is correct.
Logged
Pages: 1 ... 19 20 [21]