浏览代码

Allow choosing between realistic and same-size prey capacity

master
Fen Dweller 4 年前
父节点
当前提交
8383ba0f74
共有 1 个文件被更改,包括 13 次插入8 次删除
  1. +13
    -8
      macrovision.js

+ 13
- 8
macrovision.js 查看文件

@@ -811,12 +811,12 @@ function makeEntity(info, views, sizes) {
}
}

if (config.autoPreyCapacity && view.attributes.weight !== undefined && view.attributes.capacity === undefined) {
if (config.autoPreyCapacity !== "none" && view.attributes.weight !== undefined && view.attributes.capacity === undefined) {
view.attributes.capacity = {
name: "Capacity",
power: 3,
type: "volume",
base: math.unit(0.2 * view.attributes.weight.base.toNumber("lbs") / 150, "people")
base: math.unit((config.autoPreyCapacity == "same-size" ? 1 : 0.05) * view.attributes.weight.base.toNumber("lbs") / 150, "people")
}
}

@@ -2055,16 +2055,21 @@ const settingsData = {
},
"auto-prey-capacity": {
name: "Estimate Prey Capacity",
desc: "Guess how many people a creature could eat, based on its mass -- 1 person per 750lbs",
type: "toggle",
default: false,
desc: "Guess how much prey creatures can hold, based on their mass",
type: "select",
default: "none",
options: [
"none",
"realistic",
"same-size"
],
get value() {
return config.autoPreyCapacity
return config.autoPreyCapacity;
},
set value(param) {
config.autoPreyCapacity = param
config.autoPreyCapacity = param;
}
}
},
}

function getBoundingBox(entities, margin = 0.05) {


正在加载...
取消
保存