Table of Contents

Class TimbnMarkup

Namespace
Timbn.GraveyardKeeperTwo.Core.Framework
Assembly
Timbn.GraveyardKeeperTwo.Core.dll

Writes the game's text markup for you, for icons and other lines inside a line of text. Use it in any text a plugin adds, such as quest lines or Text.Add. Lang files write the same markup by hand.

public static class TimbnMarkup
Inheritance
TimbnMarkup
Inherited Members

Examples

$"Come back on {TimbnMarkup.Weekday(TimbnWeekday.Pride)} and bring 2 {TimbnMarkup.Icon("slv")}."
$"Ask {TimbnMarkup.Localized(TimbnGameIds.Npcs.Herm)} about the gold wine."

Methods

Icon(string)

An icon from the game's text font, such as slv, gld or brz for the coins, or icon-quality-gold for the gold quality icon. The names are the sprites in the game's font sprite asset.

public static string Icon(string name)

Parameters

name string

The icon's name.

Returns

string

The markup, such as (slv).

Localized(string)

Another line's text, looked up each time the line shows, so it follows the player's language. Use it for the game's names, such as npc_herm.

public static string Localized(string key)

Parameters

key string

The text's localization key.

Returns

string

The markup, such as #(npc_herm).

Weekday(TimbnWeekday)

The icon for a day of the week, the way the game writes days in its own text.

public static string Weekday(TimbnWeekday day)

Parameters

day TimbnWeekday

The day.

Returns

string

The markup, such as (day_pride).