Temp is depleted logic

This commit is contained in:
Jonathan
2025-06-22 18:46:51 -04:00
parent 826717c47f
commit 1bc78306b8
6 changed files with 37 additions and 49 deletions
+3 -4
View File
@@ -12,13 +12,12 @@ public class EntityHarvestModel : IEntityPartInterface
public int TotalAmount { get; set; }
public bool RequiresWorker { get; set; }
public float StartedAt { get; set; }
public bool IsDepleted(float interval)
public bool IsDepleted(float interval, float startedAt)
{
var lifeTime = interval - StartedAt;
var lifeTime = interval - startedAt;
var totalHarvested = (lifeTime - 1) * HarvestedPerInterval;
var totalHarvested = lifeTime * HarvestedPerInterval;
return totalHarvested > TotalAmount;
}