增加尝试接入CC的代码模板(注释),等待后续修改
This commit is contained in:
@@ -29,18 +29,29 @@ function baseBot.update(bot)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local botMeta={__index=function(self,k)
|
local function undefMethod(self,k)
|
||||||
MES.new('warn',"Undefined method: "..k)
|
print('warn',"Undefined method: "..k)
|
||||||
self[k]=NULL
|
self[k]=NULL
|
||||||
return NULL
|
return NULL
|
||||||
end}
|
end
|
||||||
|
local botMeta={__index=undefMethod}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
new=function(P,data)
|
new=function(P,data)
|
||||||
local bot={P=P}
|
local bot={P=P}
|
||||||
if data.type=="/"then
|
if data.type=="CC"then
|
||||||
--
|
-- local ccBot=require"parts.bot.cc_wrapper"
|
||||||
else
|
-- setmetatable(bot,{__index=function(self,method)
|
||||||
|
-- if ccBot[method]then
|
||||||
|
-- ccBot[method](ccBot)
|
||||||
|
-- elseif baseBot[method]then
|
||||||
|
-- baseBot[method](self)
|
||||||
|
-- else
|
||||||
|
-- undefMethod(self,method)
|
||||||
|
-- end
|
||||||
|
-- end})
|
||||||
|
setmetatable(bot,botMeta)
|
||||||
|
elseif data.type=="9S"or true then--9s or else
|
||||||
TABLE.cover(baseBot,bot)
|
TABLE.cover(baseBot,bot)
|
||||||
TABLE.cover(require"parts.bot.bot_9s",bot)
|
TABLE.cover(require"parts.bot.bot_9s",bot)
|
||||||
bot.P:setRS('TRS')
|
bot.P:setRS('TRS')
|
||||||
|
|||||||
Reference in New Issue
Block a user