| @@ -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) { | if (config.autoCaloricValue && view.attributes.weight !== undefined && view.attributes.energyWorth === undefined) { | ||||
| view.attributes.energyNeed = { | |||||
| view.attributes.energyValue = { | |||||
| name: "Caloric Value", | name: "Caloric Value", | ||||
| power: 3, | power: 3, | ||||
| type: "energy", | type: "energy", | ||||