Add all levels
This commit is contained in:
@@ -112,14 +112,16 @@ impl Level for Complex {
|
|||||||
serde_yaml::to_string(&Value::Mapping(top)).expect("serialise mapping");
|
serde_yaml::to_string(&Value::Mapping(top)).expect("serialise mapping");
|
||||||
|
|
||||||
let mut d = Describer::new();
|
let mut d = Describer::new();
|
||||||
|
// No tab characters: ratatui's Paragraph renders tabs unevenly,
|
||||||
|
// which combined with the typewriter's progressive reveal can
|
||||||
|
// produce overlapping characters. Use plain spaces for indents.
|
||||||
d.register(
|
d.register(
|
||||||
"l07",
|
"l07",
|
||||||
"Floor {{ floor }}.\n\
|
"Floor {{ floor }}.\n\n\
|
||||||
{% for r in rooms %}\n\
|
{% for r in rooms %}{{ r.name }} — a {{ r.kind }} (locked: {{ r.locked }})\n\
|
||||||
{{ r.name }} — a {{ r.kind }} (locked: {{ r.locked }})\n\
|
exits: {% for e in r.exits %}{{ e }}{% if not loop.last %}, {% endif %}{% endfor %}\n\
|
||||||
\texits: {% for e in r.exits %}{{ e }}{% if not loop.last %}, {% endif %}{% endfor %}\n\
|
contents: {% for c in r.contents %}{{ c }}{% if not loop.last %}, {% endif %}{% endfor %}\n\n\
|
||||||
\tcontents: {% for c in r.contents %}{{ c }}{% if not loop.last %}, {% endif %}{% endfor %}\n\
|
{% endfor %}\
|
||||||
{% endfor %}\n\
|
|
||||||
💡 Combine maps, lists, and scalars — `floor:` is an int, each room is a dict with two lists.",
|
💡 Combine maps, lists, and scalars — `floor:` is an int, each room is a dict with two lists.",
|
||||||
)
|
)
|
||||||
.expect("register template");
|
.expect("register template");
|
||||||
|
|||||||
@@ -93,5 +93,11 @@ pub fn registry() -> Vec<Box<dyn Level>> {
|
|||||||
Box::new(l03_dict::Dict),
|
Box::new(l03_dict::Dict),
|
||||||
Box::new(l04_list::List),
|
Box::new(l04_list::List),
|
||||||
Box::new(l05_dict_list::DictList),
|
Box::new(l05_dict_list::DictList),
|
||||||
|
Box::new(l06_anchors::Anchors),
|
||||||
|
Box::new(l07_complex::Complex),
|
||||||
|
Box::new(l08_tags::Tags),
|
||||||
|
Box::new(l09_operators::Operators),
|
||||||
|
Box::new(l10_dynamic::Dynamic),
|
||||||
|
Box::new(l11_adv_anchors::AdvAnchors),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user