diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index 90516c0..e579dfa 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -522,50 +522,32 @@ local function create_environment(pos, mem, event, itbl, send_warning) find = safe_string_find, split = safe_string_split, }, - math = { - abs = math.abs, - acos = math.acos, - asin = math.asin, - atan = math.atan, - atan2 = math.atan2, - ceil = math.ceil, - cos = math.cos, - cosh = math.cosh, - deg = math.deg, - exp = math.exp, - floor = math.floor, - fmod = math.fmod, - frexp = math.frexp, - huge = math.huge, - ldexp = math.ldexp, - log = math.log, - log10 = math.log10, - max = math.max, - min = math.min, - modf = math.modf, - pi = math.pi, - pow = math.pow, - rad = math.rad, - random = math.random, - sin = math.sin, - sinh = math.sinh, - sqrt = math.sqrt, - tan = math.tan, - tanh = math.tanh, - }, - table = { - concat = table.concat, - insert = table.insert, - maxn = table.maxn, - remove = table.remove, - sort = table.sort, - }, + math = table.copy(math), + table = table.copy(table), os = { clock = os.clock, difftime = os.difftime, time = os.time, datetable = safe_date, }, + dump2 = dump2, + dump = dump, + minetest = { + --wrap_text = minetest.wrap_text, + pos_to_string = minetest.pos_to_string, + string_to_pos = minetest.string_to_pos, + string_to_area = minetest.string_to_area, + formspec_escape = minetest.formspec_escape, + is_yes = minetest.is_yes, + is_nan = minetest.is_nan, + get_us_time = minetest.get_us_time, + parse_json = minetest.parse_json, + write_json = minetest.write_json, + rgba = minetest.rgba, + encode_base64 = minetest.encode_base64, + decode_base64 = minetest.decode_base64, + }, + vector = table.copy(vector), } env._G = env