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
NameSuffix
public const string NameSuffix = ".name"
Field Value
Properties
Count
Number of entries over all kinds.
public int Count { get; }
Property Value
Methods
DefaultKey(ContentTextKind, string)
"character.<id>", "weapon.<id>", "item.<id>", "set.<id>" or "enemy.<id>".
public static string DefaultKey(ContentTextKind kind, string id)
Parameters
kindContentTextKindidstring
Returns
KeyOf(ContentTextKind, string)
The localization key base for an id (authored key, else the default key).
public string KeyOf(ContentTextKind kind, string id)
Parameters
kindContentTextKindidstring
Returns
KindPrefix(ContentTextKind)
Returns the stable lowercase localization prefix for a content kind.
public static string KindPrefix(ContentTextKind kind)
Parameters
kindContentTextKind
Returns
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
kindContentTextKindidstringdisplayNamestringdescriptionstringkeystring
Returns
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
kindContentTextKindidstringentryContentTextEntry