Loading...
Searching...
No Matches
CityBuilderCore.ItemStore Class Reference

Detailed Description

behaviour that does nothing except store items
can be used in ItemStorages with ItemStorageMode.Store to combine storages
for example this can be used to combine the storage across different components of the same building

https://citybuilder.softleitner.com/manual/resources

Inheritance diagram for CityBuilderCore.ItemStore:
CityBuilderCore.IItemOwner CityBuilderCore.ISaveData

Public Member Functions

string SaveData ()
 serializes the objects state(usually to json) and returns it
 
void LoadData (string json)
 deserializes the serialized json data and loads the data as its new state
 

Public Attributes

ItemStorage Storage
 

Properties

IItemContainer ItemContainer [get]
 holds and manages the items for the owner
 
- Properties inherited from CityBuilderCore.IItemOwner

Member Function Documentation

◆ LoadData()

void CityBuilderCore.ItemStore.LoadData ( string json)

deserializes the serialized json data and loads the data as its new state

Parameters
json

Implements CityBuilderCore.ISaveData.

◆ SaveData()

string CityBuilderCore.ItemStore.SaveData ( )

serializes the objects state(usually to json) and returns it

Returns
serialized save data

Implements CityBuilderCore.ISaveData.

Property Documentation

◆ ItemContainer

IItemContainer CityBuilderCore.ItemStore.ItemContainer
get

holds and manages the items for the owner

Implements CityBuilderCore.IItemOwner.