mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add minetest.global_exists()
This commit is contained in:
parent
943c6e523e
commit
436cb468e9
2 changed files with 9 additions and 1 deletions
|
@ -4,6 +4,11 @@
|
|||
local WARN_INIT = false
|
||||
|
||||
|
||||
function core.global_exists(name)
|
||||
return rawget(_G, name) ~= nil
|
||||
end
|
||||
|
||||
|
||||
local function warn(message)
|
||||
print(os.date("%H:%M:%S: WARNING: ")..message)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue