Table of Contents
Base class for a ModSetting without the generics
public abstract class ModSetting
Inheritance System.Object ModSetting
Derived
↳ ModSetting<T>
↳ ModSettingButton
The category that this is part of, or null
public ModSettingCategory category;
The description / explanation of this mod setting
public string description;
The exact name displayed for this mod setting. If unset, will use the variable name.
public string displayName;
Icon to display alongside the setting
public string icon;
Action to modify the ModHelperOption after it's created
public Action<ModHelperOption> modifyOption;
System.Action<ModHelperOption>
Indicates to players that the effects of changing this setting will only take place after a restart
public bool requiresRestart;
The type where this ModSettings was defined
public IModSettings source;
The name of this mod setting, gotten from the field name
public string Name { get; set; }
Creates a base ModHelperOption component based on the name, description and icon of this
protected BTD_Mod_Helper.Api.Components.ModHelperOption CreateBaseOption();
Gets the default value for this ModSetting
public virtual object GetDefaultValue();
System.Object
The default value
Gets the last saved value for this ModSetting
public virtual object GetLastSavedValue();
System.Object
The last saved value
Gets the current value that this ModSetting holds
public virtual object GetValue();
System.Object
The value
Sets the current value of this ModSetting
public virtual void SetValue(object val);
val
System.Object
The new value