Table of Contents

Class AssetParameterTemplate<TAsset>

Namespace
Uncreated.Warfare.Quests.Parameters
Assembly
Uncreated.Warfare.dll

Quest paramater template representing a set of possible values for randomly generated quests, or a set of allowed values for conditions.

[TypeConverter(typeof(AssetParameterTemplateTypeConverter))]
public class AssetParameterTemplate<TAsset> : QuestParameterTemplate<Guid>, IFormattable, IEquatable<QuestParameterTemplate<Guid>>, IEquatable<AssetParameterTemplate<TAsset>> where TAsset : Asset

Type Parameters

TAsset
Inheritance
AssetParameterTemplate<TAsset>
Implements
Inherited Members

Remarks

For kit names, use KitNameParameterTemplate.

Constructors

AssetParameterTemplate()

protected AssetParameterTemplate()

AssetParameterTemplate(Guid)

Create a template of a constant value.

public AssetParameterTemplate(Guid constant)

Parameters

constant Guid

AssetParameterTemplate(Guid[], ParameterSelectionType)

Create a template of a set of values.

public AssetParameterTemplate(Guid[] values, ParameterSelectionType selectionType)

Parameters

values Guid[]
selectionType ParameterSelectionType

AssetParameterTemplate(ReadOnlySpan<char>)

Create a template of it's string representation.

public AssetParameterTemplate(ReadOnlySpan<char> str)

Parameters

str ReadOnlySpan<char>

AssetParameterTemplate(string)

Create a template of it's string representation.

[UsedImplicitly]
public AssetParameterTemplate(string str)

Parameters

str string

AssetParameterTemplate(ParameterSelectionType)

Create a template of a wildcard set of values.

public AssetParameterTemplate(ParameterSelectionType wildcardType)

Parameters

wildcardType ParameterSelectionType

Properties

WildcardInclusive

A parameter value that matches any asset that is assignable to TAsset.

public static QuestParameterValue<Guid> WildcardInclusive { get; }

Property Value

QuestParameterValue<Guid>

Methods

CreateValue(IServiceProvider)

Creates a random value from this selective set, or a set of values if this is an inclusive set.

public override UniTask<QuestParameterValue<Guid>> CreateValue(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

Returns

UniTask<QuestParameterValue<Guid>>

CreateValueOnGameThread()

Creates a random value from this selective set, or a set of values if this is an inclusive set.

public QuestParameterValue<Guid> CreateValueOnGameThread()

Returns

QuestParameterValue<Guid>

Exceptions

NotSupportedException

Not on the game thread.

Equals(AssetParameterTemplate<TAsset>)

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

public bool Equals(AssetParameterTemplate<TAsset> other)

Parameters

other AssetParameterTemplate<TAsset>

An object to compare with this object.

Returns

bool

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

ReadJson(ref Utf8JsonReader)

Read from a JSON reader.

public static AssetParameterTemplate<TAsset>? ReadJson(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

Returns

AssetParameterTemplate<TAsset>

ReadValueJson(ref Utf8JsonReader)

Read a value from a JSON reader.

public static QuestParameterValue<Guid>? ReadValueJson(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

Returns

QuestParameterValue<Guid>

ToString()

Convert a parameter template back to a string.

public override string ToString()

Returns

string

TryParse(ReadOnlySpan<char>, out AssetParameterTemplate<TAsset>)

Read a AssetParameterTemplate<TAsset> from a string.

public static bool TryParse(ReadOnlySpan<char> str, out AssetParameterTemplate<TAsset> template)

Parameters

str ReadOnlySpan<char>
template AssetParameterTemplate<TAsset>

Returns

bool

TryParseFrom(ReadOnlySpan<char>)

Read a parameter template from a string.

public override bool TryParseFrom(ReadOnlySpan<char> str)

Parameters

str ReadOnlySpan<char>

Returns

bool

TryParseIntl(ReadOnlySpan<char>, out ParameterSelectionType, out ParameterValueType, out Guid, out Guid[]?)

protected static bool TryParseIntl(ReadOnlySpan<char> str, out ParameterSelectionType selType, out ParameterValueType valType, out Guid constant, out Guid[]? list)

Parameters

str ReadOnlySpan<char>
selType ParameterSelectionType
valType ParameterValueType
constant Guid
list Guid[]

Returns

bool

TryParseValue(ReadOnlySpan<char>, out QuestParameterValue<Guid>)

Read a saved value of this AssetParameterTemplate<TAsset> from a string.

public static bool TryParseValue(ReadOnlySpan<char> str, out QuestParameterValue<Guid> value)

Parameters

str ReadOnlySpan<char>
value QuestParameterValue<Guid>

Returns

bool