|
ClassicCityBuilderKit 1.9.4
|
item container that combines different ItemStorages that are each meant for one specific item
used in the ProductionComponent where storage is split between different producers and consumers
Public Member Functions | |
| SplitItemContainer (IEnumerable< ItemStorage > storages, Func< Item, ItemStorage > itemStorageGetter) | |
| void | ReserveCapacity (Item item, int amount) |
| void | UnreserveCapacity (Item item, int amount) |
| void | ReserveQuantity (Item item, int amount) |
| void | UnreserveQuantity (Item item, int amount) |
| IEnumerable< Item > | GetItems () |
| IEnumerable< ItemQuantity > | GetItemQuantities () |
| int | GetItemQuantity () |
| int | GetItemQuantity (Item item) |
| int | GetItemQuantity (ItemCategory itemCategory) |
| int | GetItemCapacity () |
| int | GetItemCapacity (Item item) |
| int | GetItemCapacity (ItemCategory itemCategory) |
| int | GetItemCapacityRemaining () |
| int | GetItemCapacityRemaining (Item item) |
| int | GetItemCapacityRemaining (ItemCategory itemCategory) |
| int | AddItems (Item item, int quantity) |
| adds items to that storage up to its capacity, remaining quantity is returned (adding 10 items to a storage that can only fit 4 more will return 6) | |
| int | RemoveItems (Item item, int quantity) |
| removes items from storage and returns the remaining quantity if not enough items were present (removing 4 items from a store that contains only 3 will return 1) | |
| int CityBuilderCore.SplitItemContainer.AddItems | ( | Item | item, |
| int | quantity ) |
adds items to that storage up to its capacity, remaining quantity is returned
(adding 10 items to a storage that can only fit 4 more will return 6)
| item | the item to add |
| quantity | maximum quantity to add |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacity | ( | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacity | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacity | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacityRemaining | ( | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacityRemaining | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemCapacityRemaining | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
| IEnumerable< ItemQuantity > CityBuilderCore.SplitItemContainer.GetItemQuantities | ( | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemQuantity | ( | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemQuantity | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.GetItemQuantity | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
| IEnumerable< Item > CityBuilderCore.SplitItemContainer.GetItems | ( | ) |
Implements CityBuilderCore.IItemContainer.
| int CityBuilderCore.SplitItemContainer.RemoveItems | ( | Item | item, |
| int | quantity ) |
removes items from storage and returns the remaining quantity if not enough items were present
(removing 4 items from a store that contains only 3 will return 1)
| item | the item to remove |
| quantity | the maximum quantity to remove |
Implements CityBuilderCore.IItemContainer.
| void CityBuilderCore.SplitItemContainer.ReserveCapacity | ( | Item | item, |
| int | amount ) |
Implements CityBuilderCore.IItemContainer.
| void CityBuilderCore.SplitItemContainer.ReserveQuantity | ( | Item | item, |
| int | amount ) |
Implements CityBuilderCore.IItemContainer.
| void CityBuilderCore.SplitItemContainer.UnreserveCapacity | ( | Item | item, |
| int | amount ) |
Implements CityBuilderCore.IItemContainer.
| void CityBuilderCore.SplitItemContainer.UnreserveQuantity | ( | Item | item, |
| int | amount ) |
Implements CityBuilderCore.IItemContainer.