mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 10:10:21 +01:00
remove self.gotten flip when using replace function, use on_replace inside mob def
This commit is contained in:
parent
897f4a547e
commit
51ab54bcfa
9
api.lua
9
api.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user