| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-08-28 17:03:35 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-08-28 17:03:35 +0200 | 
| commit | 225df72e3cf2dbd6c00a75e33be0034e8e76d769 (patch) | |
| tree | ed23193108825abc1fe2d2571a8df7b9811709ca /weapon/global.m4.conf | |
| parent | a3ca314c49a9acfd2d27742c7a4998b1fa561c5e (diff) | |
Fixes a few issues, makes it easier to read & use.
Diffstat (limited to 'weapon/global.m4.conf')
| -rw-r--r-- | weapon/global.m4.conf | 36 | 
1 files changed, 24 insertions, 12 deletions
| diff --git a/weapon/global.m4.conf b/weapon/global.m4.conf index 217788b..3ae3d17 100644 --- a/weapon/global.m4.conf +++ b/weapon/global.m4.conf @@ -1,5 +1,12 @@ -m4_include(__MAKEFILE_DATA_DIR`/modifiers.m4.conf')m4_dnl -m4_define(`__WEAPON_CHOOSE_STYLE', `m4_define(`__WEAPON',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl +m4_include(__MAKEFILE_DATA_DIR`/omnimods.m4.conf')m4_dnl +m4_dnl +m4_dnl +m4_dnl +m4_define(`__WEAPON_CHOOSE_STYLE', +   `m4_define(`__WEAPON',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl +m4_dnl +m4_dnl +m4_dnl  m4_define(`__WEAPON_ERLANG_STYLE',`from_id (`$1') ->     #weapon     { @@ -7,23 +14,28 @@ m4_define(`__WEAPON_ERLANG_STYLE',`from_id (`$1') ->        name = <<"$2">>,        min_range = $3,        max_range = $4, -      attr_mod = $5, -      stat_mod = $6, -      atk_mod = $7, -      def_mod = $8 +      omnimods = __OMNIMODS($5, $6, $7, $8)     };  ')m4_dnl +m4_define(`__WEAPON_USE_ERLANG_STYLE', +   `__WEAPON_CHOOSE_STYLE(`__WEAPON_ERLANG_STYLE')')m4_dnl +m4_dnl +m4_dnl +m4_dnl  m4_define(`__WEAPON_JSON_STYLE',`   {        "msg": "add_weapon",        "id": $1,        "nam": "$2",        "rmi": $3,        "rma": $4, -      "attm": $5, -      "stam": $6, -      "atkm": $7, -      "defm": $8 +      "omni": __OMNIMODS($5, $6, $7, $8)     },  ')m4_dnl -m4_define(`__WEAPON_USE_ERLANG_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_ERLANG_STYLE')__MOD_USE_ERLANG_STYLE()')m4_dnl -m4_define(`__WEAPON_USE_JSON_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_JSON_STYLE')__MOD_USE_JSON_STYLE()')m4_dnl +m4_define(`__WEAPON_USE_JSON_STYLE', +   `__WEAPON_CHOOSE_STYLE(`__WEAPON_JSON_STYLE')')m4_dnl +m4_dnl +m4_dnl +m4_dnl +m4_ifelse(__CODE_STYLE(), +   erlang, __WEAPON_USE_ERLANG_STYLE(), +   __CODE_STYLE, json, __WEAPON_USE_JSON_STYLE())m4_dnl | 


