Default to table instead of boolean in global variables

This commit is contained in:
Juraj Vajda 2023-11-21 21:48:48 -05:00
parent cc5afc5bd7
commit ddf690bcd3

View File

@ -16,13 +16,13 @@
License along with this library; if not, write to juraj.vajda@gmail.com License along with this library; if not, write to juraj.vajda@gmail.com
--]] --]]
minetest = minetest.global_exists('minetest') and minetest --[[@as Minetest]] minetest = minetest.global_exists('minetest') and minetest or {} --[[@as Minetest]]
ItemStack = minetest.global_exists('ItemStack') and ItemStack --[[@as ItemStack]] ItemStack = minetest.global_exists('ItemStack') and ItemStack or {} --[[@as ItemStack]]
vector = minetest.global_exists('vector') and vector --[[@as Vector]] vector = minetest.global_exists('vector') and vector or {} --[[@as Vector]]
default = minetest.global_exists('default') and default --[[@as MtgDefault]] default = minetest.global_exists('default') and default or {} --[[@as MtgDefault]]
sfinv = minetest.global_exists('sfinv') and sfinv --[[@as Sfinv]] sfinv = minetest.global_exists('sfinv') and sfinv or {} --[[@as Sfinv]]
unified_inventory = minetest.global_exists('unified_inventory') and unified_inventory --[[@as UnifiedInventory]] unified_inventory = minetest.global_exists('unified_inventory') and unified_inventory or {} --[[@as UnifiedInventory]]
player_api = minetest.global_exists('player_api') and player_api --[[@as MtgPlayerApi]] 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]] ) math.randomseed(tonumber(tostring(os.time()):reverse():sub(1, 9))--[[@as number]] )