Temp is depleted logic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user