LuaSettings

Object containing mod settings of three distinct types: startup, global, and player. An instance of LuaSettings is available through the global object named settings.

class LuaSettings - sort
get_player_settings(player) → LuaCustomTable[stringModSetting] Gets the current per-player settings for the given player, indexed by prototype name.
startup :: LuaCustomTable[stringModSetting] [R] The startup mod settings, indexed by prototype name.
global :: LuaCustomTable[stringModSetting] [R] The current global mod settings, indexed by prototype name.
player :: LuaCustomTable[stringModSetting] [R] The default player mod settings for this map, indexed by prototype name.
object_name :: string [R] This object's name.
get_player_settings(player) → LuaCustomTable[stringModSetting]

Gets the current per-player settings for the given player, indexed by prototype name. Returns the same structure as LuaPlayer::mod_settings.

Parameters
Note: This can become invalid if during operation if the given player becomes invalid.
startup :: LuaCustomTable[stringModSetting] [Read-only]

The startup mod settings, indexed by prototype name.

global :: LuaCustomTable[stringModSetting] [Read-only]

The current global mod settings, indexed by prototype name.

Even though these are marked as read-only, they can be changed by overwriting individual ModSetting tables in the custom table. Mods can only change their own settings. Using the in-game console, all global settings can be changed.

player :: LuaCustomTable[stringModSetting] [Read-only]

The default player mod settings for this map, indexed by prototype name.

Even though these are marked as read-only, they can be changed by overwriting individual ModSetting tables in the custom table. Mods can only change their own settings. Using the in-game console, all player settings can be changed.

object_name :: string [Read-only]

This object's name.