Class SingleParameterTemplate.SingleParameterValue
- Namespace
- Uncreated.Warfare.Quests.Parameters
- Assembly
- Uncreated.Warfare.dll
[JsonConverter(typeof(QuestParameterConverter))]
protected class SingleParameterTemplate.SingleParameterValue : QuestParameterValue<float>, IFormattable, IEquatable<QuestParameterValue<float>>, IEquatable<SingleParameterTemplate.SingleParameterValue>
- Inheritance
-
SingleParameterTemplate.SingleParameterValue
- Implements
- Inherited Members
- Extension Methods
Constructors
SingleParameterValue(float)
public SingleParameterValue(float constant)
Parameters
constantfloat
SingleParameterValue(SingleParameterTemplate)
public SingleParameterValue(SingleParameterTemplate template)
Parameters
templateSingleParameterTemplate
Methods
Equals(QuestParameterValue<float>?)
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(QuestParameterValue<float>? other)
Parameters
otherQuestParameterValue<float>An object to compare with this object.
Returns
Equals(SingleParameterValue)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SingleParameterTemplate.SingleParameterValue other)
Parameters
otherSingleParameterTemplate.SingleParameterValueAn object to compare with this object.
Returns
GetDisplayString(ITranslationValueFormatter)
Creates a string for use in translations.
public override object GetDisplayString(ITranslationValueFormatter formatter)
Parameters
formatterITranslationValueFormatter
Returns
GetSingleValue()
Get one value to use. Must either be a constant or selective.
public override float GetSingleValue()
Returns
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value.
GetSingleValueOrMaximum()
Get one value to use. If this is a range or list it'll return the maximum of the set.
public override float GetSingleValueOrMaximum()
Returns
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value for this type.
GetSingleValueOrMinimum()
Get one value to use. If this is a range or list it'll return the minimum of the set.
public override float GetSingleValueOrMinimum()
Returns
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value for this type.
IsMatch(float)
Compare a value against the current value of this parameter. Best used with inclusive selection.
public override bool IsMatch(float otherValue)
Parameters
otherValuefloat
Returns
ToString()
Convert a parameter value back to a string.
public override string ToString()
Returns
TryParse(ReadOnlySpan<char>, out QuestParameterValue<float>)
public static bool TryParse(ReadOnlySpan<char> str, out QuestParameterValue<float> value)
Parameters
strReadOnlySpan<char>valueQuestParameterValue<float>
Returns
WriteJson(Utf8JsonWriter)
Write to a JSON writer.
public override void WriteJson(Utf8JsonWriter writer)
Parameters
writerUtf8JsonWriter