From ddf690bcd304ea7e6c672060a809a164984462db Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Tue, 21 Nov 2023 21:48:48 -0500 Subject: [PATCH] Default to table instead of boolean in global variables --- init.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 963a8b2..2963f59 100644 --- a/init.lua +++ b/init.lua @@ -16,13 +16,13 @@ License along with this library; if not, write to juraj.vajda@gmail.com --]] -minetest = minetest.global_exists('minetest') and minetest --[[@as Minetest]] -ItemStack = minetest.global_exists('ItemStack') and ItemStack --[[@as ItemStack]] -vector = minetest.global_exists('vector') and vector --[[@as Vector]] -default = minetest.global_exists('default') and default --[[@as MtgDefault]] -sfinv = minetest.global_exists('sfinv') and sfinv --[[@as Sfinv]] -unified_inventory = minetest.global_exists('unified_inventory') and unified_inventory --[[@as UnifiedInventory]] -player_api = minetest.global_exists('player_api') and player_api --[[@as MtgPlayerApi]] +minetest = minetest.global_exists('minetest') and minetest or {} --[[@as Minetest]] +ItemStack = minetest.global_exists('ItemStack') and ItemStack or {} --[[@as ItemStack]] +vector = minetest.global_exists('vector') and vector or {} --[[@as Vector]] +default = minetest.global_exists('default') and default or {} --[[@as MtgDefault]] +sfinv = minetest.global_exists('sfinv') and sfinv or {} --[[@as Sfinv]] +unified_inventory = minetest.global_exists('unified_inventory') and unified_inventory or {} --[[@as UnifiedInventory]] +player_api = minetest.global_exists('player_api') and player_api or {} --[[@as MtgPlayerApi]] math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9))--[[@as number]] )