| @@ -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 = { | view.attributes.capacity = { | ||||
| name: "Capacity", | name: "Capacity", | ||||
| power: 3, | power: 3, | ||||
| type: "volume", | 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": { | "auto-prey-capacity": { | ||||
| name: "Estimate 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() { | get value() { | ||||
| return config.autoPreyCapacity | |||||
| return config.autoPreyCapacity; | |||||
| }, | }, | ||||
| set value(param) { | set value(param) { | ||||
| config.autoPreyCapacity = param | |||||
| config.autoPreyCapacity = param; | |||||
| } | } | ||||
| } | |||||
| }, | |||||
| } | } | ||||
| function getBoundingBox(entities, margin = 0.05) { | function getBoundingBox(entities, margin = 0.05) { | ||||