diff --git a/macrovision.js b/macrovision.js index 00d7a86b..d2d7f604 100644 --- a/macrovision.js +++ b/macrovision.js @@ -614,9 +614,9 @@ function updateInfo() { text += prevSelectedEntity.name + " looks " + math.format(apparentHeight, { precision: 3}) + " tall to " + selectedEntity.name + "\n"; - if (selectedEntity.currentView.capacity && prevSelectedEntity.currentView.weight) { - const containCount = math.divide(selectedEntity.currentView.capacity, math.divide(prevSelectedEntity.currentView.weight, math.unit("80kg/people"))); - + if (selectedEntity.currentView.preyCapacity && prevSelectedEntity.currentView.weight) { + const containCount = math.divide(selectedEntity.currentView.preyCapacity, math.divide(prevSelectedEntity.currentView.weight, math.unit("80kg/people"))); + console.log(containCount); if (containCount > 0.1) { text += selectedEntity.name + " can fit " + math.format(containCount, { precision: 1 }) + " of " + prevSelectedEntity.name + " inside them" + "\n" } @@ -1315,9 +1315,9 @@ function makeEntity(info, views, sizes, forms = {}) { } } - if (config.autoPreyCapacity !== "none" && view.attributes.weight !== undefined && view.attributes.capacity === undefined) { - view.attributes.capacity = { - name: "Capacity", + if (config.autoPreyCapacity !== "none" && view.attributes.weight !== undefined && view.attributes.preyCapacity === undefined) { + view.attributes.preyCapacity = { + name: "Prey Capacity", power: 3, type: "volume", base: math.unit((config.autoPreyCapacity == "same-size" ? 1 : 0.05) * view.attributes.weight.base.toNumber("lbs") / 150, "people") diff --git a/presets/characters.js b/presets/characters.js index ecab21d3..b463f383 100644 --- a/presets/characters.js +++ b/presets/characters.js @@ -48,6 +48,15 @@ function makeCharacter(info, viewInfo, defaultSizes, forms) { } } + if (value.preyCapacity) { + views[key].attributes.preyCapacity = { + name: "Prey Capacity", + power: 3, + type: "volume", + base: value.preyCapacity + } + } + if (value.energyNeed) { views[key].attributes.capacity = { name: "Food Intake", @@ -2061,7 +2070,7 @@ characterMakers.push(() => makeCharacter( height: math.unit(12, "feet"), weight: math.unit(3600, "lb"), volume: math.unit(1000, "liters"), - capacity: math.unit(6, "people"), + preyCapacity: math.unit(6, "people"), name: "Goo", image: { source: "./media/characters/fen/goo.svg", @@ -2080,7 +2089,7 @@ characterMakers.push(() => makeCharacter( height: math.unit(6.6, "feet"), weight: math.unit(3000, "lb"), volume: math.unit(1000, "liters"), - capacity: math.unit(6, "people"), + preyCapacity: math.unit(6, "people"), name: "Goo (Ceiling)", image: { source: "./media/characters/fen/goo-ceiling.svg" @@ -2119,7 +2128,7 @@ characterMakers.push(() => makeCharacter( gooLounging: { height: math.unit(4.53, "feet"), weight: math.unit(3000, "lb"), - capacity: math.unit(6, "people"), + preyCapacity: math.unit(6, "people"), name: "Goo (Lounging)", image: { source: "./media/characters/fen/goo-lounging.svg", @@ -8882,7 +8891,7 @@ characterMakers.push(() => makeCharacter( front: { height: math.unit(14, "feet"), weight: math.unit(1450, "kg"), - capacity: math.unit(15, "people"), + preyCapacity: math.unit(15, "people"), name: "Front", image: { source: "./media/characters/aura-starwind/front.svg", @@ -8893,7 +8902,7 @@ characterMakers.push(() => makeCharacter( side: { height: math.unit(14, "feet"), weight: math.unit(1450, "kg"), - capacity: math.unit(15, "people"), + preyCapacity: math.unit(15, "people"), name: "Side", image: { source: "./media/characters/aura-starwind/side.svg", @@ -8903,7 +8912,7 @@ characterMakers.push(() => makeCharacter( taur: { height: math.unit(18, "feet"), weight: math.unit(5500, "kg"), - capacity: math.unit(50, "people"), + preyCapacity: math.unit(50, "people"), name: "Taur", image: { source: "./media/characters/aura-starwind/taur.svg", @@ -8913,7 +8922,7 @@ characterMakers.push(() => makeCharacter( feral: { height: math.unit(46, "feet"), weight: math.unit(25000, "kg"), - capacity: math.unit(120, "people"), + preyCapacity: math.unit(120, "people"), name: "Feral", image: { source: "./media/characters/aura-starwind/feral.svg" @@ -26616,7 +26625,7 @@ characterMakers.push(() => makeCharacter( front: { height: math.unit(6.71, "feet"), weight: math.unit(200, "lb"), - capacity: math.unit(1000000, "people"), + preyCapacity: math.unit(1000000, "people"), name: "Front", image: { source: "./media/characters/gliss/front.svg", @@ -26627,7 +26636,7 @@ characterMakers.push(() => makeCharacter( hammerspaceSize: { height: math.unit(6.71 * 717, "feet"), weight: math.unit(200, "lb"), - capacity: math.unit(1000000, "people"), + preyCapacity: math.unit(1000000, "people"), name: "Hammerspace Size", image: { source: "./media/characters/gliss/front.svg", @@ -26871,7 +26880,7 @@ characterMakers.push(() => makeCharacter( belly: { height: math.unit(33, "feet"), name: "Belly", - capacity: math.unit(500, "people"), + preyCapacity: math.unit(500, "people"), image: { source: "./media/characters/mandarax/belly.svg" } @@ -27212,7 +27221,7 @@ characterMakers.push(() => makeCharacter( }, stomach: { height: math.unit(6.8, "feet"), - capacity: math.unit(20, "people"), + preyCapacity: math.unit(20, "people"), name: "Stomach", image: { source: "./media/characters/koros/stomach.svg" @@ -27388,7 +27397,7 @@ characterMakers.push(() => makeCharacter( }, stomach: { height: math.unit(0.89, "feet"), - capacity: math.unit(4, "liters"), + preyCapacity: math.unit(4, "liters"), name: "Stomach", image: { source: "./media/characters/juri/stomach.svg" @@ -35258,13 +35267,14 @@ characterMakers.push(() => makeCharacter( meowberusSide: { height: math.unit(75, "feet"), weight: math.unit(180000, "kg"), + preyCapacity: math.unit(50000, "people"), name: "Side", image: { source: "./media/characters/saphinara/meowberus-side.svg", extra: 1400/711, bottom: 126/1526 }, - form: "meowberus", + form: "meowberus" }, }, [