add Building.Locked, and Lock()/Unlock() conveniences

This commit is contained in:
Chris Forbes
2012-09-13 06:37:16 +12:00
parent fb58840cea
commit f984934270

View File

@@ -73,6 +73,17 @@ namespace OpenRA.Mods.RA.Buildings
PowerManager PlayerPower;
PPos pxPosition;
[Sync] public bool Locked; /* shared activity lock: undeploy, sell, capture, etc */
public bool Lock()
{
if (Locked) return false;
Locked = true;
return true;
}
public void Unlock() { Locked = false; }
public CPos TopLeft { get { return topLeft; } }
public PPos PxPosition { get { return pxPosition; } }