mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 15:25:56 -04:00
Lua 5.3+ fixes
This commit is contained in:
parent
1c163dd701
commit
c71c1479dd
@ -162,7 +162,7 @@ dependencies {
|
||||
compile 'com.google.code.findbugs:jsr305:1.3.9' // Annotations used by google libs.
|
||||
|
||||
embedded name: 'OC-LuaJ', version: '20220907.1', ext: 'jar'
|
||||
embedded name: 'OC-JNLua', version: '20220928.1', ext: 'jar'
|
||||
embedded name: 'OC-JNLua', version: '20230530.0', ext: 'jar'
|
||||
embedded name: 'OC-JNLua-Natives', version: '20220928.1', ext: 'jar'
|
||||
|
||||
testCompile "org.mockito:mockito-all:1.10.19"
|
||||
|
@ -1,4 +1,8 @@
|
||||
## New Features/Support
|
||||
## Fixes/improvements
|
||||
|
||||
* Reverted Internet Card code to OC 1.7.7, fixing the many related regressions.
|
||||
* Fixed "number expected, got number" being displayed instead of "number has no integer representation" on Lua 5.3+.
|
||||
* Fixed math.randomseed() not working with non-integer values.
|
||||
|
||||
## OpenOS fixes/improvements
|
||||
|
||||
|
@ -893,17 +893,19 @@ sandbox = {
|
||||
acos = math.acos,
|
||||
asin = math.asin,
|
||||
atan = math.atan,
|
||||
atan2 = math.atan2,
|
||||
atan2 = math.atan2 or math.atan, -- Deprecated in Lua 5.3
|
||||
ceil = math.ceil,
|
||||
cos = math.cos,
|
||||
cosh = math.cosh,
|
||||
cosh = math.cosh, -- Deprecated in Lua 5.3
|
||||
deg = math.deg,
|
||||
exp = math.exp,
|
||||
floor = math.floor,
|
||||
fmod = math.fmod,
|
||||
frexp = math.frexp,
|
||||
frexp = math.frexp, -- Deprecated in Lua 5.3
|
||||
huge = math.huge,
|
||||
ldexp = math.ldexp,
|
||||
ldexp = math.ldexp or function(a, e) -- Deprecated in Lua 5.3
|
||||
return a*(2.0^e)
|
||||
end,
|
||||
log = math.log,
|
||||
max = math.max,
|
||||
min = math.min,
|
||||
@ -917,13 +919,14 @@ sandbox = {
|
||||
return spcall(math.random, ...)
|
||||
end,
|
||||
randomseed = function(seed)
|
||||
spcall(math.randomseed, seed)
|
||||
-- math.floor(seed) emulates pre-OC 1.8.0 behaviour
|
||||
spcall(math.randomseed, math.floor(seed))
|
||||
end,
|
||||
sin = math.sin,
|
||||
sinh = math.sinh,
|
||||
sinh = math.sinh, -- Deprecated in Lua 5.3
|
||||
sqrt = math.sqrt,
|
||||
tan = math.tan,
|
||||
tanh = math.tanh,
|
||||
tanh = math.tanh, -- Deprecated in Lua 5.3
|
||||
-- Lua 5.3.
|
||||
maxinteger = math.maxinteger,
|
||||
mininteger = math.mininteger,
|
||||
|
Loading…
x
Reference in New Issue
Block a user