[Suggestion] IsLandFullyMired command (or one of these alternatives...)

GoodMorning · 1085

GoodMorning

  • Community Guild
  • *****
    • Posts: 3457
  • (Pusillanimous)
The GrowStruc command has a return value of whether the Struc has expanded or not, which is nice.

However, for a project, I need to be able to tell if I should have recorded part of a mire supply as being used.

I see three alternatives:
  • A return value on MireLand (easy to add).
  • IsLandFullyMired (possibly more efficient, but not necessarily as easy).
  • GetNextMiringLocation, returning -1 -1 for a fully mired landmass (more flexible, and may largely be a matter of copy/paste from MireLand, but may encourage inefficiency in scripts).

Of course, it is technically possible to script this, but as a smaller project has proven (Fog or War), this is ludicrously inefficient.

A narrative is a lightly-marked path to another reality.


knucracker

  • Administrator
  • *****
    • Posts: 11782
I'll add to my short todo list.  One or more of these should be possible, if memory serves.

The game keeps track of every connected land mass (and recalculates them if the terrain changes).  For each land mass, the game knows the total land mass in cells, as well as where all of the edges of existing mire are (and hence the count).  So when a particle hits land it can very quickly know whether it should mire or bounce.  This is important because a lot of particles could be slamming into a lot of land.



GoodMorning

  • Community Guild
  • *****
    • Posts: 3457
  • (Pusillanimous)
Tracking that must be a significant load, though recalculating would be more significant still...

A narrative is a lightly-marked path to another reality.