瀏覽代碼

Adjust scaling on energy intake

Kleiber's Law dictates that metabolic rate scales
with the 3/4ths power of mass, rather than linearly.
master
Fen Dweller 3 年之前
父節點
當前提交
cb58ecc5a4
共有 2 個檔案被更改,包括 3 行新增3 行删除
  1. +2
    -2
      macrovision.js
  2. +1
    -1
      presets/characters.js

+ 2
- 2
macrovision.js 查看文件

@@ -1376,9 +1376,9 @@ function makeEntity(info, views, sizes, forms = {}) {
if (config.autoFoodIntake && view.attributes.weight !== undefined && view.attributes.energyIntake === undefined) {
view.attributes.energyIntake = {
name: "Food Intake",
power: 3,
power: 3 * 3/4,
type: "energy",
base: math.unit(2000 * view.attributes.weight.base.toNumber("lbs") / 150, "kcal")
base: math.unit(2000 * Math.pow(view.attributes.weight.base.toNumber("lbs") / 150, 3/4), "kcal")
}
}



+ 1
- 1
presets/characters.js 查看文件

@@ -60,7 +60,7 @@ function makeCharacter(info, viewInfo, defaultSizes, forms) {
if (value.energyNeed) {
views[key].attributes.capacity = {
name: "Food Intake",
power: 3,
power: 3 * 3 / 4,
type: "energy",
base: value.energyNeed
}


Loading…
取消
儲存