limit egg lay

master
root 2020-08-24 02:17:01 +02:00
parent aa48c8b4e9
commit 193d92d2bc
1 changed files with 2 additions and 2 deletions

View File

@ -6,10 +6,10 @@ end
--Lay Egg
petz.lay_egg = function(self)
if petz.isinliquid(self) then --do not put eggs when in liquid
if self.eggs_count >= petz.settings.max_laid_eggs then
return
end
if self.eggs_count >= petz.settings.max_laid_eggs then
if petz.isinliquid(self) then --do not put eggs when in liquid
return
end
local pos = self.object:get_pos()