Skip to main content

StatListConverter

A class in Root.Township, Alta.StatSystem.

Type converter that turns a stat name into a StatList of stat and player pairs for console commands.

Constructors​

MemberWhat it is
StatListConverter()Creates a StatListConverter with default values.

Properties​

MemberWhat it is
static IEnumerable<Stat> LastList { get; private set; }Meant to hold the last converted list; this converter never sets it.

Methods​

MemberWhat it is
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)True for strings.
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)For each player in PlayerList.LastList, adds a pair. It splits the text on commas but ignores the result, and always reads the stat from PlayerConverter.Last.