Add APIs to sandbox env

This commit is contained in:
Robert Miles 2018-07-23 16:11:02 -04:00
parent 58f82fec83
commit fbf54ffb87
1 changed files with 6 additions and 1 deletions

View File

@ -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()