Class QuestParameterTemplate<TValue>
- Namespace
- Uncreated.Warfare.Quests.Parameters
- Assembly
- Uncreated.Warfare.dll
public abstract class QuestParameterTemplate<TValue> : IFormattable, IEquatable<QuestParameterTemplate<TValue>>
Type Parameters
TValue
- Inheritance
-
QuestParameterTemplate<TValue>
- Implements
-
IEquatable<QuestParameterTemplate<TValue>>
- Derived
- Inherited Members
Constructors
QuestParameterTemplate()
protected QuestParameterTemplate()
QuestParameterTemplate(ReadOnlySpan<char>)
protected QuestParameterTemplate(ReadOnlySpan<char> str)
Parameters
strReadOnlySpan<char>
QuestParameterTemplate(IValueSet?, ParameterSelectionType)
protected QuestParameterTemplate(QuestParameterTemplate<TValue>.IValueSet? set, ParameterSelectionType selectionType)
Parameters
setQuestParameterTemplate<TValue>.IValueSetselectionTypeParameterSelectionType
Fields
Set
protected QuestParameterTemplate<TValue>.IValueSet? Set
Field Value
- QuestParameterTemplate<TValue>.IValueSet
Properties
SelectionType
Selection style of the parameter. Inclusive allows any value in the set, where selective selects one value in the set.
public ParameterSelectionType SelectionType { get; protected set; }
Property Value
ValueType
Type of value set. Constant, list, wildcard, and sometimes range.
public ParameterValueType ValueType { get; protected set; }
Property Value
Methods
CreateValue(IServiceProvider)
Creates a random value from this selective set, or a set of values if this is an inclusive set.
public abstract UniTask<QuestParameterValue<TValue>> CreateValue(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProvider
Returns
- UniTask<QuestParameterValue<TValue>>
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(QuestParameterTemplate<TValue>)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(QuestParameterTemplate<TValue> other)
Parameters
otherQuestParameterTemplate<TValue>An object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Convert a parameter template back to a string.
public override abstract string ToString()
Returns
TryParseFrom(ReadOnlySpan<char>)
Read a parameter template from a string.
public abstract bool TryParseFrom(ReadOnlySpan<char> str)
Parameters
strReadOnlySpan<char>
Returns
WriteJson(Utf8JsonWriter)
Write to a JSON writer.
public virtual void WriteJson(Utf8JsonWriter writer)
Parameters
writerUtf8JsonWriter