public override void GetUsedAsMaterial() { if (!IsBeingCarried) throw new InvalidOperationException("Isn't being carried right now."); carryingPerson = null; intendedCollector = null; this.currentState = CarryableState.LOCKED_AS_MATERIAL; }
public override void GetPickedUp(InWorldObject picker) { if (!CanBePickedUp) throw new InvalidOperationException("Can't be picked up right now."); this.currentState = CarryableState.CARRIED; carryingPerson = picker; if (IsInStockpile) { Point coord = SquareCoordinate; int x = coord.X; int y = coord.Y; currentStockpile.RemoveObject(x, y, this); currentStockpile = null; } }
public override void GetPutInStockpile(Building stockpile) { if (!IsBeingCarried) throw new InvalidOperationException("Isn't being carried right now."); carryingPerson = null; intendedCollector = null; currentStockpile = stockpile; this.currentState = CarryableState.IN_STOCKPILE; }
public override void Drop() { if (!IsBeingCarried) throw new InvalidOperationException("Isn't being carried right now."); carryingPerson = null; intendedCollector = null; currentState = CarryableState.LOOSE; }