diff --git a/Zframework/toolfunc.lua b/Zframework/toolfunc.lua index 006434f2..ecbb0fdb 100644 --- a/Zframework/toolfunc.lua +++ b/Zframework/toolfunc.lua @@ -23,6 +23,7 @@ do--LOADLIB local success,message=require(libName[system]) if success then LOG.print(name.." load successfully","warn",color.green) + return success else LOG.print("Cannot load "..name..": "..message,"warn",color.red) end @@ -54,7 +55,7 @@ do--LOADLIB return end LOG.print(name.." load successfully","warn",color.green) - libFunc() + return libFunc() else LOG.print("No "..name.." for "..system,"warn",color.red) return diff --git a/parts/ai.lua b/parts/ai.lua index bfbafc42..61c05567 100644 --- a/parts/ai.lua +++ b/parts/ai.lua @@ -16,7 +16,8 @@ local Timer=love.timer.getTime local blockPos={4,4,4,4,4,5,4} local scs={{0,1},{0,1},{0,1},{0,1},{0,1},{.5,.5},{-.5,1.5}} -------------------------------------------------Cold clear -if LOADLIB("CC")then +cc=LOADLIB("CC") +if cc then local CCblockID={6,5,4,3,2,1,0} CC={ getConf= cc.get_default_config ,--()options,weights