Files
Genarrative/server-rs/crates/module-jump-hop/src/commands.rs
高物 3931442249 Enforce Genarrative play-type SOP and update docs
Rewrite Genarrative play-type integration guidance across .codex and .hermes to define a platform-level SOP: default to form/image workbench, unify single-image asset slots (CreativeImageInputPanel), standardize series-material sheet->cut->transparent->OSS pipeline, and forbid copying legacy chat/agent workflows as the default. Add decision-log entry freezing the SOP and a pitfalls note warning against direct reuse of old play tools. Update CONTEXT.md and docs/README.md, add a new PRD file, and apply related small server-side changes (module-auth, spacetime-client mappers and runtime) to align back-end code with the new contracts and flows.
2026-05-20 12:12:00 +08:00

19 lines
650 B
Rust

use shared_kernel::normalize_required_string;
use crate::JumpHopDifficulty;
pub fn parse_jump_hop_difficulty(value: &str) -> JumpHopDifficulty {
match value.trim().to_ascii_lowercase().as_str() {
"easy" | "轻松" => JumpHopDifficulty::Easy,
"advanced" | "进阶" => JumpHopDifficulty::Advanced,
"challenge" | "挑战" => JumpHopDifficulty::Challenge,
_ => JumpHopDifficulty::Standard,
}
}
pub fn normalize_jump_hop_seed(seed: &str, fallback: &str) -> String {
normalize_required_string(seed)
.or_else(|| normalize_required_string(fallback))
.unwrap_or_else(|| "jump-hop".to_string())
}