Esempio 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;
        }
Esempio 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;
            }
        }
Esempio 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;
        }
Esempio 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;
        }