代码拉取完成,页面将自动刷新
同步操作将从 幸福的闪电/PathOfBuildingCN17173 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#@
-- This wrapper allows the program to run headless on any OS (in theory)
-- It can be run using a standard lua interpreter, although LuaJIT is preferable
-- Callbacks
local callbackTable = { }
local mainObject
local function runCallback(name, ...)
if callbackTable[name] then
return callbackTable[name](...)
elseif mainObject and mainObject[name] then
return mainObject[name](mainObject, ...)
end
end
function SetCallback(name, func)
callbackTable[name] = func
end
function GetCallback(name)
return callbackTable[name]
end
function SetMainObject(obj)
mainObject = obj
end
-- Image Handles
local imageHandleClass = { }
imageHandleClass.__index = imageHandleClass
function NewImageHandle()
return setmetatable({ }, imageHandleClass)
end
function imageHandleClass:Load(fileName, ...)
self.valid = true
end
function imageHandleClass:Unload()
self.valid = false
end
function imageHandleClass:IsValid()
return self.valid
end
function imageHandleClass:SetLoadingPriority(pri) end
function imageHandleClass:ImageSize()
return 1, 1
end
-- Rendering
function RenderInit() end
function GetScreenSize()
return 1920, 1080
end
function SetClearColor(r, g, b, a) end
function SetDrawLayer(layer, subLayer) end
function SetViewport(x, y, width, height) end
function SetDrawColor(r, g, b, a) end
function DrawImage(imgHandle, left, top, width, height, tcLeft, tcTop, tcRight, tcBottom) end
function DrawImageQuad(imageHandle, x1, y1, x2, y2, x3, y3, x4, y4, s1, t1, s2, t2, s3, t3, s4, t4) end
function DrawString(left, top, align, height, font, text) end
function DrawStringWidth(height, font, text)
return 1
end
function DrawStringCursorIndex(height, font, text, cursorX, cursorY)
return 0
end
function StripEscapes(text)
return text:gsub("^%d",""):gsub("^x%x%x%x%x%x%x","")
end
function GetAsyncCount()
return 0
end
-- Search Handles
function NewFileSearch() end
-- General Functions
function SetWindowTitle(title) end
function GetCursorPos()
return 0, 0
end
function SetCursorPos(x, y) end
function ShowCursor(doShow) end
function IsKeyDown(keyName) end
function Copy(text) end
function Paste() end
function Deflate(data)
-- TODO: Might need this
return ""
end
function Inflate(data)
-- TODO: And this
return ""
end
function GetTime()
return 0
end
function GetScriptPath()
return ""
end
function GetRuntimePath()
return ""
end
function GetUserPath()
return ""
end
function MakeDir(path) end
function RemoveDir(path) end
function SetWorkDir(path) end
function GetWorkDir()
return ""
end
function LaunchSubScript(scriptText, funcList, subList, ...) end
function AbortSubScript(ssID) end
function IsSubScriptRunning(ssID) end
function LoadModule(fileName, ...)
if not fileName:match("%.lua") then
fileName = fileName .. ".lua"
end
local func, err = loadfile(fileName)
if func then
return func(...)
else
error("LoadModule() error loading '"..fileName.."': "..err)
end
end
function PLoadModule(fileName, ...)
if not fileName:match("%.lua") then
fileName = fileName .. ".lua"
end
local func, err = loadfile(fileName)
if func then
return PCall(func, ...)
else
error("PLoadModule() error loading '"..fileName.."': "..err)
end
end
function PCall(func, ...)
local ret = { pcall(func, ...) }
if ret[1] then
table.remove(ret, 1)
return nil, unpack(ret)
else
return ret[2]
end
end
function ConPrintf(fmt, ...)
-- Optional
--print(string.format(fmt, ...))
end
function ConPrintTable(tbl, noRecurse) end
function ConExecute(cmd) end
function ConClear() end
function SpawnProcess(cmdName, args) end
function OpenURL(url) end
function SetProfiling(isEnabled) end
function Restart() end
function Exit() end
local l_require = require
function require(name)
-- Hack to stop it looking for lcurl, which we don't really need
if name == "lcurl.safe" then
return
end
return l_require(name)
end
dofile("Launch.lua")
runCallback("OnInit")
runCallback("OnFrame") -- Need at least one frame for everything to initialise
if mainObject.promptMsg then
-- Something went wrong during startup
print(mainObject.promptMsg)
io.read("*l")
return
end
-- The build module; once a build is loaded, you can find all the good stuff in here
local build = mainObject.main.modes["BUILD"]
-- Here's some helpful helper functions to help you get started
local function newBuild()
mainObject.main:SetMode("BUILD", false, "Help, I'm stuck in Path of Building!")
runCallback("OnFrame")
end
local function loadBuildFromXML(xmlText)
mainObject.main:SetMode("BUILD", false, "", xmlText)
runCallback("OnFrame")
end
local function loadBuildFromJSON(getItemsJSON, getPassiveSkillsJSON)
mainObject.main:SetMode("BUILD", false, "")
runCallback("OnFrame")
local charData = build.importTab:ImportItemsAndSkills(getItemsJSON)
build.importTab:ImportPassiveTreeAndJewels(getPassiveSkillsJSON, charData)
-- You now have a build without a correct main skill selected, or any configuration options set
-- Good luck!
end
-- Now you can mess around!
-- Probably optional
runCallback("OnExit")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。