Class DataSubtype
Last update: 09.03.2026Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
Represents one data subtype, e.g., TL (lump temperature). If using C#, you can supply a StandardDataSubtype anywhere a DataSubtype is expected and it will be implicity converted to a DataSubtype. This also works with a FullStandardDataSubtype.
public class DataSubtype : IEquatable<DataSubtype>
Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
DataSubtype(StandardDataSubtypes)
public DataSubtype(StandardDataSubtypes stdDataSubtype)
Parameters
stdDataSubtype StandardDataSubtypes
DataSubtype(StandardDataSubtypes, FluidConstituents)
public DataSubtype(StandardDataSubtypes stdDataSubtype, FluidConstituents fluidConstituent)
Parameters
stdDataSubtype StandardDataSubtypes
fluidConstituent FluidConstituents
DataSubtype(FullStandardDataSubtype)
public DataSubtype(FullStandardDataSubtype stdDataSubtypeWithFluid)
Parameters
stdDataSubtypeWithFluid FullStandardDataSubtype
DataSubtype(UnitsType, bool, string, string, DataTypes, FluidConstituents)
public DataSubtype(UnitsData.UnitsType dimension, bool isDimensionalOnlyIfPositive, string description, string baseSindaDesignator, DataTypes dataType, FluidConstituents fluidConstituent = FluidConstituents.NOT_SET)
Parameters
dimension UnitsData.UnitsType
isDimensionalOnlyIfPositive bool
description string
baseSindaDesignator string
dataType DataTypes
fluidConstituent FluidConstituents
DataSubtype(string, DataTypes, ValueTypes)
public DataSubtype(string udfaName, DataTypes dataType, DataSubtype.ValueTypes valueType)
Parameters
udfaName string
dataType DataTypes
valueType DataSubtype.ValueTypes
DataSubtype(UnitsType, string, DataTypes)
public DataSubtype(UnitsData.UnitsType dimension, string description, DataTypes dataType = DataTypes.NOT_SET)
Parameters
dimension UnitsData.UnitsType
description string
dataType DataTypes
DataSubtype(DataSubtype, FluidConstituents)
public DataSubtype(DataSubtype source, FluidConstituents fluidConstituent)
Parameters
source DataSubtype
fluidConstituent FluidConstituents
Properties
BaseSindaDesignator
The short string used by Sinda to identify this subtype, e.g., "TL". Stored and returned as all uppercase.
public string BaseSindaDesignator { get; }
Property Value
DataType
The DataTypes enum (node, lump, etc.) associated with this subtype.
public DataTypes DataType { get; }
Property Value
DataTypeFamily
The DataTypeFamilies enum (thermal, fluid, other) associated with this subtype.
public DataTypeFamilies DataTypeFamily { get; }
Property Value
Description
A short description of this subtype, e.g. "lump temperature".
public string Description { get; }
Property Value
Dimension
The physical dimension of this subtype, e.g., temperature.
public UnitsData.UnitsType Dimension { get; }
Property Value
UnitsData.UnitsType
FluidConstituent
For multispecies subtypes, this is the fluid constituent. For non-multispecies subtypes, this should be set to NOT_SET.
public FluidConstituents FluidConstituent { get; }
Property Value
IsDimensionalOnlyIfPositive
Determines whether this subtype behaves dimensionally only when positive. (Some Sinda variables are dimensional if positive and just flags if negative.)
public bool IsDimensionalOnlyIfPositive { get; }
Property Value
IsUDFA
Determines whether this subtype describes a UDFA.
public bool IsUDFA { get; }
Property Value
SindaDesignator
The short string used by Sinda to identify this subtype, combined with a fluid constituent letter for multispecies subtypes.
public string SindaDesignator { get; }
Property Value
StandardDataSubtype
Gets the StandardDataSubtypes enum associated with this subtype.
public StandardDataSubtypes StandardDataSubtype { get; }
Property Value
SupportedStandardDataSubtypes
public static IEnumerable<StandardDataSubtypes> SupportedStandardDataSubtypes { get; }
Property Value
IEnumerable<StandardDataSubtypes>
ValueType
The type of value that this subtype represents.
public DataSubtype.ValueTypes ValueType { get; }
Property Value
Methods
Equals(DataSubtype)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(DataSubtype x)
Parameters
Returns
true if the current object is equal to the other parameter; otherwise, false.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj object
The object to compare with the current object.
Returns
true if the specified object is equal to the current object; otherwise, false.
GetFullStandardDataSubtype()
Gets the FullStandardDataSubtype associated with this subtype.
public FullStandardDataSubtype GetFullStandardDataSubtype()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
A hash code for the current object.
SetFrom(DataSubtype)
public void SetFrom(DataSubtype x)
Parameters
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
A string that represents the current object.
Operators
operator ==(DataSubtype, DataSubtype)
public static bool operator ==(DataSubtype x1, DataSubtype x2)
Parameters
x1 DataSubtype
x2 DataSubtype
Returns
implicit operator DataSubtype(StandardDataSubtypes)
public static implicit operator DataSubtype(StandardDataSubtypes x)
Parameters
Returns
implicit operator DataSubtype(FullStandardDataSubtype)
public static implicit operator DataSubtype(FullStandardDataSubtype x)
Parameters
Returns
operator !=(DataSubtype, DataSubtype)
public static bool operator !=(DataSubtype x1, DataSubtype x2)
Parameters
x1 DataSubtype
x2 DataSubtype