def init_lua
if @options[:disable_lua].nil?
begin
@options[:disable_lua] ||= DISABLE_LUA
lua_max_lines = @options[:lua_max_lines] || 1000000
lua_max_calls = @options[:lua_max_calls] || 20000
unless @options[:disable_lua]
@options[:luabridge] = Lua::State.new
@options[:luabridge].eval(File.read(File.join(File.expand_path(File.dirname(__FILE__)), "lua", "luawrapper.lua")))
@options[:luabridge].eval("wrap = make_wrapper(#{lua_max_lines},#{lua_max_calls})")
end
rescue
@options[:disable_lua] = true
end
end
end