Added on_save_effect support for mobs
This commit is contained in:
parent
e806d5f3ce
commit
63b2da7aa0
@ -109,6 +109,12 @@ function mob_class:get_staticdata()
|
||||
end
|
||||
|
||||
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)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user