diff --git a/src/lib.rs b/src/lib.rs index 171a721..2f57150 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,7 +66,7 @@ pub fn add_tiles(game_data: String, image: String, prefix: String) -> String { colour_id: None }; - if tile != bitsy_parser::mock::tile_background() && !game.tiles.contains(&tile) { + if !game.tiles.contains(&tile) { game.add_tile(tile); tile_index += 1; @@ -74,6 +74,7 @@ pub fn add_tiles(game_data: String, image: String, prefix: String) -> String { } } + game.dedupe_tiles(); game.to_string() }