Struc is currently very hard to interact with through PRPL. I propose:
GetStruc # [ X Y Enemy - Type Grown ]
SetStruc # [ X Y Enemy Type Grown - ]
With a possible option on:
SetStrucBulk # [ X Y Enemy Type Grown Radius Square - ]
Type: 0 for none, 1 for normal, 2 for armour.
Note:
I make "Enemy" a parameter to GetStruc in order to handle a case I have seen where there was both red and blue Struc built on the same cell (due to manual editing).
Slipped these in for the beta going out later today.
There are four APIs, and one more argument is required on the set.
SetStruc(int x, int y, bool enemy, int type, bool built)
SetStrucBulk(int x, int y, bool enemy, int type, bool built, int range, bool square)
bool GetStruc(int x, int y, bool enemy)
bool GetStrucBuilt(int x, int y, bool enemy)
The last argument on SetStruc says whether to set the struc to be already built or not.
Your "Built" seems to be my "Grown". Thank you.