|
ClassicCityBuilderKit 1.9.4
|
building component that provides others with items
Public Member Functions | |
| int | GetGiveQuantity (Item item) |
| checks how much of an item is available to be given | |
| void | ReserveQuantity (Item item, int quantity) |
| reserves a quantity of items that may later be given dont reverse more than is available(GetGiveQuantity(Item)) | |
| void | UnreserveQuantity (Item item, int quantity) |
| releases a quantity that was reserved by ReserveQuantity(Item, int) before should be called before acutally moving items with Give(ItemStorage, Item, int) or if the process was interrupted | |
| int | Give (ItemStorage storage, Item item, int quantity) |
| requests that a quantity of items is put into the specified storage if the full amount is not available the remaining quantity is returned | |
Additional Inherited Members | |
Properties inherited from CityBuilderCore.IBuildingTrait< IItemGiver > | |
| BuildingComponentReference< T > | Reference [get, set] |
| reference to the building trait, use when the building might be replaced and when the reference has to be saved | |
Properties inherited from CityBuilderCore.IItemOwner | |
| IItemContainer | ItemContainer [get] |
| holds and manages the items for the owner | |
| int CityBuilderCore.IItemGiver.GetGiveQuantity | ( | Item | item | ) |
checks how much of an item is available to be given
| item | the wanted item |
Implemented in CityBuilderCore.CollectionComponent, and CityBuilderCore.StorageComponent.
| int CityBuilderCore.IItemGiver.Give | ( | ItemStorage | storage, |
| Item | item, | ||
| int | quantity ) |
requests that a quantity of items is put into the specified storage
if the full amount is not available the remaining quantity is returned
| storage | the storage the items will be added to |
| item | the item to give |
| quantity | the desired quantity |
Implemented in CityBuilderCore.CollectionComponent, and CityBuilderCore.StorageComponent.
| void CityBuilderCore.IItemGiver.ReserveQuantity | ( | Item | item, |
| int | quantity ) |
reserves a quantity of items that may later be given
dont reverse more than is available(GetGiveQuantity(Item))
| item | wanted item |
| quantity | quantity of the item |
Implemented in CityBuilderCore.CollectionComponent, and CityBuilderCore.StorageComponent.
| void CityBuilderCore.IItemGiver.UnreserveQuantity | ( | Item | item, |
| int | quantity ) |
releases a quantity that was reserved by ReserveQuantity(Item, int) before
should be called before acutally moving items with Give(ItemStorage, Item, int) or if the process was interrupted
| item | |
| quantity |
Implemented in CityBuilderCore.CollectionComponent, and CityBuilderCore.StorageComponent.