From 896721571dfb37dca83dc49ccc01eecdd22341c6 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 2 Aug 2018 20:24:14 +0200 Subject: Getting the map editor up to date... It'll need a different way to display available tile instances to the user. Also, patterns will likely be more generic, replacing the current numbers with 'A', 'B', and tile variation indices. --- src/battle/src/Comm/SetMap.elm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/battle') diff --git a/src/battle/src/Comm/SetMap.elm b/src/battle/src/Comm/SetMap.elm index 8c58ab3..e74471d 100644 --- a/src/battle/src/Comm/SetMap.elm +++ b/src/battle/src/Comm/SetMap.elm @@ -26,6 +26,16 @@ type alias MapData = deserialize_tile_instance : Int -> Int -> (List Int) -> Struct.Tile.Instance deserialize_tile_instance map_width index t = case t of + [type_id] -> + (Struct.Tile.new_instance + (index % map_width) + (index // map_width) + type_id + type_id + 0 + Constants.Movement.cost_when_out_of_bounds + ) + [type_id, border_id, variant_ix] -> (Struct.Tile.new_instance (index % map_width) -- cgit v1.2.3-70-g09d2