Gears
API ReferenceSettings.World

IWorldModSettingsCategory

A category of world settings. Like its global counterpart, itself a setting.

InterfaceNamespace GearsAPI.Settings.WorldAssembly GearsAPI.dllSource
public interface IWorldModSettingsCategory : IWorldModSetting

A category of world settings. Like its global counterpart, a category is itself a setting.

Implements: IWorldModSetting · IModSetting

Methods

GetSetting(String)

IWorldModSetting GetSetting(string name);

Returns the IWorldModSetting named name, or null.

GetSetting<T>(String)

T GetSetting<T>(string name) where T : class, IWorldModSetting;

Returns the setting named name as T, or null if there is none or it is not a T. T must be a class implementing IWorldModSetting.

CreateSetting<T>(String, String)

T CreateSetting<T>(string name, string displayKey) where T : class, IWorldModSetting;

Creates a setting of interface T. Same exceptions as the global version. Setting names must be unique across all of the mod's world categories, because saved world values are looked up by name alone.

GetOrCreateSetting<T>(String, String)

T GetOrCreateSetting<T>(string name, string displayName) where T : class, IWorldModSetting;

Returns the existing setting as T, or creates it.

AddSetting(IWorldModSetting)

bool AddSetting(IWorldModSetting setting);

Adds an existing setting object. Returns false if the name is taken.

RemoveSetting(String)

bool RemoveSetting(string settingName);

Removes the setting with that name.

RemoveSetting(IWorldModSetting)

bool RemoveSetting(IWorldModSetting setting);

Removes that setting.

GetAllSettings()

List<IWorldModSetting> GetAllSettings();

Returns the category itself followed by its settings, as a List<IWorldModSetting>.

On this page