From 715b01cbe646e19b08f9e048436b7eaa54845c07 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sun, 19 Jul 2020 15:43:50 +0100 Subject: [PATCH] dedupe tiles again (not sure why 0 tile is still getting added) --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() }