From 2ea0bccd250e58edde031a68c94ae4b20bc3006a Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 23 May 2021 14:44:24 -0700 Subject: [PATCH] Hide dead opfor objectives. These are just clutter. --- resources/ui/map/map.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/ui/map/map.js b/resources/ui/map/map.js index 8a508a3a..caf6d9fa 100644 --- a/resources/ui/map/map.js +++ b/resources/ui/map/map.js @@ -488,6 +488,13 @@ class TheaterGroundObject { } draw() { + if (!this.tgo.blue && this.tgo.dead) { + // Don't bother drawing dead opfor TGOs. Blue is worth showing because + // some of them can be repaired, but the player can't interact with dead + // red things so there's no point in showing them. + return; + } + L.marker(this.tgo.position, { icon: this.icon() }) .bindTooltip(`${this.tgo.name}
${this.tgo.units.join("
")}`) .on("click", () => this.tgo.showInfoDialog())