summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-07-12 21:10:02 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-07-12 21:10:02 +0200 |
commit | 7a303fc22b00a1d60600a9802e5e392521221d82 (patch) | |
tree | ef8ee4354b9c90580d0d61aa281416422ac85f67 | |
parent | e7abe96175e14f5f06a39a2db2cea33e1e310e00 (diff) |
The map editor now displays its map correctly.
-rw-r--r-- | data/tile/global.m4.conf | 9 | ||||
-rw-r--r-- | src/battle/struct/btl_tile.erl | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/data/tile/global.m4.conf b/data/tile/global.m4.conf index 686e4f9..c470c7c 100644 --- a/data/tile/global.m4.conf +++ b/data/tile/global.m4.conf @@ -10,5 +10,14 @@ m4_define(`__TILE_CLASS_ERLANG_STYLE',`from_id (`$1') -> class_range_min = $4, class_range_max = $5 };')m4_dnl +m4_define(`__TILE_CLASS_JSON_STYLE',` { + "msg": "add_tile", + "id": $1, + "nam": "[__TILE_CATEGORY_NAME] $2", + "ct": $3, + "rmi": $4, + "rma": $5 + },')m4_dnl m4_define(`__TILE_CATEGORY',`m4_define(`__TILE_CATEGORY_NAME', `$1')')m4_dnl m4_define(`__TILE_CLASS_USE_ERLANG_STYLE',`__TILE_CHOOSE_STYLE(`__TILE_CLASS_ERLANG_STYLE')')m4_dnl +m4_define(`__TILE_CLASS_USE_JSON_STYLE',`__TILE_CHOOSE_STYLE(`__TILE_CLASS_JSON_STYLE')')m4_dnl diff --git a/src/battle/struct/btl_tile.erl b/src/battle/struct/btl_tile.erl index 2ac3832..479e37e 100644 --- a/src/battle/struct/btl_tile.erl +++ b/src/battle/struct/btl_tile.erl @@ -62,6 +62,7 @@ class_id_to_type_id (ClassID) -> end. -spec from_id (id()) -> type(). + from_id (0) -> #tile { |