Table of Contents

Class QuestParameterValue<TValue>

Namespace
Uncreated.Warfare.Quests.Parameters
Assembly
Uncreated.Warfare.dll
[JsonConverter(typeof(QuestParameterConverter))]
public abstract class QuestParameterValue<TValue> : IFormattable, IEquatable<QuestParameterValue<TValue>>

Type Parameters

TValue
Inheritance
QuestParameterValue<TValue>
Implements
Derived
Inherited Members
Extension Methods

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

ParameterSelectionType

ValueType

Type of value set. Constant, list, wildcard, and sometimes range.

public ParameterValueType ValueType { get; protected set; }

Property Value

ParameterValueType

Methods

Equals(QuestParameterValue<TValue>?)

Indicates whether the current object is equal to another object of the same type.

public abstract bool Equals(QuestParameterValue<TValue>? other)

Parameters

other QuestParameterValue<TValue>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetDisplayString(ITranslationValueFormatter)

Creates a string for use in translations.

public abstract object GetDisplayString(ITranslationValueFormatter formatter)

Parameters

formatter ITranslationValueFormatter

Returns

object

GetSingleValue()

Get one value to use. Must either be a constant or selective.

public abstract TValue GetSingleValue()

Returns

TValue

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 virtual TValue GetSingleValueOrMaximum()

Returns

TValue

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 virtual TValue GetSingleValueOrMinimum()

Returns

TValue

Exceptions

InvalidOperationException

Inclusive selection is not supported when getting a single value for this type.

IsMatch(TValue)

Compare a value against the current value of this parameter. Best used with inclusive selection.

public abstract bool IsMatch(TValue otherValue)

Parameters

otherValue TValue

Returns

bool

ToString()

Convert a parameter value back to a string.

public override abstract string ToString()

Returns

string

WriteJson(Utf8JsonWriter)

Write to a JSON writer.

public virtual void WriteJson(Utf8JsonWriter writer)

Parameters

writer Utf8JsonWriter