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 { id = <<"$1">>, name = <<"$2">>, is_primary = $3, range_min = $4, range_max = $5, omnimods = __OMNIMODS($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", "pri": $3, "rmi": $4, "rma": $5, "omni": __OMNIMODS($6, $7, $8) }, ')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