| @@ -527,6 +527,7 @@ const config = { | |||
| autoMass: "off", | |||
| autoFoodIntake: false, | |||
| autoPreyCapacity: "off", | |||
| autoSwallowSize: "off" | |||
| }; | |||
| const availableEntities = {}; | |||
| @@ -770,6 +771,28 @@ function updateInfo() { | |||
| "\n"; | |||
| } | |||
| } | |||
| const swallowSize = | |||
| selectedEntity.currentView.swallowSize; | |||
| if (swallowSize && prevSelectedEntity.currentView.weight) { | |||
| const containCount = math.divide( | |||
| swallowSize, | |||
| math.divide( | |||
| prevSelectedEntity.currentView.weight, | |||
| math.unit("80kg/people") | |||
| ) | |||
| ); | |||
| if (containCount > 0.1) { | |||
| text += | |||
| selectedEntity.name + | |||
| " can swallow " + | |||
| math.format(containCount, { precision: 3 }) + | |||
| " of " + | |||
| prevSelectedEntity.name + | |||
| " at once" + | |||
| "\n"; | |||
| } | |||
| } | |||
| if ( | |||
| selectedEntity.currentView.energyIntake && | |||
| @@ -1677,6 +1700,24 @@ function makeEntity(info, views, sizes, forms = {}) { | |||
| }; | |||
| } | |||
| if ( | |||
| config.autoSwallowSize !== "off" && | |||
| view.attributes.swallowSize === undefined | |||
| ) { | |||
| let size; | |||
| switch(config.autoSwallowSize) { | |||
| case "casual": size = math.unit(20, "mL"); break; | |||
| case "big-swallow": size = math.unit(50, "mL"); break; | |||
| case "same-size-predator": size = math.unit(1, "person"); break; | |||
| } | |||
| view.attributes.swallowSize = { | |||
| name: "Swallow Size", | |||
| power: 3, | |||
| type: "volume", | |||
| base: math.multiply(size, math.pow(math.divide(math.unit(6, "feet"), view.attributes.height.base), 3)) | |||
| }; | |||
| } | |||
| Object.entries(view.attributes).forEach(([key, val]) => { | |||
| Object.defineProperty(view, key, { | |||
| get: function () { | |||
| @@ -3453,6 +3494,20 @@ const settingsData = { | |||
| config.autoPreyCapacity = param; | |||
| }, | |||
| }, | |||
| "auto-swallow-size": { | |||
| name: "Estimate Swallow Size", | |||
| desc: "Guess how much creatures can swallow at once, based on their height", | |||
| type: "select", | |||
| default: "off", | |||
| disabled: "off", | |||
| options: ["off", "casual", "big-swallow", "same-size-predator"], | |||
| get value() { | |||
| return config.autoSwallowSize; | |||
| }, | |||
| set value(param) { | |||
| config.autoSwallowSize = param; | |||
| }, | |||
| }, | |||
| }; | |||
| function prepareSettings(userSettings) { | |||
| @@ -19440,13 +19440,26 @@ const attributionData = { | |||
| { | |||
| prefix: "./media/characters/maya/", | |||
| files: [ | |||
| { name: "front.svg", source: "https://twitter.com/Cukier49/status/1422286476088381445" } | |||
| { name: "normal-front.svg", source: "https://twitter.com/Cukier49/status/1422286476088381445" } | |||
| ], | |||
| authors: [ | |||
| "cukier49" | |||
| ], | |||
| owners: [ | |||
| "pocketcait" | |||
| "sageesys" | |||
| ] | |||
| }, | |||
| { | |||
| prefix: "./media/characters/maya/", | |||
| files: [ | |||
| { name: "monstrous-front.svg", source: "https://twitter.com/reshirii/status/1451262399722500097" }, | |||
| { name: "taur-front.svg", source: "https://twitter.com/reshirii/status/1451262399722500097" }, | |||
| ], | |||
| authors: [ | |||
| "reshirii" | |||
| ], | |||
| owners: [ | |||
| "sageesys" | |||
| ] | |||
| }, | |||
| { | |||
| @@ -29108,9 +29121,9 @@ const attributionData = { | |||
| "name": "Cukier", | |||
| "url": "https://twitter.com/Cukier49/" | |||
| }, | |||
| "pocketcait": { | |||
| "name": "pocketcait", | |||
| "url": "https://twitter.com/pocketcait/" | |||
| "sageesys": { | |||
| "name": "sageesys", | |||
| "url": "https://twitter.com/sageesys/" | |||
| }, | |||
| "bluescale": { | |||
| "name": "Bluescale", | |||
| @@ -29756,6 +29769,10 @@ const attributionData = { | |||
| "name": "The_Elemental", | |||
| "url": "https://www.furaffinity.net/user/theelemental/" | |||
| }, | |||
| "reshirii": { | |||
| "name": "reshirii", | |||
| "url": "https://twitter.com/reshirii/" | |||
| }, | |||
| } | |||
| } | |||
| @@ -53819,41 +53819,106 @@ characterMakers.push(() => makeCharacter( | |||
| )) | |||
| characterMakers.push(() => makeCharacter( | |||
| { name: "Maya", species: ["cat"], tags: ["anthro"] }, | |||
| { name: "Maya", species: ["cat"], tags: ["anthro", "taur"] }, | |||
| { | |||
| front: { | |||
| normal_front: { | |||
| height: math.unit(4.88, "meters"), | |||
| name: "Front", | |||
| image: { | |||
| source: "./media/characters/maya/front.svg", | |||
| source: "./media/characters/maya/normal-front.svg", | |||
| extra: 1222/1145, | |||
| bottom: 57/1279 | |||
| } | |||
| }, | |||
| form: "normal", | |||
| default: true | |||
| }, | |||
| monstrous_front: { | |||
| height: math.unit(10, "meters"), | |||
| name: "Front", | |||
| image: { | |||
| source: "./media/characters/maya/monstrous-front.svg", | |||
| extra: 1523/1109, | |||
| bottom: 113/1636 | |||
| }, | |||
| form: "monstrous", | |||
| }, | |||
| taur_front: { | |||
| height: math.unit(10, "meters"), | |||
| name: "Front", | |||
| image: { | |||
| source: "./media/characters/maya/taur-front.svg", | |||
| extra: 743/506, | |||
| bottom: 101/844 | |||
| }, | |||
| form: "taur", | |||
| }, | |||
| }, | |||
| [ | |||
| { | |||
| name: "Normal", | |||
| height: math.unit(4.88, "meters"), | |||
| default: true | |||
| default: true, | |||
| form: "normal" | |||
| }, | |||
| { | |||
| name: "Macro", | |||
| height: math.unit(38.1, "meters") | |||
| height: math.unit(38.1, "meters"), | |||
| form: "normal" | |||
| }, | |||
| { | |||
| name: "Macro+", | |||
| height: math.unit(152.4, "meters") | |||
| height: math.unit(152.4, "meters"), | |||
| form: "normal" | |||
| }, | |||
| { | |||
| name: "Macro++", | |||
| height: math.unit(16.09, "km") | |||
| height: math.unit(16.09, "km"), | |||
| form: "normal" | |||
| }, | |||
| { | |||
| name: "Mega-macro", | |||
| height: math.unit(700, "megameters") | |||
| height: math.unit(700, "megameters"), | |||
| form: "normal" | |||
| }, | |||
| ] | |||
| { | |||
| name: "Satiated", | |||
| height: math.unit(10, "meters"), | |||
| default: true, | |||
| form: "monstrous" | |||
| }, | |||
| { | |||
| name: "Hungry", | |||
| height: math.unit(75, "meters"), | |||
| form: "monstrous" | |||
| }, | |||
| { | |||
| name: "Ravenous", | |||
| height: math.unit(150, "meters"), | |||
| form: "monstrous" | |||
| }, | |||
| { | |||
| name: "\"Normal\"", | |||
| height: math.unit(10, "meters"), | |||
| form: "taur" | |||
| }, | |||
| { | |||
| name: "Macro", | |||
| height: math.unit(50, "meters"), | |||
| form: "taur" | |||
| }, | |||
| ], | |||
| { | |||
| "normal": { | |||
| name: "Normal", | |||
| default: true | |||
| }, | |||
| "monstrous": { | |||
| name: "Monstrous", | |||
| }, | |||
| "taur": { | |||
| name: "Taur", | |||
| }, | |||
| } | |||
| )) | |||
| characterMakers.push(() => makeCharacter( | |||