mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-26 00:50:21 +01:00
only show breed infotext if mob can breed
This commit is contained in:
parent
457eb1838c
commit
e8adf9b244
4
api.lua
4
api.lua
@ -11,7 +11,7 @@ local use_mc2 = minetest.get_modpath("mcl_core")
|
|||||||
-- Global
|
-- Global
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20231008",
|
version = "20231011",
|
||||||
translate = S,
|
translate = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {},
|
invis = minetest.global_exists("invisibility") and invisibility or {},
|
||||||
node_snow = minetest.registered_aliases["mapgen_snow"]
|
node_snow = minetest.registered_aliases["mapgen_snow"]
|
||||||
@ -4708,7 +4708,7 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
|||||||
|
|
||||||
-- feed and tame
|
-- feed and tame
|
||||||
self.food = (self.food or 0) + 1
|
self.food = (self.food or 0) + 1
|
||||||
self._breed_countdown = feed_count - self.food
|
self._breed_countdown = breed and (feed_count - self.food)
|
||||||
|
|
||||||
if self.food >= feed_count then
|
if self.food >= feed_count then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user