ClassicCityBuilderKit 1.8.8
|
item container that combines different ItemStorages
used in the EvolutionComponent in which storage is split among the different recipients
Public Member Functions | |
MultiItemContainer (IEnumerable< ItemStorage > storages, Func< Item, IEnumerable< ItemStorage > > itemStoragesGetter, Func< ItemCategory, IEnumerable< ItemStorage > > itemCategoryStoragesGetter) | |
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) | |
|
inline |
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.MultiItemContainer.GetItemCapacity | ( | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemCapacity | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemCapacity | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemCapacityRemaining | ( | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemCapacityRemaining | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemCapacityRemaining | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
IEnumerable< ItemQuantity > CityBuilderCore.MultiItemContainer.GetItemQuantities | ( | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemQuantity | ( | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemQuantity | ( | Item | item | ) |
Implements CityBuilderCore.IItemContainer.
int CityBuilderCore.MultiItemContainer.GetItemQuantity | ( | ItemCategory | itemCategory | ) |
Implements CityBuilderCore.IItemContainer.
IEnumerable< Item > CityBuilderCore.MultiItemContainer.GetItems | ( | ) |
Implements CityBuilderCore.IItemContainer.
|
inline |
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.MultiItemContainer.ReserveCapacity | ( | Item | item, |
int | amount ) |
Implements CityBuilderCore.IItemContainer.
void CityBuilderCore.MultiItemContainer.ReserveQuantity | ( | Item | item, |
int | amount ) |
Implements CityBuilderCore.IItemContainer.
void CityBuilderCore.MultiItemContainer.UnreserveCapacity | ( | Item | item, |
int | amount ) |
Implements CityBuilderCore.IItemContainer.
void CityBuilderCore.MultiItemContainer.UnreserveQuantity | ( | Item | item, |
int | amount ) |
Implements CityBuilderCore.IItemContainer.