pub struct PackRules<'a> {
pub data_problem: fn(key: &str, text: &str) -> Option<String>,
pub tokens: &'a dyn Tokens,
pub limits: DialogueLimits,
pub widths: &'a CellWidths,
pub variants: &'a [&'a str],
}Expand description
What a game’s packs keep to besides matching English: the rules of its data text, its tokens, its dialogue’s limits and the variants a line may have.
Fields§
§data_problem: fn(key: &str, text: &str) -> Option<String>What is wrong with a pack’s text text for the data key key, if
anything (a tip over its box, say): the game’s rules for the data
text it hands over. Names (names.<id>) keep the engine’s rules
first.
tokens: &'a dyn TokensThe game’s own {tokens}: a pack’s dialogue text may use them.
limits: DialogueLimitsHow much text the dialogue box and the reply menu hold.
widths: &'a CellWidthsHow many cells each character takes, which the limits count: the
font atlas’s (CellWidths::of), or CellWidths::NARROW.
variants: &'a [&'a str]The names of the variants a dialogue entry may have instead of one
text (text_<variant> fields, every one of them): one per hero
a line can be said of, say. Empty for none.