mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 10:10:21 +01:00
added 0.4.13 compatible global check
This commit is contained in:
parent
e2f9bbe89f
commit
cfe8562c7a
14
api.lua
14
api.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-- Mobs Api (16th August 2016)
|
-- Mobs Api (17th August 2016)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
@ -28,10 +28,14 @@ mobs.intllib = S
|
|||||||
|
|
||||||
-- Invisibility mod
|
-- Invisibility mod
|
||||||
|
|
||||||
--local invis = {}
|
function check_global(name)
|
||||||
--if minetest.global_exists("invisibility") then
|
return rawget(_G, name) ~= nil
|
||||||
local invis = invisibility
|
end
|
||||||
--end
|
|
||||||
|
local invis = {}
|
||||||
|
if check_global("invisibility") then
|
||||||
|
invis = invisibility
|
||||||
|
end
|
||||||
|
|
||||||
-- Load settings
|
-- Load settings
|
||||||
local damage_enabled = minetest.setting_getbool("enable_damage")
|
local damage_enabled = minetest.setting_getbool("enable_damage")
|
||||||
|
Loading…
Reference in New Issue
Block a user