Add APIs to sandbox env
This commit is contained in:
parent
58f82fec83
commit
fbf54ffb87
|
@ -2,8 +2,13 @@ _G.CONFIG = require("conf").properties
|
|||
local log = require("log")
|
||||
_G.pal = require("palette").getPalette("CADE-15")
|
||||
local getSandboxEnv = require("sandbox")
|
||||
local api = require("api")
|
||||
function sandbox(f)
|
||||
setfenv(f,getSandboxEnv())
|
||||
local glob = getSandboxEnv()
|
||||
for k,v in pairs(api) do
|
||||
glob[k]=v
|
||||
end
|
||||
setfenv(f,glob)
|
||||
end
|
||||
function love.load()
|
||||
require("cindy").applyPatch()
|
||||
|
|
Loading…
Reference in New Issue