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