Удаляем тестовый код для Lua
This commit is contained in:
parent
7a8e366c46
commit
1fdb8d9a10
@ -28,27 +28,6 @@ import java.util.zip.Inflater
|
||||
private val LOGGER = LogManager.getLogger()
|
||||
|
||||
fun main() {
|
||||
if (true) {
|
||||
val lua = LuaState()
|
||||
|
||||
Thread.sleep(4_000L)
|
||||
|
||||
lua.load(File("test.lua").readText())
|
||||
lua.call()
|
||||
|
||||
lua.loadGlobal("printTable")
|
||||
lua.push(GsonBuilder().create().fromJson(File("playerdata.json").reader(), JsonElement::class.java))
|
||||
lua.call(1)
|
||||
|
||||
lua.loadGlobal("test")
|
||||
lua.push("s".repeat(10))
|
||||
lua.call(1)
|
||||
|
||||
Thread.sleep(4_000L)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
val starbound = Starbound()
|
||||
LOGGER.info("Running LWJGL ${Version.getVersion()}")
|
||||
|
||||
|
24
test.lua
24
test.lua
@ -1,24 +0,0 @@
|
||||
|
||||
function printTable(input)
|
||||
if type(input) ~= 'table' then
|
||||
print(input)
|
||||
return
|
||||
end
|
||||
|
||||
for k, v in pairs(input) do
|
||||
if type(v) == 'table' then
|
||||
print(k .. ' = ')
|
||||
printTable(v)
|
||||
else
|
||||
print(k .. ' = ', v, type(v))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function test(...)
|
||||
print('Called test with ' .. select('#', ...) .. ' arguments: ' .. #table.concat({...}, ', '))
|
||||
end
|
||||
|
||||
print(collectgarbage('count') * 1024)
|
||||
--printTable(select(1, ...))
|
||||
--print('hello!')
|
Loading…
Reference in New Issue
Block a user