- mods will extend this, there is nothing really useful that you can do with this if not extended
- assert = unchanged
- error = unchanged
- collectgarbage(arg) = the only valid arg is
count
, may be changed idk - ipairs = unchanged
- pairs = unchanged
- next = unchanged
- select = unchanged
- unpack = basically unchanged...
- pcall = libox.safe.pcall => pcall doesnt catch timeout errors
- xpcall = libox.safe.xpcall => xpcall doesnt catch timeout errors
- tonumber = unchanged
- tostring = unchanged
- type = unchanged
- loadstring(code) = libox.safe.get_loadstring(env) => does the lame sandboxing stuff like limiting environment, turning off JIT optimizations for the function, also you can't provide a chunkname
- _G = points back to the sandbox environment
- traceback = libox.traceback
- byte = unchanged
- char = unchanged
- dump = unchanged
- find = forced to not match patterns
- format = unchanged,
- len = unchanged,
- lower = unchanged,
- rep = changed to not allow creating GIGANTIC strings,
- reverse = unchanged,
- sub = unchanged,
- upper = unchanged,
- trim = unchanged, from minetest
- split = forced to not match patterns, from minetest
- insert = unchanged
- maxn = unchanged
- remove = unchanged
- sort = unchanged
- indexof = unchanged, from minetest
- copy = unchanged, from minetest
- insert_all = unchanged, from minetest
- key_value_swap = unchanged, from minetest
- shuffle = unchanged, from minetest
- move = unchanged, LUAJIT ONLY
- concat = unchanged
-
abs
,acos
,asin
,atan
,atan2
,ceil
,cos
,cosh
,deg
,exp
,floor
, -
fmod
,frexp
,huge
,ldexp
,log
,log10
,max
,min
,modf
,pi
,pow
, -
rad
,random
,sin
,sinh
,sqrt
,tan
,tanh
, -
hypot
,sign
,factorial
,round
- from minetest
- Copied, unchanged
- Copied, removed
vector.metatable
- clock = unchanged,
- datetable = from luacontroller, a date table...,
- difftime = uncahnged,
- time = unchanged,
- date = mooncontroller's safe_date, made to prevent segfaults,
- formspec_escape = unchanged*,
- explode_table_event = unchanged*,
- explode_textlist_event = unchanged*,
- explode_scrollbar_event = unchanged*,
- inventorycube = unchanged*,
- urlencode = unchanged*,
- rgba = unchanged*,
- encode_base64 = unchanged*,
- decode_base64 = unchanged*,
- get_us_time = unchanged*,
* All of theese functions fail when you give them gigantic string inputs
- Pure lua implementations of functions
find
,match
,gmatch
, and they support patterns
dump
dump2
= unchangedPcgRandom
= you are given an interface, whererand_normal_dist
has limited amount of tries and you call the functions by doingmy_random.func
notmy_random:func
PerlinNoise
= Changed to give an interface, call it likemy_perlin.func
notmy_perlin:func
, also the types in the noiseparams are strict, if it detects a type mismatch it will give you 2 values:false
and a string, that string being the faulty element (its shallow)
- Don't be afraid to use userdata, but be afraid where it can get to, it should not be serialized, never.