Add a command post and shared unit cards (#153)

This commit is contained in:
2026-12-01 22:55:45 +03:00
parent 7e6d9d8b9a
commit bf558c024e
8 changed files with 508 additions and 37 deletions
+4 -2
View File
@@ -114,6 +114,7 @@ pub fn tree() -> Tree {
Node::lit("reset").runs(),
])),
Node::lit("recon").runs(),
Node::lit("post").runs().then(Node::arg("поиск", Value::word()).runs()),
Node::lit("stats").runs(),
])
}
@@ -170,7 +171,7 @@ mod tests {
#[test]
fn every_branch_of_the_handler_parses() {
for line in [
"", "menu", "capabilities", "monitor", "grid", "give", "raid", "repair", "import", "flare", "clear", "stats", "recon", "roles",
"", "menu", "capabilities", "monitor", "grid", "post", "post Панцирь", "post 82", "give", "raid", "repair", "import", "flare", "clear", "stats", "recon", "roles",
"replay", "replay map", "replay full", "replay reel", "replay film", "replay film best", "replay film all",
"replay film 3", "replay export", "replay export mine", "replay export best", "replay export all", "replay export 3",
"replay export mine all fps=30 size=1280x720 crf=18 sec=12.5 noaudio", "replay export fps=60", "replay stop",
@@ -253,7 +254,8 @@ mod tests {
"target", "give", "deploy", "wave", "clear", "targets", "damage", "truth", "shader", "hold", "lastchance", "roles", "doctrine", "stats", "recon", "sites", "strike", "ground-stock", "ground-load", "ground-unload", "ground-cancel", "chains"] {
assert!(top.contains(&w.to_string()), "{w} in {top:?}");
}
assert_eq!(top.len(), 38);
assert!(top.contains(&"post".to_string()));
assert_eq!(top.len(), 39);
assert_eq!(complete("rep", &[]), ["repair", "replay"]);
assert_eq!(complete("replay ", &[]), ["export", "film", "full", "map", "reel", "stop"]);
assert_eq!(complete("replay film ", &[]), ["all", "best"]);