summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-13 16:02:58 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-13 16:02:58 +0200
commitb60978b4dacb355fbd12779fb4f8089a7321883d (patch)
tree266b396622e7ed3b3e9f33d1e585fa08e54da46d /src/battle
parent7a303fc22b00a1d60600a9802e5e392521221d82 (diff)
Split data into tacticians-data.
Diffstat (limited to 'src/battle')
-rw-r--r--src/battle/struct/btl_tile.erl10
-rw-r--r--src/battle/struct/btl_tile.erl.m48
2 files changed, 10 insertions, 8 deletions
diff --git a/src/battle/struct/btl_tile.erl b/src/battle/struct/btl_tile.erl
index 479e37e..3abfb9c 100644
--- a/src/battle/struct/btl_tile.erl
+++ b/src/battle/struct/btl_tile.erl
@@ -55,10 +55,12 @@
-spec class_id_to_type_id (class_id()) -> id().
class_id_to_type_id (ClassID) ->
case ClassID of
- 0 -> 0;
- 1 -> 1;
- 2 -> 2;
- N when ((N >= 3) and (N =< 17)) -> 3
+
+ N when ((N >= 0) and (N =< 0)) -> 0;
+ N when ((N >= 1) and (N =< 1)) -> 1;
+ N when ((N >= 2) and (N =< 2)) -> 2;
+ N when ((N >= 3) and (N =< 17)) -> 3;
+ _ -> 0
end.
-spec from_id (id()) -> type().
diff --git a/src/battle/struct/btl_tile.erl.m4 b/src/battle/struct/btl_tile.erl.m4
index 8c884ca..7a8ea21 100644
--- a/src/battle/struct/btl_tile.erl.m4
+++ b/src/battle/struct/btl_tile.erl.m4
@@ -55,10 +55,10 @@
-spec class_id_to_type_id (class_id()) -> id().
class_id_to_type_id (ClassID) ->
case ClassID of
- 0 -> 0;
- 1 -> 1;
- 2 -> 2;
- N when ((N >= 3) and (N =< 17)) -> 3
+m4_include(__MAKEFILE_DATA_DIR/tile/global.m4.conf)m4_dnl
+__TILE_CLASS_USE_ERLANG_SELECT_STYLE
+m4_include(__MAKEFILE_DATA_DIR/tile/grassland.m4d)m4_dnl
+ _ -> 0
end.
-spec from_id (id()) -> type().