more ID functions

This commit is contained in:
Max Bradbury 2020-06-24 13:06:47 +01:00
parent d8925c9eb9
commit 9e14109f9f
1 changed files with 15 additions and 0 deletions

View File

@ -385,6 +385,21 @@ impl Game {
self.items.iter().map(|item| item.id.clone()).collect() self.items.iter().map(|item| item.id.clone()).collect()
} }
#[inline]
pub fn dialogue_ids(&self) -> Vec<String> {
self.dialogues.iter().map(|dialogue| dialogue.id.clone()).collect()
}
#[inline]
pub fn ending_ids(&self) -> Vec<String> {
self.endings.iter().map(|ending| ending.id.clone()).collect()
}
#[inline]
pub fn variable_ids(&self) -> Vec<String> {
self.variables.iter().map(|variable| variable.id.clone()).collect()
}
// todo dedupe? // todo dedupe?
pub fn new_palette_id(&self) -> String { pub fn new_palette_id(&self) -> String {