From 328b3a5c21670c0d26e6cabe3c60811cfc3b8249 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 20 Mar 2024 06:20:58 +0100 Subject: [PATCH] properly reset parser on new message/choice --- src/world.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/world.rs b/src/world.rs index 6ed7126..154bbd6 100644 --- a/src/world.rs +++ b/src/world.rs @@ -384,11 +384,12 @@ impl ParserState { goto: self.goto.clone(), } } - fn spawn_chatbranch(&self, commands: &mut Commands) { + fn spawn_chatbranch(&mut self, commands: &mut Commands) { if self.stores_item { debug!("{:#?}", self.as_chatbranch()); commands.spawn(self.as_chatbranch()); } + self.reset_message(); } }