Files
fc/server/tools/gen_data/cfg/subtitle_data.erl
T
2026-05-23 22:10:14 +08:00

52 lines
2.3 KiB
Erlang

%%----------------------------------------------------
%% 数据配置文件
%% @author
%%----------------------------------------------------
-module(subtitle_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = subtitle_data
,lua_name = subtitle_data
,desc = "弹幕配置数据"
,source = "subtitle_data.xml"
,target = "subtitle_data.erl"
,inc = []
,callback = [
{list, cb_fun, handle, {list, ["DATA"]}}
,{get, cb_fun, handle, {get_record, ["DATA"], id, new_map, all}}
]
,callback_cli = [
{list, cb_fun_lua, handle, {key_val, [ "DATA"], [id], all}}
,{system, cb_fun_lua, handle, {type_val, [ "随机字幕"], [id], [msg]}}
,{const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
]
,callback_json = [
{list, cb_fun_json, handle, {key_val, [ "DATA"], [id], all}}
,{system, cb_fun_json, handle, {type_val, [ "随机字幕"], [id], [msg]}}
,{const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
]
,sheet = [
{["DATA"], [
#f_column{type = int, name = id, desc = "ID", primary = true, mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = term, name = loss, desc = "消耗", mod = all}
,#f_column{type = int, name = msg_len, desc = "最大字数", mod = all}
,#f_column{type = int, name = save_len, desc = "保存数量", mod = all}
,#f_column{type = int, name = is_cross, desc = "是否跨服", val = 0}
]}
,{["随机字幕"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = bstr, name = msg, desc = "内容", mod = all}
]}
,{["常量配置"], [
#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 = client}
]}
]
}.