public void leaveManagement() { if (originalCurrentInventory != null) { Player.mainParty.inventory = new List <Item>(originalCurrentInventory); originalCurrentInventory.Clear(); } if (managementMode == InventoryManagementMode.shopping) { if (tradingParty != null) { tradingParty.inventory = new List <Item>(originalSelectingInventory); } if (storingCity != null) { storingCity.warehouse = new List <Item>(originalSelectingInventory); } } else { if (storingCity != null) { storingCity.warehouse = new List <Item>(originalSelectingInventory); } } originalSelectingInventory.Clear(); managementMode = InventoryManagementMode.dropping; clearCurrent(); clearSelecting(); //originalSelectingInventory.Clear(); }
public void inputShopSetting(City city, int shopCashI) { storingCity = city; originalSelectingInventory = new List <Item>(city.warehouse); shopCash = shopCashI; managementMode = InventoryManagementMode.shopping; initialization(); }
public void inputShopSetting(Party party, int shopCashI) { tradingParty = party; originalSelectingInventory = new List <Item>(tradingParty.inventory); shopCash = shopCashI; managementMode = InventoryManagementMode.shopping; initialization(); }
void selectingToCurrent(List <Item> toMove, int amount, InventoryManagementMode mode) { if (toMove != null) { for (int i = 0; i < amount; i++) { originalCurrentInventory.Add(toMove[i]); originalSelectingInventory.Remove(toMove[i]); if (mode == InventoryManagementMode.shopping) { Player.mainParty.cash -= toMove[i].getBuyingPrice(); shopCash += toMove[i].getBuyingPrice(); } } currentInventory = collapseList(originalCurrentInventory); selectingInventory = collapseList(originalSelectingInventory); curButton = null; showCurrent(); showSelecting(); } }