mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 12:01:06 +01:00
Added on_save_effect support for mobs
This commit is contained in:
parent
e806d5f3ce
commit
63b2da7aa0
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue