Table of Contents

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

constant float

SingleParameterValue(SingleParameterTemplate)

public SingleParameterValue(SingleParameterTemplate template)

Parameters

template SingleParameterTemplate

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

other QuestParameterValue<float>

An object to compare with this object.

Returns

bool

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

Equals(SingleParameterValue)

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

public bool Equals(SingleParameterTemplate.SingleParameterValue other)

Parameters

other SingleParameterTemplate.SingleParameterValue

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 override object GetDisplayString(ITranslationValueFormatter formatter)

Parameters

formatter ITranslationValueFormatter

Returns

object

GetSingleValue()

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

public override float GetSingleValue()

Returns

float

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

float

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

float

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

otherValue float

Returns

bool

ToString()

Convert a parameter value back to a string.

public override string ToString()

Returns

string

TryParse(ReadOnlySpan<char>, out QuestParameterValue<float>)

public static bool TryParse(ReadOnlySpan<char> str, out QuestParameterValue<float> value)

Parameters

str ReadOnlySpan<char>
value QuestParameterValue<float>

Returns

bool

WriteJson(Utf8JsonWriter)

Write to a JSON writer.

public override void WriteJson(Utf8JsonWriter writer)

Parameters

writer Utf8JsonWriter