Ejemplo n.º 1
0
 public void GatherImmediately(GameComponent item, Inventory.RestockType restockType = Inventory.RestockType.None)
 {
     if (item is CoinPile coins)
     {
         Faction.AddMoney(coins.Money);
         item.Die();
     }
     else
     {
         Inventory.Pickup(item, restockType);
     }
 }
Ejemplo n.º 2
0
        public void GatherImmediately(Body item, Inventory.RestockType restockType = Inventory.RestockType.None)
        {
            if (item is CoinPile)
            {
                var money = (item as CoinPile).Money;
                AI.AddMoney(money);
                item.Die();

                AI.GatherManager.StockMoneyOrders.Add(new GatherManager.StockMoneyOrder()
                {
                    Destination = null,
                    Money       = money
                });
            }
            else
            {
                Inventory.Pickup(item, restockType);
            }
        }