From 6869f9a8aaab7618dd49cbb47388838fc883ceb9 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 2 Aug 2018 20:23:01 +0200 Subject: Getting the map editor up to date... --- src/map/reply/map_add_tile.erl | 6 ++---- src/map/reply/map_set_map.erl | 6 +++++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/map/reply') diff --git a/src/map/reply/map_add_tile.erl b/src/map/reply/map_add_tile.erl index ab0d80b..1047231 100644 --- a/src/map/reply/map_add_tile.erl +++ b/src/map/reply/map_add_tile.erl @@ -21,10 +21,8 @@ generate (Tile) -> { [ {<<"msg">>, <<"add_tile">>}, - {<<"id">>, map_tile:get_id(Tile)}, + {<<"id">>, map_tile:get_class_id(Tile)}, {<<"nam">>, map_tile:get_name(Tile)}, - {<<"ct">>, map_tile:get_cost(Tile)}, - {<<"rmi">>, map_tile:get_range_minimum(Tile)}, - {<<"rma">>, map_tile:get_range_maximum(Tile)} + {<<"ct">>, map_tile:get_cost(Tile)} ] }. diff --git a/src/map/reply/map_set_map.erl b/src/map/reply/map_set_map.erl index 336c9b2..a4fc01a 100644 --- a/src/map/reply/map_set_map.erl +++ b/src/map/reply/map_set_map.erl @@ -25,7 +25,11 @@ generate (Map) -> {<<"h">>, map_map:get_height(Map)}, { <<"t">>, - array:sparse_to_list(map_map:get_tile_class_ids(Map)) + lists:map + ( + fun map_tile:instance_to_int_list/1, + array:sparse_to_list(map_map:get_tile_instances(Map)) + ) } ] }. -- cgit v1.2.3-70-g09d2