Fen Dweller 4 лет назад
Родитель
Сommit
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"; 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 const capacity = selectedEntity.currentView.preyCapacity ?? selectedEntity.currentView.capacity ?? selectedEntity.currentView.volume


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


Загрузка…
Отмена
Сохранить