sc: mark detection abilities similar to sight column
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 18 Jun 2023 11:49:30 +0000 (13:49 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 19 Jun 2023 19:50:43 +0000 (21:50 +0200)
sc-units-hots.inc.pl
sc-units-lotv.inc.pl
sc.plp

index 55da7258a6fbaa5986514f34e732e6cf35eb596d..9b49af2d5460315abd9f883b9123dc19f1ba3ec2 100644 (file)
@@ -1413,6 +1413,7 @@ my $GATHER = "gather 5 minerals (7 gold) after 4s (upto 60/minute)\n  or 4 gas (
                        cost => 75,
                        range => 10,
                        radius => 1.5, # 2 after upgrade
+                       detect => 1,
                },
                {
                        name => 'Personal Cloaking',
@@ -2669,6 +2670,7 @@ my $GATHER = "gather 5 minerals (7 gold) after 4s (upto 60/minute)\n  or 4 gas (
                        range => 10,
                        duration => 4,
                        radius => 2.0,
+                       detect => 1,
                },
                {
                        alt => 'Infested Terran',
index 95e7406f775fc3686081945d24bb3304a7a5cdc3..9a2433dc254cc965b583aa3904bf48f8e38695b1 100644 (file)
@@ -363,6 +363,7 @@ $unit{phoenix},
                        cooldown => $V lt v4.12.0 ? 2 : 10,
                        duration => $V lt v4.12.0 ? 30 : $V lt v5.0.2 ? 15 : 20,
                        radius => 6,
+                       detect => 1,
                },
                {
                        name => 'Stasis Ward',
diff --git a/sc.plp b/sc.plp
index e0465bac520acaa28cca7557c033d2fcd9b2637d..4ad48a3ced5cdce8aa16dfbe6570b39eedc4bcaa 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -251,7 +251,10 @@ sub showrangeint {
                my $specials = $row->{special} or return '';
                return join ' ', map {
                        sprintf '<span%s title="%s">%s</span>',
-                               $_->{duration} < 0 && ' class="magic-perma"',
+                               join('',
+                                       $_->{duration} < 0 && ' class="magic-perma"',
+                                       $_->{detect} && ' class="unit-detect"',
+                               ),
                                join('',
                                        $_->{name} // $_->{alt},
                                        $_->{desc} ? ": $_->{desc}" : '',