The Stage of Starlight is Forever!!!
CGSS剧情文本及AI汉化于灰姑娘女孩中文维基逐步提交,发现问题请联络Legend frog(留言)
欢迎各位灰姑娘制作人加入交流群:327967793
The Stage of Starlight is Forever!!!CGSS剧情文本及AI汉化于灰姑娘女孩中文维基逐步提交,发现问题请联络Legend frog(留言)欢迎各位灰姑娘制作人加入交流群:327967793
模块:HooksHandler
此模块的文档可以在模块:HooksHandler/doc创建
local module = {}
function module.init()
local hooks = {}
local hookTrigger = function (name, ...)
if not hooks[name] then return ... end
local args = {...}
for _, func in ipairs(hooks[name]) do
if type(func) == 'function' then
local retn = {func(unpack(args))}
if #retn > 0 then
for idx, val in ipairs(retn) do
args[idx] = val
end
end
end
end
return unpack(args)
end
return function (list)
for name, func in pairs(list) do
if type(func) == 'function' then
hooks[name] = hooks[name] or {}
table.insert(hooks[name], func)
end
end
return hookTrigger
end
end
return module