Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        public override void Drop()
        {
            if (!IsBeingCarried)
                throw new InvalidOperationException("Isn't being carried right now.");

            carryingPerson = null;
            intendedCollector = null;

            currentState = CarryableState.LOOSE;
        }