Преглед изворни кода

Fix energy-intake estimation using the wrong id

Also, adds chicken nuggets as a unit of energy
master
Fen Dweller пре 4 година
родитељ
комит
3968a5ebf1
2 измењених фајлова са 22 додато и 1 уклоњено
  1. +6
    -1
      macrovision.js
  2. +16
    -0
      presets/characters.js

+ 6
- 1
macrovision.js Прегледај датотеку

@@ -255,6 +255,10 @@ math.createUnit("foodKilograms", {
definition: "1909 kcal", definition: "1909 kcal",
prefixes: "long" prefixes: "long"
}) })
math.createUnit("chickenNuggets", {
definition: "42 kcal",
prefixes: "long"
})
math.createUnit("peopleEaten", { math.createUnit("peopleEaten", {
definition: "125000 kcal", definition: "125000 kcal",
prefixes: "long" prefixes: "long"
@@ -484,6 +488,7 @@ const unitChoices = {
"foodPounds" "foodPounds"
], ],
"relative": [ "relative": [
"chickenNuggets",
"peopleEaten", "peopleEaten",
"villagesEaten", "villagesEaten",
"townsEaten", "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 = { view.attributes.energyIntake = {
name: "Food Intake", name: "Food Intake",
power: 3, power: 3,


+ 16
- 0
presets/characters.js Прегледај датотеку

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


Loading…
Откажи
Сачувај