Skip to main content

GamemodeManager

The GamemodeManager allows addons to access data about the current game, this is to allow components to exhibit certain attributes in different game modes.


Functions

isSurvival

sm.scrapcomputers.gamemodeManager.isSurvival()

Returns true if the game mode is in survival.

Returns:

  • [ boolean ] Whether the gamemode is in survival or not.

isCustomGamemode

sm.scrapcomputers.gamemodeManager.isCustomGamemode()

Returns true if the gamemmode type is a custom game.

Returns:

  • [ boolean ] Whether the gamemode type is a custom game or not.

getCustomGamemodeLocalId

sm.scrapcomputers.gamemodeManager.getCustomGamemodeLocalId()

Returns the local id of the custom game mode (If loaded).

Returns:

  • [ string? ] The custom games local id.