1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-25 18:20:20 +01:00

added 0.4.13 compatible global check

This commit is contained in:
TenPlus1 2016-08-17 20:58:35 +01:00
parent e2f9bbe89f
commit cfe8562c7a

14
api.lua
View File

@ -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")