From 6e636ad27d58f67e0c5f6b55aa9902a4f3fcec4e Mon Sep 17 00:00:00 2001 From: sayterdarkwynd Date: Mon, 28 Jan 2019 20:30:16 -0500 Subject: [PATCH] moar fix --- stats/effects/regeneration/lightregenfloran.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stats/effects/regeneration/lightregenfloran.lua b/stats/effects/regeneration/lightregenfloran.lua index 33dfac0c..dfd565a9 100644 --- a/stats/effects/regeneration/lightregenfloran.lua +++ b/stats/effects/regeneration/lightregenfloran.lua @@ -106,15 +106,16 @@ function update(dt) status.clearPersistentEffects("hungerBoost") end - -- when the sun is out, florans regenerate food + -- when the sun is out, florans regenerate food + if not world.entityType(entity.id()) == "npc" then if (hungerLevel < hungerMax) and ( self.tickTimer <= 0 ) then self.tickTimer = self.tickTime adjustedHunger = hungerLevel + (hungerLevel * 0.008) - if not world.entityType(entity.id()) == "npc" then + status.setResource("food", adjustedHunger) - end + end - + end -- When it is sunny and they are well fed, florans regenerate if hungerLevel >= 28 then -- 28 is 40% of 70, which is the maxFood value if underground and lightLevel < 60 then -- we cant do it well underground