public void RemoveCommodity(Type type, int amount) { if (CommodityTypes.ContainsKey(type)) { CommodityTypes[type] -= amount; if (CommodityTypes[type] <= 0) { CommodityTypes.Remove(type); } } }