- Use tabs for indentation.
This folder contains a collection of mods with the main goal of providing an API
This mod adds a 'Settings' tab to the player's inventory. Mods can use the ctf_settings API to add buttons/fields to the Settings tab that can be used to customize the mod's functionality per-player.
name
string: Name of setting to registerdef
table: Setting properties, see below
ctf_settings.register("my_setting", {
type = "bool" || "list",
label = "Setting name/label", -- not used for list
description = "Text in tooltip",
list = {i1, i2, i3, i4}, -- used for list, remember to formspec escape contents
default = "default value/index",
on_change = function(player, new_value)
<...>
end
})
player
PlayerObj: The player whos setting you want to setsettings
string: The name of the setting you want to setvalue
(bool | list index) as string: The value you want to set, dependent on what the setting's type is
player
PlayerObj: The player whos setting you want to getsetting
string: The name of the setting you want to get
- returns (bool | list index) as string: Returns the player's current setting value, the default given at setting registration, or if both are unset, an empty string:
""
TODO, below is a collection of quick notes for later
TODO
TODO
TODO