summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-08-02 20:24:14 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-08-02 20:24:14 +0200 |
commit | 896721571dfb37dca83dc49ccc01eecdd22341c6 (patch) | |
tree | 75468bf92387df5f3f3e579d2dc6e9f5a30ec4b7 /src/battle | |
parent | 886c0728a845c918d1f691f2d75796cfd7b294c5 (diff) |
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.
Diffstat (limited to 'src/battle')
-rw-r--r-- | src/battle/src/Comm/SetMap.elm | 10 |
1 files changed, 10 insertions, 0 deletions
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) |