Named creatures: names per kind and language, epithets at higher levels, memorial stones for the fallen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 12:40:22 +01:00
1 parent 189da6f408
commit ad5ceb8c13
26 files changed
+685 -6

No files matched your search

+7 -1
View File
@@ -97,7 +97,13 @@ pub fn tr(key: &str) -> String {
pub fn trf(key: &str, args: &[String]) -> String {
let mut s = tr(key);
for (n, a) in args.iter().enumerate() {
let v = if let Some(k) = a.strip_prefix('@') { tr(k) } else { a.clone() };
let v = if let Some(k) = a.strip_prefix('@') {
tr(k)
} else if let Some(n) = a.strip_prefix('%') {
crate::names::from_arg(n) // a creature's name (names.rs)
} else {
a.clone()
};
s = s.replace(&format!("{{{}}}", n), &v);
}
s