소스 검색

Show weight ratios

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

+ 9
- 0
macrovision.js 파일 보기

@@ -681,6 +681,15 @@ function updateInfo() {

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

if (selectedEntity.currentView.weight && prevSelectedEntity.currentView.weight) {
const ratio = math.divide(selectedEntity.currentView.weight, prevSelectedEntity.currentView.weight)

if (ratio > 1) {
text += selectedEntity.name + " is " + math.format(ratio, {precision: 2}) + " times heavier than " + prevSelectedEntity.name + "\n";
} else {
text += selectedEntity.name + " is " + math.format(1/ratio, {precision: 2}) + " times lighter than " + prevSelectedEntity.name + "\n";
}
}
const capacity = selectedEntity.currentView.preyCapacity ?? selectedEntity.currentView.capacity ?? selectedEntity.currentView.volume

if (capacity && prevSelectedEntity.currentView.weight) {


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