From f517f5c8fd7541001086511350ef5638794f01ea Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Wed, 24 Jun 2020 13:21:00 +0100 Subject: [PATCH] "new id" functions --- src/game.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game.rs b/src/game.rs index 69a7d68..cbb4487 100644 --- a/src/game.rs +++ b/src/game.rs @@ -429,6 +429,18 @@ impl Game { 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 #[inline] pub fn add_palette(&mut self, mut palette: Palette) -> String {