Class ContentTextTable

Namespace
SurvivorsMaker.Data
Assembly
SurvivorsMaker.Data.dll

Id → authored text for every content definition, built by BuildTextTable(). Hosts without a ContentAsset can fill one with Set(ContentTextKind, string, string, string, string).

public sealed class ContentTextTable
Inheritance
ContentTextTable
Inherited Members

Constructors

ContentTextTable()

public ContentTextTable()

Fields

DescriptionSuffix

public const string DescriptionSuffix = ".description"

Field Value

string

NameSuffix

public const string NameSuffix = ".name"

Field Value

string

Properties

Count

Number of entries over all kinds.

public int Count { get; }

Property Value

int

Methods

DefaultKey(ContentTextKind, string)

"character.<id>", "weapon.<id>", "item.<id>", "set.<id>" or "enemy.<id>".

public static string DefaultKey(ContentTextKind kind, string id)

Parameters

kind ContentTextKind
id string

Returns

string

KeyOf(ContentTextKind, string)

The localization key base for an id (authored key, else the default key).

public string KeyOf(ContentTextKind kind, string id)

Parameters

kind ContentTextKind
id string

Returns

string

KindPrefix(ContentTextKind)

Returns the stable lowercase localization prefix for a content kind.

public static string KindPrefix(ContentTextKind kind)

Parameters

kind ContentTextKind

Returns

string

Set(ContentTextKind, string, string, string, string)

Adds or replaces the entry for kind and id.

public ContentTextEntry Set(ContentTextKind kind, string id, string displayName, string description = "", string key = "")

Parameters

kind ContentTextKind
id string
displayName string
description string
key string

Returns

ContentTextEntry

TryGet(ContentTextKind, string, out ContentTextEntry)

Looks up a content text entry by kind and id without creating an entry.

public bool TryGet(ContentTextKind kind, string id, out ContentTextEntry entry)

Parameters

kind ContentTextKind
id string
entry ContentTextEntry

Returns

bool