Mobs: Don't set gotten in API anymore

This commit is contained in:
Wuzzy 2019-09-10 17:14:34 +02:00
parent 9416305fa6
commit 44bd5dba6c
2 changed files with 4 additions and 9 deletions

View File

@ -1142,11 +1142,6 @@ local replace = function(self, pos)
minetest.set_node(pos, {name = with}) minetest.set_node(pos, {name = with})
end end
-- 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
@ -3780,8 +3775,6 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
self.horny = true self.horny = true
end end
self.gotten = false
if tame then if tame then
self.tamed = true self.tamed = true

View File

@ -303,8 +303,10 @@ for each mob.
'self.child_texture' contains mob child texture when growing up 'self.child_texture' contains mob child texture when growing up
'self.base_texture' contains current skin texture which was randomly 'self.base_texture' contains current skin texture which was randomly
selected from textures list selected from textures list
'self.gotten' this is used for obtaining milk from cow and wool from 'self.gotten' this is used to track whether some special item has been
sheep gotten from the mob, for example, wool from sheep.
Initialized as false, and the mob must set this value
manually.
'self.horny' when animal fed enough it is set to true and animal can 'self.horny' when animal fed enough it is set to true and animal can
breed with same animal breed with same animal
'self.hornytimer' background timer that controls breeding functions and 'self.hornytimer' background timer that controls breeding functions and