sm.terrainGeneration

Allows reading and writing in game storage from terrain generation scripts.

Functions:

  • getTempData
  • loadGameStorage
  • saveAndSyncGameStorage
  • saveGameStorage
  • setGameStorageNoSave
  • setTempData

  • sm.terrainGeneration.getTempData(key)

    Loads temporary data stored by terrain generation.

    Parameters:

    TypeNameDescription
    anykeyKey used to lookup the saved data.

    Returns:

    TypeDescription
    anyThe saved data.

    sm.terrainGeneration.loadGameStorage(key)

    Loads data stored by terrain generation.

    Parameters:

    TypeNameDescription
    anykeyKey used to lookup the saved data.

    Returns:

    TypeDescription
    anyThe 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:

    TypeNameDescription
    anykeyKey used to lookup the saved data.
    anydataData 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:

    TypeNameDescription
    anykeyKey used to lookup the saved data.
    anydataData 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:

    TypeNameDescription
    anykeyKey used to lookup the saved data.
    anydataData to save.

    sm.terrainGeneration.setTempData(key, data)

    Sets temporary data produced from terrain generation and synchronizes to clients.

    Parameters:

    TypeNameDescription
    anykeyKey used to lookup the saved data.
    anydataData to save.