整理代码

This commit is contained in:
MrZ_26
2024-11-03 01:51:46 +08:00
parent 59903397a7
commit 35aacc1a3e
4 changed files with 15 additions and 31 deletions

View File

@@ -4,15 +4,7 @@ NONE={}function NULL() end PAPER=love.graphics.newCanvas(1,1)
EDITING="" EDITING=""
LOADED=false LOADED=false
--[[ ---@type 'Windows'|'Android'|'Linux'|'iOS'|'macOS'|'Web'
Available SYSTEM values:
Android
iOS
Linux
macOS
Web
Windows
]]--
SYSTEM=love.system.getOS() SYSTEM=love.system.getOS()
WEB_COMPAT_MODE=false WEB_COMPAT_MODE=false
if SYSTEM=='OS X' then if SYSTEM=='OS X' then

View File

@@ -1,7 +1,6 @@
local __requestQueue={} local __requestQueue={}
local _requestCount=0 local _requestCount=0
local _Request= local _Request={
{
command="", command="",
currentTime=0, currentTime=0,
timeOut=2, timeOut=2,
@@ -29,8 +28,7 @@ function JS.stringFunc(str,...)
return str return str
end end
--The call will store in the webDB the return value from the function passed --The call will store in the webDB the return value from the function passed it timeouts
--it timeouts
local function retrieveJS(funcToCall,filename) local function retrieveJS(funcToCall,filename)
--Used for retrieveData function --Used for retrieveData function
JS.callJS(("FS.writeFile('%s/%s',%s);"):format(love.filesystem.getSaveDirectory(),filename,funcToCall)) JS.callJS(("FS.writeFile('%s/%s',%s);"):format(love.filesystem.getSaveDirectory(),filename,funcToCall))
@@ -139,10 +137,6 @@ JS.setDefaultErrorFunction(function(id,error)
end) end)
JS.callJS(JS.stringFunc( JS.callJS(JS.stringFunc("__getWebDB("%s");","__LuaJSDB"))
[[
__getWebDB("%s");
]]
, "__LuaJSDB"))
return JS return JS

View File

@@ -1,7 +1,5 @@
if SYSTEM=='Web' then if SYSTEM=='Web' then
return { return {update=NULL}
update=NULL
}
end end
local appId='1288557386700951554' local appId='1288557386700951554'