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

Started by GoodMorning, November 22, 2016, 01:48:11 AM

Previous topic - Next topic

GoodMorning

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

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

Tracking that must be a significant load, though recalculating would be more significant still...
A narrative is a lightly-marked path to another reality.