Added on_save_effect support for mobs
parent
641c3bee79
commit
7491ef5d44
|
@ -109,6 +109,12 @@ function mob_class:get_staticdata()
|
||||||
end
|
end
|
||||||
|
|
||||||
tmp._mcl_potions = self._mcl_potions
|
tmp._mcl_potions = self._mcl_potions
|
||||||
|
if tmp._mcl_potions then
|
||||||
|
for name_raw, data in pairs(tmp._mcl_potions) do
|
||||||
|
local def = mcl_potions.registered_effects[name_raw:match("^_EF_(.+)$")]
|
||||||
|
if def and def.on_save_effect then def.on_save_effect(self.object) end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return minetest.serialize(tmp)
|
return minetest.serialize(tmp)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue