[mob_bear] init.lua: Use check for modpath "factions" before referencing
global variable "factions".
This commit is contained in:
parent
66c0cb3741
commit
57b7fd0909
@ -200,9 +200,11 @@ mobf_spawner_register("bear_spawner_1",bear_name,
|
||||
collisionbox = selectionbox_bear
|
||||
})
|
||||
|
||||
if factions~= nil and
|
||||
type(factions.set_base_reputation) == "function" then
|
||||
factions.set_base_reputation("bears","players",-25)
|
||||
local FACTIONSDIR = minetest.get_modpath("factions")
|
||||
if FACTIONSDIR then
|
||||
if factions~= nil and type(factions.set_base_reputation) == "function" then
|
||||
factions.set_base_reputation("bears","players",-25)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.log("action","\tadding mob "..bear_prototype.name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user