sc: hover weapon names
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 19 Jun 2015 14:10:24 +0000 (16:10 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc-units-hots.inc.pl
sc.plp

index bba333134e4ebb418b7102146b9b53ed8c16376c..6404dce9ee35cb784be6f004d92243a4c27cd7c8 100644 (file)
@@ -1568,6 +1568,7 @@ use strict;
        attack => [
                {
                        anti => 1,
        attack => [
                {
                        anti => 1,
+                       name => "Thor's Hammer",
                        damage => [30, 33, 36, 39],
                        dps => [46.9, 51.6, 56.3, 61.0],
                        cooldown => 1.28,
                        damage => [30, 33, 36, 39],
                        dps => [46.9, 51.6, 56.3, 61.0],
                        cooldown => 1.28,
@@ -1576,7 +1577,8 @@ use strict;
                },
                {
                        anti => 2,
                },
                {
                        anti => 2,
-                       name => 'Explosive Payload',
+                       name => 'Javelin Missiles',
+#                      name => 'Explosive Payload',
                        damage => [6 .. 9],
                        bonus => {
                                'light air' => [6 .. 9],
                        damage => [6 .. 9],
                        bonus => {
                                'light air' => [6 .. 9],
@@ -1590,7 +1592,8 @@ use strict;
                },
                {
                        anti => 2,
                },
                {
                        anti => 2,
-                       name => 'High Impact Payload',
+                       name => 'Punisher Cannons',
+#                      name => 'High Impact Payload',
                        damage => [24, 26, 28, 30],
                        dps => [12 .. 15],
                        cooldown => 2,
                        damage => [24, 26, 28, 30],
                        dps => [12 .. 15],
                        cooldown => 2,
diff --git a/sc.plp b/sc.plp
index c86ef0bc47bd33c2d9f55bbdc8974b37bb3fa83c..df78b8e06dc5c2a28a728096008300041b6a68c6 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -145,7 +145,9 @@ sub showrange {
                        )} keys %{ $attack->{bonus} }),
                ) if $attack->{bonus};
 
                        )} keys %{ $attack->{bonus} }),
                ) if $attack->{bonus};
 
+               $out .= sprintf '<span title="%s">', $attack->{name} if $attack->{name};
                $out .= showrange($damage, $maxdamage);
                $out .= showrange($damage, $maxdamage);
+               $out .= '</span>' if $attack->{name};
                $out .= sprintf('<span class="unit-splash" title="%s">%s</span>',
                        $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+')
                ) if $attack->{splash};
                $out .= sprintf('<span class="unit-splash" title="%s">%s</span>',
                        $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+')
                ) if $attack->{splash};