| @@ -1199,6 +1199,15 @@ function makeEntity(info, views, sizes, forms = {}) { | |||||
| } | } | ||||
| } | } | ||||
| if (config.autoCaloricValue && view.attributes.weight !== undefined && view.attributes.energyWorth === undefined) { | |||||
| view.attributes.energyNeed = { | |||||
| name: "Caloric Value", | |||||
| power: 3, | |||||
| type: "energy", | |||||
| base: math.unit(860 * view.attributes.weight.base.toNumber("lbs"), "kcal") | |||||
| } | |||||
| } | |||||
| if (config.autoPreyCapacity !== "none" && 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", | ||||
| @@ -2772,6 +2781,18 @@ const settingsData = { | |||||
| config.autoFoodIntake = param | config.autoFoodIntake = param | ||||
| } | } | ||||
| }, | }, | ||||
| "auto-caloric-value": { | |||||
| name: "Estimate Caloric Value", | |||||
| desc: "Guess how much food a creature is worth -- 860kcal per pound", | |||||
| type: "toggle", | |||||
| default: false, | |||||
| get value() { | |||||
| return config.autoCaloricValue | |||||
| }, | |||||
| set value(param) { | |||||
| config.autoCaloricValue = param | |||||
| } | |||||
| }, | |||||
| "auto-prey-capacity": { | "auto-prey-capacity": { | ||||
| name: "Estimate Prey Capacity", | name: "Estimate Prey Capacity", | ||||
| desc: "Guess how much prey creatures can hold, based on their mass", | desc: "Guess how much prey creatures can hold, based on their mass", | ||||