diff --git a/macrovision.js b/macrovision.js index b8a76385..cf023d7b 100644 --- a/macrovision.js +++ b/macrovision.js @@ -645,6 +645,15 @@ function updateInfo() { } } + + if (selectedEntity.currentView.energyIntake && prevSelectedEntity.currentView.energyValue) { + const consumeCount = math.divide(selectedEntity.currentView.energyIntake, prevSelectedEntity.currentView.energyValue); + console.log(consumeCount); + if (consumeCount > 0.1) { + text += selectedEntity.name + " needs to eat " + math.format(consumeCount, { precision: 1 }) + " of " + prevSelectedEntity.name + " per day" + "\n" + } + + } } } @@ -1330,7 +1339,7 @@ function makeEntity(info, views, sizes, forms = {}) { } if (config.autoCaloricValue && view.attributes.weight !== undefined && view.attributes.energyWorth === undefined) { - view.attributes.energyNeed = { + view.attributes.energyValue = { name: "Caloric Value", power: 3, type: "energy",