|
|
|
@@ -593,6 +593,16 @@ function updateRatios() { |
|
|
|
} |
|
|
|
|
|
|
|
text += prevSelectedEntity.name + " looks " + math.format(apparentHeight, { precision: 3}) + " tall to " + selectedEntity.name; |
|
|
|
|
|
|
|
if (selectedEntity.currentView.capacity && prevSelectedEntity.currentView.weight) { |
|
|
|
const containCount = math.divide(selectedEntity.currentView.capacity, math.divide(prevSelectedEntity.currentView.weight, math.unit("80kg/people"))); |
|
|
|
|
|
|
|
if (containCount > 0.1) { |
|
|
|
text += "\n" |
|
|
|
text += selectedEntity.name + " can fit " + math.format(containCount, { precision: 1 }) + " of " + prevSelectedEntity.name + " inside them" |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ratioInfo.innerText = text; |
|
|
|
} else { |
|
|
|
@@ -1216,17 +1226,21 @@ function makeEntity(info, views, sizes, forms = {}) { |
|
|
|
let base = undefined; |
|
|
|
switch(config.autoMass) { |
|
|
|
case "human": |
|
|
|
base = math.divide(math.unit(150, "lbs"), math.unit(5.917, "feet")) |
|
|
|
baseMass = math.unit(150, "lbs") |
|
|
|
baseHeight = math.unit(5.917, "feet") |
|
|
|
break |
|
|
|
case "quadruped at shoulder": |
|
|
|
base = math.divide(math.unit(80, "lbs"), math.unit(30, "inches")) |
|
|
|
baseMass = math.unit(80, "lbs") |
|
|
|
baseHeight = math.unit(30, "inches") |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
const ratio = math.divide(view.attributes.height.base, baseHeight) |
|
|
|
view.attributes.weight = { |
|
|
|
name: "Mass", |
|
|
|
power: 3, |
|
|
|
type: "mass", |
|
|
|
base: math.multiply(base, view.attributes.height.base) |
|
|
|
base: math.multiply(baseMass, Math.pow(ratio, 3)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|