I want to prevent lua files outside main.lua from accessing the love table. Example:
Code: Select all
-- main.lua
require "test"
Code: Select all
-- test.lua
love.graphics.setColor(1, 1, 1)
-- return error:
--test.lua:1: attempt to index global 'love' (a nil value)
Code: Select all
-- test.lua
print(love) -- return nil
If it is possible to do this, how can I do it?