%%%------------------------------------------------------------------- %%% @author Administrator %%% @copyright (C) 2023, %%% @doc %%% %%% @end %%% Created : 08. 5月 2023 17:08 %%%------------------------------------------------------------------- -module(homeland_data). -author("Administrator"). %% API -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = homeland_data ,lua_name = homeland_data ,desc = "家园数据" ,source = "homeland_data.xml" ,target = "homeland_data.erl" ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量"], "get_const(~ts) -> ~ts; %% ~ts", [limit, val, desc]}}, {get, cb_fun, handle, {get_tuple, ["各时段掉落"], id, [pos, rand_list]}}, {is_default_theme, cb_fun, handle, {get_tuple, ["主题配置"], is_default, theme_id}}, {get_theme_by_res, cb_fun, handle, {get_tuple, ["主题配置"], theme_icon, theme_id}} ] ,callback_cli = [ {const, cb_fun_lua, handle, {key_val, ["常量"], key, [limit, val, desc]}}, {theme_data, cb_fun_lua, handle, {key_val, [ "主题配置"], [theme_id], all}} ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, ["常量"], key, [limit, val, desc]}}, {theme_data, cb_fun_json, handle, {key_val, [ "主题配置"], [theme_id], all}} ] ,sheet = [ {["常量"], [ #f_column{type = atom, name = key, desc = "字段", primary = true, mod = all} ,#f_column{type = atom, name = limit, desc = "限制条件", add_list_sign=false, mod = all} ,#f_column{type = int, name = val, desc = "数值", add_list_sign=false, mod = all} ,#f_column{type = str, name = desc, desc = "家园开放条件", mod = all} ]} ,{["各时段掉落"], [ #f_column{desc = "掉落id", type = int, name = id, primary = true, mod = server} , #f_column{desc = "奖励掉落概率", type = int, name = pos, mod = server} , #f_column{desc = "奖励{道具id,数量,权重}", type = term, name = rand_list, mod = server} , #f_column{desc = "描述", type = str, name = desc, mod = server} ] } , {["主题配置"], [ #f_column{type = int, name = theme_id, desc = "主题ID", mod = all} , #f_column{type = bstr, name = name, desc = "名称", mod = all} , #f_column{type = bstr, name = theme_res_id, desc = "主题资源id", mod = client} ,#f_column{type = kv, name = is_default, desc = "是否默认主题", kv_type = bool, mod = server} ,#f_column{type = int, name = theme_icon, desc = "主题图标", mod = all} ]} ] }.