Skip to content

Commit

Permalink
Bugfix: possible NaN bug in energy consumption (need to look into thi…
Browse files Browse the repository at this point in the history
…s further re: energy_usage vs max_energy_usage)
  • Loading branch information
DanielKote committed Mar 8, 2023
1 parent 3022f6e commit ef44a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Foreman/DataCache/DataCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ private void EntityEnergyFurtherProcessing(JToken objJToken, EntityObjectBasePro

case EnergySource.Electric:
entity.EnergyDrain = (double)objJToken["drain"] * 60f; //seconds
entity.EnergyConsumption = (double)objJToken["energy_usage"] * 60f; //seconds
entity.EnergyConsumption = (double)objJToken["max_energy_usage"] * 60f; //seconds
break;

case EnergySource.Void:
Expand Down

0 comments on commit ef44a9c

Please sign in to comment.