sm.terrainGeneration
Allows reading and writing in game storage from terrain generation scripts.
Functions
getTempData
sm.terrainGeneration.getTempData( key )
Loads temporary data stored by terrain generation.
Arguments:key
[ any ]: Key used to lookup the saved data.
- [ any ]: The saved data.
loadGameStorage
sm.terrainGeneration.loadGameStorage( key )
Loads data stored by terrain generation.
Arguments:key
[ any ]: Key used to lookup the saved data.
- [ any ]: The saved data.
saveAndSyncGameStorage
sm.terrainGeneration.saveAndSyncGameStorage( key, data )
Saves data produced from terrain generation and synchronizes to clients.
Saved data can be retrieved in later game sessions and by the game lua environment.
key
[ any ]: Key used to lookup and save the data.key
[ any ]: The data to save.
setGameStorageNoSave
sm.terrainGeneration.setGameStorageNoSave( key, data )
Sets data produced from terrain generation and synchronizes to clients.
This data is only valid during the game session.
key
[ any ]: Key used to lookup and save the data.key
[ any ]: The data to save.
setTempData
sm.terrainGeneration.setTempData( key, data )
Sets temporary data produced from terrain generation and synchronizes to clients.
Arguments:key
[ any ]: Key used to lookup and save the data.key
[ any ]: The data to save.