From 600f9d5e3e3501ba5fc888d548fee358943c20db Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 14 Apr 2024 14:57:49 +0200 Subject: [PATCH] cleanup --- src/chat.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index f1770fc..a2e2460 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -115,8 +115,7 @@ pub enum ChatEvent { SpawnMessage(String, hud::LogLevel, String), SpawnChoice(String, usize, ChatPos, bool), RunScript(String), - Sleep(f64), - //Script(String, String, String), + SleepSeconds(f64), } // This is the only place where any YAML interaction should be happening. @@ -462,7 +461,7 @@ impl ChatDB { match (key, value) { (Some(TOKEN_SLEEP), Value::Number(time)) => { if let Some(time_f64) = time.as_f64() { - event.send(ChatEvent::Sleep(time_f64)); + event.send(ChatEvent::SleepSeconds(time_f64)); } } (Some(TOKEN_GOTO), Value::String(label)) => { @@ -651,7 +650,7 @@ pub fn handle_chat_events( ChatEvent::RunScript(script) => { ew_chatscript.send(ChatScriptEvent(script.clone())); } - ChatEvent::Sleep(sleep_duration) => { + ChatEvent::SleepSeconds(sleep_duration) => { chat.timer = now + sleep_duration; } } @@ -663,7 +662,6 @@ fn handle_reply_keys( settings: ResMut, q_choices: Query<&Choice>, mut q_chats: Query<&mut Chat>, - //mut evwriter_sendmsg: EventWriter, mut evwriter_sfx: EventWriter, time: Res