소스 검색

Adjust ratio volumes to work with more than just prey capacity

master
Fen Dweller 4 년 전
부모
커밋
f24a23901e
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -2
      macrovision.js

+ 4
- 2
macrovision.js 파일 보기

@@ -627,8 +627,10 @@ function updateInfo() {


text += prevSelectedEntity.name + " looks " + math.format(apparentHeight, { precision: 3}) + " tall to " + selectedEntity.name + "\n"; text += prevSelectedEntity.name + " looks " + math.format(apparentHeight, { precision: 3}) + " tall to " + selectedEntity.name + "\n";


if (selectedEntity.currentView.preyCapacity && prevSelectedEntity.currentView.weight) {
const containCount = math.divide(selectedEntity.currentView.preyCapacity, math.divide(prevSelectedEntity.currentView.weight, math.unit("80kg/people")));
const capacity = selectedEntity.currentView.preyCapacity ?? selectedEntity.currentView.capacity ?? selectedEntity.currentView.volume

if (capacity && prevSelectedEntity.currentView.weight) {
const containCount = math.divide(capacity, math.divide(prevSelectedEntity.currentView.weight, math.unit("80kg/people")));
console.log(containCount); console.log(containCount);
if (containCount > 0.1) { if (containCount > 0.1) {
text += selectedEntity.name + " can fit " + math.format(containCount, { precision: 1 }) + " of " + prevSelectedEntity.name + " inside them" + "\n" text += selectedEntity.name + " can fit " + math.format(containCount, { precision: 1 }) + " of " + prevSelectedEntity.name + " inside them" + "\n"


불러오는 중...
취소
저장