MCPcopy Create free account
hub / github.com/RustOtomeLab/RustEng / Script

Class Script

src/script.rs:24–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 choices: BTreeMap<usize, HashMap<String, Label>>,
23}
24
25impl Timeline {
26 fn insert_bgm(&mut self, index: usize, bgm: String) {
27 self.bgm.insert(index, bgm);
28 }
29
30 fn insert_background(&mut self, index: usize, command: Command) {
31 self.backgrounds.insert(index, command);
32 }
33
34 fn insert_choices(&mut self, index: usize, choices: HashMap<String, Label>) {
35 self.choices.insert(index, choices);
36 }
37
38 fn get_choice_label(&self, index: usize, choice: &str) -> Option<&Label> {
39 if let Some(choices) = self.choices.get(&index) {
40 choices.get(choice)
41 } else {
42 None
43 }
44 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected