From ec9f1575121e3b064b919bca7efddfa8b0fc4e65 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 9 May 2022 18:20:10 +0200 Subject: Use native packer to transfer globals into async env(s) --- builtin/async/game.lua | 3 +-- builtin/game/misc.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'builtin') diff --git a/builtin/async/game.lua b/builtin/async/game.lua index 212a33e17..8cb9720b6 100644 --- a/builtin/async/game.lua +++ b/builtin/async/game.lua @@ -22,8 +22,7 @@ dofile(gamepath .. "voxelarea.lua") -- Transfer of globals do - assert(core.transferred_globals) - local all = core.deserialize(core.transferred_globals, true) + local all = assert(core.transferred_globals) core.transferred_globals = nil -- reassemble other tables diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 9f5e3312b..997b1894a 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -262,5 +262,5 @@ function core.get_globals_to_transfer() registered_items = copy_filtering(core.registered_items), registered_aliases = core.registered_aliases, } - return core.serialize(all) + return all end -- cgit v1.2.3