Class Int32ParameterTemplate.Int32ParameterValue
- Namespace
- Uncreated.Warfare.Quests.Parameters
- Assembly
- Uncreated.Warfare.dll
[JsonConverter(typeof(QuestParameterConverter))]
protected class Int32ParameterTemplate.Int32ParameterValue : QuestParameterValue<int>, IFormattable, IEquatable<QuestParameterValue<int>>, IEquatable<Int32ParameterTemplate.Int32ParameterValue>
- Inheritance
-
Int32ParameterTemplate.Int32ParameterValue
- Implements
- Inherited Members
- Extension Methods
Constructors
Int32ParameterValue(int)
public Int32ParameterValue(int constant)
Parameters
constantint
Int32ParameterValue(Int32ParameterTemplate)
public Int32ParameterValue(Int32ParameterTemplate template)
Parameters
templateInt32ParameterTemplate
Methods
Equals(Int32ParameterValue?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Int32ParameterTemplate.Int32ParameterValue? other)
Parameters
otherInt32ParameterTemplate.Int32ParameterValueAn object to compare with this object.
Returns
Equals(QuestParameterValue<int>?)
Indicates whether the current object is equal to another object of the same type.
public override bool Equals(QuestParameterValue<int>? other)
Parameters
otherQuestParameterValue<int>An 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 int 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 int 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 int GetSingleValueOrMinimum()
Returns
Exceptions
- InvalidOperationException
Inclusive selection is not supported when getting a single value for this type.
IsMatch(int)
Compare a value against the current value of this parameter. Best used with inclusive selection.
public override bool IsMatch(int otherValue)
Parameters
otherValueint
Returns
ToString()
Convert a parameter value back to a string.
public override string ToString()
Returns
TryParse(ReadOnlySpan<char>, out QuestParameterValue<int>)
public static bool TryParse(ReadOnlySpan<char> str, out QuestParameterValue<int> value)
Parameters
strReadOnlySpan<char>valueQuestParameterValue<int>
Returns
WriteJson(Utf8JsonWriter)
Write to a JSON writer.
public override void WriteJson(Utf8JsonWriter writer)
Parameters
writerUtf8JsonWriter