From 9e14109f9f9ce6e48405c0351fddca2093081d71 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Wed, 24 Jun 2020 13:06:47 +0100 Subject: [PATCH] more ID functions --- src/game.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/game.rs b/src/game.rs index b065bec..69a7d68 100644 --- a/src/game.rs +++ b/src/game.rs @@ -385,6 +385,21 @@ impl Game { self.items.iter().map(|item| item.id.clone()).collect() } + #[inline] + pub fn dialogue_ids(&self) -> Vec { + self.dialogues.iter().map(|dialogue| dialogue.id.clone()).collect() + } + + #[inline] + pub fn ending_ids(&self) -> Vec { + self.endings.iter().map(|ending| ending.id.clone()).collect() + } + + #[inline] + pub fn variable_ids(&self) -> Vec { + self.variables.iter().map(|variable| variable.id.clone()).collect() + } + // todo dedupe? pub fn new_palette_id(&self) -> String {