forked from VoxeLibre/VoxeLibre
Merge pull request 'Give longer to breed mobs. 1.5s is not enough' (#3298) from extend_breeding_time into master
Reviewed-on: MineClone2/MineClone2#3298 Reviewed-by: Michieal <michieal@noreply.git.minetest.land>
This commit is contained in:
commit
8feefcdd7b
|
@ -1,8 +1,8 @@
|
||||||
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
|
|
||||||
local HORNY_TIME = 30
|
local HORNY_TIME = 30*20
|
||||||
local HORNY_AGAIN_TIME = 300
|
local HORNY_AGAIN_TIME = 30*20 -- was 300 or 15*20
|
||||||
local CHILD_GROW_TIME = 60*20
|
local CHILD_GROW_TIME = 60*20
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false)
|
||||||
|
@ -190,18 +190,16 @@ function mob_class:check_breeding()
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
else
|
||||||
|
-- horny animal can mate for HORNY_TIME seconds,
|
||||||
|
-- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds
|
||||||
|
if self.horny == true then
|
||||||
|
self.hornytimer = self.hornytimer + 1
|
||||||
|
|
||||||
-- horny animal can mate for HORNY_TIME seconds,
|
if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then
|
||||||
-- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds
|
self.hornytimer = 0
|
||||||
if self.horny == true
|
self.horny = false
|
||||||
and self.hornytimer < HORNY_TIME + HORNY_AGAIN_TIME then
|
end
|
||||||
|
|
||||||
self.hornytimer = self.hornytimer + 1
|
|
||||||
|
|
||||||
if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then
|
|
||||||
self.hornytimer = 0
|
|
||||||
self.horny = false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue