"new id" functions

This commit is contained in:
Max Bradbury 2020-06-24 13:21:00 +01:00
parent ec59246577
commit f517f5c8fd
1 changed files with 12 additions and 0 deletions

View File

@ -429,6 +429,18 @@ impl Game {
new_unique_id(self.item_ids()) new_unique_id(self.item_ids())
} }
pub fn new_dialogue_id(&self) -> String {
new_unique_id(self.dialogue_ids())
}
pub fn new_ending_id(&self) -> String {
new_unique_id(self.ending_ids())
}
pub fn new_variable_id(&self) -> String {
new_unique_id(self.variable_ids())
}
/// adds a palette safely and returns the new palette ID /// adds a palette safely and returns the new palette ID
#[inline] #[inline]
pub fn add_palette(&mut self, mut palette: Palette) -> String { pub fn add_palette(&mut self, mut palette: Palette) -> String {