added support for instring variables and made character IDs

be always stored in lowercase
This commit is contained in:
2026-05-26 21:41:36 +01:00
parent cc3eca857d
commit 148fb73f7f
12 changed files with 69 additions and 70 deletions
+11 -2
View File
@@ -89,6 +89,7 @@ pub fn keyword_parse(
// Jump to a particular index based on a label eg GOTO character_check
"goto" =>
{
info!("GOTO command, jumping there");
index += 1;
let label = tokenise::get_keyword_token(tokens, index)?;
index = if let Some(label_index) = labels.get(&label) { *label_index }
@@ -98,10 +99,17 @@ pub fn keyword_parse(
index + 1
};
debug!("Jumping to {index}");
}
},
"pan" =>
{
info!("PAN command, informing client");
index += 1;
let location = tokenise::get_keyword_token(tokens, index)?;
api::modify_data(happening_queue, "pan".to_string(), location, String::new(), Vec::new());
},
_ =>
{
warn!("Invalid command: {token}");
warn!("Invalid command: {token}, index {index}");
index += 1;
}
}
@@ -142,6 +150,7 @@ pub fn choice_parse
}
};
api::modify_data(happening_queue, "choice".to_string(), String::new(), String::new(), choices.clone());
info!("Waiting for client choice");
debug!("{choice_indeces:?}");
let choice = match rx.recv()
{