1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-26 02:30:21 +01:00

remove self.gotten flip when using replace function, use on_replace inside mob def

This commit is contained in:
TenPlus1 2018-11-26 17:48:17 +00:00
parent 897f4a547e
commit 51ab54bcfa

View File

@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = { mobs = {
mod = "redo", mod = "redo",
version = "20181102", version = "20181126",
intllib = S, intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}, invis = minetest.global_exists("invisibility") and invisibility or {},
} }
@ -1154,14 +1154,7 @@ local replace = function(self, pos)
end end
if on_replace_return ~= false then if on_replace_return ~= false then
minetest.set_node(pos, {name = with}) minetest.set_node(pos, {name = with})
-- when cow/sheep eats grass, replace wool and milk
if self.gotten == true then
self.gotten = false
self.object:set_properties(self)
end
end end
end end
end end