Browse Source

Fix energy-intake estimation using the wrong id

Also, adds chicken nuggets as a unit of energy
master
Fen Dweller 4 years ago
parent
commit
3968a5ebf1
2 changed files with 22 additions and 1 deletions
  1. +6
    -1
      macrovision.js
  2. +16
    -0
      presets/characters.js

+ 6
- 1
macrovision.js View File

@@ -255,6 +255,10 @@ math.createUnit("foodKilograms", {
definition: "1909 kcal",
prefixes: "long"
})
math.createUnit("chickenNuggets", {
definition: "42 kcal",
prefixes: "long"
})
math.createUnit("peopleEaten", {
definition: "125000 kcal",
prefixes: "long"
@@ -484,6 +488,7 @@ const unitChoices = {
"foodPounds"
],
"relative": [
"chickenNuggets",
"peopleEaten",
"villagesEaten",
"townsEaten",
@@ -1339,7 +1344,7 @@ function makeEntity(info, views, sizes, forms = {}) {
}
}

if (config.autoFoodIntake && view.attributes.weight !== undefined && view.attributes.energyNeed === undefined) {
if (config.autoFoodIntake && view.attributes.weight !== undefined && view.attributes.energyIntake === undefined) {
view.attributes.energyIntake = {
name: "Food Intake",
power: 3,


+ 16
- 0
presets/characters.js View File

@@ -18682,6 +18682,14 @@ characterMakers.push(() => makeCharacter(
source: "./media/characters/adinia/front.svg",
extra: 1767/1641,
bottom: 44/1811
},
extraAttributes: {
"energyIntake": {
name: "Energy Intake",
power: 3,
type: "energy",
base: math.unit(2000 * 5 * 1200 / 150, "kcal")
},
}
},
back: {
@@ -18692,6 +18700,14 @@ characterMakers.push(() => makeCharacter(
source: "./media/characters/adinia/back.svg",
extra: 1834/1684,
bottom: 14/1848
},
extraAttributes: {
"energyIntake": {
name: "Energy Intake",
power: 3,
type: "energy",
base: math.unit(2000 * 5 * 1200 / 150, "kcal")
},
}
},
maw: {


Loading…
Cancel
Save