API ReferenceSettings.World
ISelectorWorldSetting<T>
A world setting chosen from a list of allowed values.
public interface ISelectorWorldSetting<T> : IWorldModSetting, IValueModSetting<T>, ISelectorSettingBaseA world setting chosen from a list of allowed values. Implemented for int, float, string and any enum. Raises OnSelectedChanged only; there is no OnValueChanged on world settings.
Type parameters: T — int, float, string or an enum.
Implements: IWorldModSetting · IValueModSetting<T> · ISelectorSettingBase · IModSetting · IValueModSettingBase
Methods
SetAllowedValues(T[])
void SetAllowedValues(T[] values);Replaces the allowed values with values, in that order.
SetAllowedValues(T, T, T)
void SetAllowedValues(T increment, T min, T max);Replaces the allowed values with the range min to max in steps of increment. Same validation as the global version.
GetAllowedValues()
T[] GetAllowedValues();The values themselves, in the order they are selected through. The matching entry in ISelectorSettingBase.GetAllowedValuesDisplay is how each one is rendered.