From a969368a8fdb8ace8f8e7faccb2f5be349cc8486 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sun, 28 Jun 2020 20:47:55 +0100 Subject: [PATCH] handle dialogue ID changes in exits --- src/game.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game.rs b/src/game.rs index bb3b46a..497e6d6 100644 --- a/src/game.rs +++ b/src/game.rs @@ -477,6 +477,15 @@ impl Game { if change.is_some() { exit.exit.room_id = change.unwrap().clone(); } + + if exit.dialogue_id.is_some() { + let key = exit.dialogue_id.clone().unwrap(); + let dialogue_change = dialogue_id_changes.get(&key); + if dialogue_change.is_some() { + exit.dialogue_id = Some(dialogue_change.unwrap().clone()); + } + } + exit }).collect();