From 1fdb8d9a104ff7af5ac0be4bad447d13ef1fd9a3 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 23 Feb 2023 09:53:26 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D1=8F=D0=B5=D0=BC=20?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=B4=D0=BB=D1=8F=20Lua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/ru/dbotthepony/kstarbound/Main.kt | 21 ---------------- test.lua | 24 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 test.lua diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/Main.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/Main.kt index d81b8108..6cd850c3 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/Main.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/Main.kt @@ -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()}") diff --git a/test.lua b/test.lua deleted file mode 100644 index b93ee9aa..00000000 --- a/test.lua +++ /dev/null @@ -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!')