handle dialogue ID changes in exits

This commit is contained in:
Max Bradbury 2020-06-28 20:47:55 +01:00
parent 0a7ed21ea6
commit a969368a8f
1 changed files with 9 additions and 0 deletions

View File

@ -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();