Browse Source

Show how many of one entity another needs to eat per day

master
Fen Dweller 4 years ago
parent
commit
c3f9500f77
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      macrovision.js

+ 10
- 1
macrovision.js View File

@@ -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",


Loading…
Cancel
Save