Fixed lastproduce initialization for grass. (#24339)

This commit is contained in:
Charlie Nolan
2024-03-06 14:32:30 +00:00
committed by GitHub
parent d6f7046e2e
commit df8e93b432
+2 -2
View File
@@ -152,7 +152,7 @@
if(myseed && !dead)
// Advance age
age++
if(age < myseed.maturation)
if(age <= myseed.maturation)
lastproduce = age
needs_update = 1
@@ -227,7 +227,7 @@
adjustHealth(-rand(1,5) / rating)
// Harvest code
if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead))
if(age > myseed.production && (age - lastproduce) >= myseed.production && (!harvest && !dead))
nutrimentMutation()
if(myseed && myseed.yield != -1) // Unharvestable shouldn't be harvested
harvest = TRUE