HashedGeneralValueConverter<T>
A class in Alta.Values, Alta.
Type converter that turns a string (a hash number or a name) into a HashedGeneralValue asset. Used by console commands to parse items, populations and stats.
- Listed in Other Alta assemblies
- Inherits or implements
TypeConverter - Derived types
StatDefinitionConverter,PlayerUnlockConverter - Documented in Alta assemblies
Constructors
| Member | What it is |
|---|---|
HashedGeneralValueConverter() | Creates a HashedGeneralValueConverter with default values. |
Fields
1 private and internal field
Methods
| Member | What it is |
|---|---|
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) | True for strings. |
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) | Lowercases the string, looks it up as a hash if it's a number, otherwise by name. Logs a warning and returns null if not found. |
protected virtual HashedGeneralValue<T> GetFromString(string input) | Looks up the asset by name. Override for custom name matching. |