Kaynağa Gözat

Show weight ratios

master
Fen Dweller 4 yıl önce
ebeveyn
işleme
cd7570bc03
1 değiştirilmiş dosya ile 9 ekleme ve 0 silme
  1. +9
    -0
      macrovision.js

+ 9
- 0
macrovision.js Dosyayı Görüntüle

@@ -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) {


Yükleniyor…
İptal
Kaydet