Files
fc/server/tools/gen_data/cfg/training_camp_data.erl
T

86 lines
4.7 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 数据配置文件
%% @author linguohui
%%----------------------------------------------------
-module(training_camp_data).
-export([cfg/0
,get/1
]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = training_camp_data
,lua_name = training_camp_data
,js_name = training_camp_data
,desc = "配置数据"
,source = "training_camp_data.xml"
,target = "training_camp_data.erl"
,splitv = 1
,head_rows = 1
,inc = []
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get_low_level, cb_fun, handle, {tuple_list, ["训练营关卡"], [id, type]}}
,{get_unlock_id, cb_fun, handle, {get_tuple, ["训练营关卡"], id, unlock}}
,{get_formation_type, cb_fun, handle, {get_tuple, ["训练营关卡"], id, [flag, formation]}}
,{get_ban_pos, cb_fun, handle, {get_tuple, ["训练营关卡"], id, ban_pos}}
,{{get_required_partner, undefined}, cb_fun, handle, {get_tuple, ["训练营关卡"], id, required_partner}}
,{get_partner, cb_fun, handle, {get_tuple, ["训练营关卡"], id, partner_id}}
,{get_defend_id, cb_fun, handle, {get_tuple, ["训练营关卡"], id, target_id}}
,{get_reward, cb_fun, handle, {get_tuple, ["训练营关卡"], id, reward}}
,{get_name, cb_fun, handle, {get_tuple, ["训练营关卡"], id, name}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
,{info, cb_fun_lua, handle, {key_val, ["训练营关卡"], [id], all}}
,{city_tips, cb_fun_lua, handle, {key_val, ["主城小助手气泡语句"], [id], all}}
,{camp_tips, cb_fun_lua, handle, {key_val, ["看板娘气泡语句"], [id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{info, cb_fun_json, handle, {key_val, ["训练营关卡"], [id], all}}
,{city_tips, cb_fun_json, handle, {key_val, ["主城小助手气泡语句"], [id], all}}
,{camp_tips, cb_fun_json, handle, {key_val, ["看板娘气泡语句"], [id], all}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = key, desc = "", primary = true, mod = all}
,#f_column{type = term, name = val, desc = "", add_list_sign=false, mod = all}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
,{["训练营关卡"], [
#f_column{type = int, name = id, desc = "关卡唯一id", mod = all}
,#f_column{type = int, name = target_id, desc = "关卡目标怪物id", mod = all}
,#f_column{type = term, name = partner_id, desc = "可选的英雄id", mod = all, val = "[]"}
,#f_column{type = term, name = required_partner, desc = "必选英雄和站位", mod = all}
,#f_column{type = kv, kv_type = bool, name = flag, desc = "是否可换阵法", mod = all}
,#f_column{type = int, name = formation, desc = "阵法类型(不可换阵法时填)", mod = all, val = 0}
,#f_column{type = term, name = ban_pos, desc = "禁止位置", mod = all, val = "[]"}
,#f_column{type = term, name = unlock, desc = "解锁关卡", mod = all, val = "[]"}
,#f_column{type = term, name = reward, desc = "通关奖励", mod = all}
,#f_column{type = str, name = name, desc = "关卡名称", mod = all}
,#f_column{type = str, name = desc, desc = "关卡简介", mod = all}
,#f_column{type = str, name = message, desc = "详细信息", mod = all}
,#f_column{type = str, name = tips, desc = "关卡通关提示语", mod = all}
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "进阶类型", mod = all}
]}
,{["主城小助手气泡语句"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
,{["看板娘气泡语句"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
]
}.
get(type) ->
[
{"初阶", 1}
,{"进阶", 2}
];
get(_) ->
[].