ClassicCityBuilderKit 1.8.8
|
building component that needs to be supplied with items by others(eg production buildings that get supplied by storage)
Public Member Functions | |
IEnumerable< Item > | GetReceiveItems () |
returns the kinds of items the receiver needs | |
int | GetReceiveCapacity (Item item) |
how much of the item the receiver can still fit | |
void | ReserveCapacity (Item item, int quantity) |
reserves a capacity in the receiver so it is not filled up by someone else | |
void | UnreserveCapacity (Item item, int quantity) |
releases capacity that was earlier reserved by ReserveCapacity(Item, int) call before actually moving items into the receiver or if the delivery was somehow interrupted | |
int | Receive (ItemStorage storage, Item item, int quantity) |
requests that a quantity of items is moved from the storage to the receiver if the full amount does not fit the remaining quantity is returned | |
Properties | |
int | Priority [get] |
can be used so certain receivers are preferred over others for example construction sites or production may be more important that putting items into storage | |
Properties inherited from CityBuilderCore.IBuildingTrait< IItemReceiver > | |
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.IItemReceiver.GetReceiveCapacity | ( | Item | item | ) |
how much of the item the receiver can still fit
item |
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.
IEnumerable< Item > CityBuilderCore.IItemReceiver.GetReceiveItems | ( | ) |
returns the kinds of items the receiver needs
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.
int CityBuilderCore.IItemReceiver.Receive | ( | ItemStorage | storage, |
Item | item, | ||
int | quantity ) |
requests that a quantity of items is moved from the storage to the receiver
if the full amount does not fit the remaining quantity is returned
storage | the storage that items will be taken from |
item | the item to receive |
quantity | the maximum quantity of items to receive |
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.
void CityBuilderCore.IItemReceiver.ReserveCapacity | ( | Item | item, |
int | quantity ) |
reserves a capacity in the receiver so it is not filled up by someone else
item | the item to be reserved |
quantity | the quantity to reserve |
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.
void CityBuilderCore.IItemReceiver.UnreserveCapacity | ( | Item | item, |
int | quantity ) |
releases capacity that was earlier reserved by ReserveCapacity(Item, int)
call before actually moving items into the receiver or if the delivery was somehow interrupted
item | item to unreserve |
quantity | quantity to unreserve |
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.
|
get |
can be used so certain receivers are preferred over others
for example construction sites or production may be more important that putting items into storage
Implemented in CityBuilderCore.ItemEfficiencyComponent, CityBuilderCore.ProductionComponent, CityBuilderCore.StorageComponent, CityBuilderCore.VariantProductionComponent, CityBuilderTown.ItemConstructionComponent, CityBuilderTown.TownConstructionComponent, and CityBuilderTown.TownMarketComponent.