Files

127 lines
9.2 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 数据配置文件
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(home_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = home_data
,lua_name = home_data
,js_name = home_data
,desc = "配置数据"
,source = "home_data.xml"
,target = "home_data.erl"
,inc = ["home.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get, cb_fun, handle, {get_record, ["家具数据"], bid, home_unit_data, all}}
,{{get_soft, "0"}, cb_fun, handle, {get_tuple, ["家具数据"], bid, soft}}
,{{get_set_id, "0"}, cb_fun, handle, {get_tuple, ["家具数据"], bid, set_id}}
,{get_type, cb_fun, handle, {get_tuple, ["家具数据"], bid, type}}
,{{get_set_soft, "0"}, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["套装目标"], "get_set_soft({~ts, Num}) when Num >= ~ts -> ~ts;", [set_id, num, all_soft]}}
,{get_home_look, cb_fun, handle, {get_tuple, ["形象数据"], id, [open_soft, loss]}}
,{is_first_choose, cb_fun, handle, {get_tuple, ["形象数据"], id, is_first}}
,{get_set_reward, cb_fun, handle, {get_tuple, ["主题套装收集进度奖励"], id, [set_id, num, reward]}}
,{{make_home_coin, "0"}, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["家具币产出数据"], "make_home_coin(Soft) when Soft >= ~ts -> ~ts;", [soft, home_coin]}}
,{{get_effect_count, "1"}, cb_fun, handle, {get_tuple, ["家具数据"], bid, effect_count}}
,{open_floor, cb_fun, handle, {get_tuple, ["家园楼层"], id, limit}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量"], key, [val, desc]}}
,{home_unit, cb_fun_lua, handle, {val_str, ["家具数据"], [bid], all}}
,{suit, cb_fun_lua, handle, {key_val, ["家具主题套装"], [set_id], all}}
,{suit_unit, cb_fun_lua, handle, {type_val, ["家具数据"], [set_id], bid}}
,{figure, cb_fun_lua, handle, {key_val, ["形象数据"], [id], all}}
,{suit_award, cb_fun_lua, handle, {type_get_val, ["主题套装收集进度奖励"], [set_id, id], all}}
,{home_coin, cb_fun_lua, handle, {key_val, ["家具币产出数据"], [soft], all}}
,{suit_soft, cb_fun_lua, handle, {type_get_val, ["套装目标"], [set_id, num], all}}
,{role_action, cb_fun_lua, handle, {key_val, ["角色AI行走动作组"], [id], all}}
,{home_storey, cb_fun_lua, handle, {key_val, ["家园楼层"], [id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量"], key, [val, desc]}}
,{home_unit, cb_fun_json, handle, {val_str, ["家具数据"], [bid], all}}
,{suit, cb_fun_json, handle, {key_val, ["家具主题套装"], [set_id], all}}
,{suit_unit, cb_fun_json, handle, {type_val, ["家具数据"], [set_id], bid}}
,{figure, cb_fun_json, handle, {key_val, ["形象数据"], [id], all}}
,{suit_award, cb_fun_json, handle, {type_get_val, ["主题套装收集进度奖励"], [set_id, id], all}}
,{home_coin, cb_fun_json, handle, {key_val, ["家具币产出数据"], [soft], all}}
,{suit_soft, cb_fun_json, handle, {type_get_val, ["套装目标"], [set_id, num], all}}
,{role_action, cb_fun_json, handle, {key_val, ["角色AI行走动作组"], [id], all}}
,{home_storey, 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 = bid, desc = "家具ID", primary = true, mod = all}
,#f_column{type = bstr, name = name, desc = "名字", mod = all}
,#f_column{type = int, name = soft, desc = "舒适度加成", mod = all}
,#f_column{type = int, name = set_id, desc = "所属套装", mod = all}
,#f_column{type = term, name = tile_list_1, desc = "占格子列表1", mod = all, comment = "1方向每个家具占用的相对位置坐标"}
,#f_column{type = term, name = tile_list_2, desc = "占格子列表2", mod = all, comment = "2方向每个家具占用的相对位置坐标"}
,#f_column{type = term, name = offset_1, desc = "坐标偏移值1", mod = client, comment = "1方向每个家具坐标偏移值(客)"}
,#f_column{type = term, name = offset_2, desc = "坐标偏移值2", mod = client, comment = "2方向每个家具坐标偏移值(客)"}
,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"地面设备", 1}, {"墙壁设备", 2}, {"地板", 3}, {"墙壁", 4}, {"地毯", 5}], mod = all}
,#f_column{type = int, name = dir, desc = "点认方向", mod = all, val = 1}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client, comment = "(客)"}
,#f_column{type = bstr, name = res, desc = "资源", mod = client, comment = "(客)"}
,#f_column{type = bstr, name = icon, desc = "UI展示图", mod = client, comment = "(客)"}
,#f_column{type = bstr, name = grid_desc, desc = "占地面积(UI展示)", mod = client, comment = "(客)"}
,#f_column{type = int, name = effect_count, desc = "生效个数上限", mod = all, val = 1}
,#f_column{type = term, name = soruce_id, desc = "来源途径", mod = client}
]}
,{["家具主题套装"], [
#f_column{type = int, name = set_id, desc = "套装ID", mod = all}
,#f_column{type = bstr, name = name, desc = "套装名", mod = all}
,#f_column{type = int, name = num, desc = "套装家具数量", mod = all}
,#f_column{type = bstr, name = res_id, desc = "资源id", mod = client}
,#f_column{type = bstr, name = desc, desc = "描述内容", mod = client}
,#f_column{type = int, name = comfort, desc = "舒适度", mod = client}
,#f_column{type = term, name = preview, desc = "套装预览", mod = client}
]}
,{["主题套装收集进度奖励"], [
#f_column{type = int, name = id, desc = "唯一ID", mod = all}
,#f_column{type = int, name = set_id, desc = "对应套装ID", mod = all}
,#f_column{type = int, name = num, desc = "收集数量", mod = all}
,#f_column{type = term, name = reward, desc = "奖励内容", mod = all}
]}
,{["套装目标"], [
#f_column{type = int, name = set_id, desc = "所属套装", mod = all}
,#f_column{type = bstr, name = name, desc = "目标名", mod = all}
,#f_column{type = int, name = num, desc = "套装家具数量", mod = all}
,#f_column{type = int, name = all_soft, desc = "舒适度加成", mod = all}
]}
,{["形象数据"], [
#f_column{type = int, name = id, desc = "形象ID", primary = true, mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = open_soft, desc = "解锁所需舒适度", val = "0", mod = all}
,#f_column{type = term, name = loss, desc = "解锁消耗",mod = all}
,#f_column{type = bstr, name = ico_id, desc = "头像资源ID", mod = client}
,#f_column{type = bstr, name = look_id, desc = "形象资源ID", mod = client}
,#f_column{type = kv, kv_type = bool, name = is_first, desc = "是否初始可选", mod = all}
,#f_column{type = bstr, name = tips, desc = "Tips", mod = client}
]}
,{["家具币产出数据"], [
#f_column{type = int, name = soft, desc = "舒适度", mod = all}
,#f_column{type = int, name = home_coin, desc = "家园币每小时产量", mod = all}
]}
,{["角色AI行走动作组"], [
#f_column{type = int, name = id, desc = "动作组ID", mod = client}
,#f_column{type = term, name = action, desc = "动作组", mod = client, comment = "待机:idle;移动:move;交互:interaction"}
]}
,{["家园楼层"], [
#f_column{type = int, name = id, desc = "层数", mod = all}
,#f_column{type = term, name = limit, desc = "开启条件", mod = all}
,#f_column{type = term, name = cost, desc = "开启消耗", mod = all}
,#f_column{type = bstr, name = res_id, desc = "建筑背景", mod = client}
]}
]
}.