fix misleading comments

This commit is contained in:
Max Bradbury 2020-06-28 20:29:03 +01:00
parent 9fcf3a996d
commit 6113bb12a6
1 changed files with 6 additions and 5 deletions

View File

@ -662,7 +662,7 @@ impl Game {
new_unique_id(self.variable_ids())
}
/// adds a palette safely and returns the new palette ID
/// adds a palette safely and returns the ID
#[inline]
pub fn add_palette(&mut self, mut palette: Palette) -> String {
let new_id = try_id(self.palette_ids(), palette.id.clone());
@ -673,7 +673,7 @@ impl Game {
new_id
}
/// adds a tile safely and returns the new tile ID
/// adds a tile safely and returns the ID
#[inline]
pub fn add_tile(&mut self, mut tile: Tile) -> String {
if self.tile_ids().contains(&tile.id) {
@ -687,7 +687,7 @@ impl Game {
id
}
/// adds a sprite safely and returns the new sprite ID
/// adds a sprite safely and returns the ID
#[inline]
pub fn add_sprite(&mut self, mut sprite: Sprite) -> String {
let new_id = try_id(self.sprite_ids(), sprite.id.clone());
@ -698,7 +698,7 @@ impl Game {
new_id
}
/// adds an item safely and returns the new item ID
/// adds an item safely and returns the ID
#[inline]
pub fn add_item(&mut self, mut item: Item) -> String {
let new_id = try_id(self.item_ids(), item.id.clone());
@ -709,7 +709,7 @@ impl Game {
new_id
}
/// adds a dialogue safely and returns the new dialogue ID
/// adds a dialogue safely and returns the ID
#[inline]
pub fn add_dialogue(&mut self, mut dialogue: Dialogue) -> String {
let new_id = try_id(self.dialogue_ids(), dialogue.id.clone());
@ -720,6 +720,7 @@ impl Game {
new_id
}
/// adds an ending safely and returns the ID
pub fn add_ending(&mut self, mut ending: Ending) -> String {
let new_id = try_id(self.ending_ids(), ending.id.clone());
if new_id != ending.id {