A class in Root.Township, Alta.StatSystem.
Type converter that turns a stat name into the Stat on the last parsed player, for console command arguments. The player argument must come first.
Constructors
| Member | What it is |
|---|
StatConverter() | Creates a StatConverter with default values. |
Properties
| Member | What it is |
|---|
static Stat Last { get; private set; } | The stat returned by the last conversion. |
Methods
| Member | What it is |
|---|
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) | True for strings. |
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) | Looks the lowercased name up in the health stat manager of PlayerConverter.Last. Returns null and logs if there is no player. |