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