sc: suit fallback for sc2
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 13 Jun 2015 03:50:43 +0000 (05:50 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 13 Jun 2015 03:50:43 +0000 (05:50 +0200)
Size in hots indicates cargo points, but show comparable class derived from
hex size if untransportable.

sc.plp

diff --git a/sc.plp b/sc.plp
index 13248fbb256afea92f25b287db48f48b14e01bd5..cf2155f3b9bbffe6fa1d9979ad9660dfead41c9b 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -178,7 +178,13 @@ sub showval {
                local $_ = $row;
                $_->{hp} += $_->{shield} if $_->{shield};
                my $suitchar = '';
-               if ($_->{suit}) {
+               if ($_->{cargo} > 0) {
+                       $suitchar = [qw/? s m l l h h h h/]->[abs $_->{cargo}];
+               }
+               elsif ($_->{size}) {
+                       $suitchar = [qw/s m l h h h/]->[$_->{size}];
+               }
+               elsif ($_->{suit}) {
                        $suitchar = [qw/? s m l/]->[$_->{suit}];
                }
 
@@ -275,9 +281,17 @@ sub showval {
        <dd>excludes construction of dependencies such as buildings
                and <span class="unit-composed">+</span>parent units
 <dt>size
-       <dd>affected by <span class="unit unit-s">S</span>mall,
+       <dd><:
+if ($scver{major} > 1) {
+               :>transports can fit 8 <span class="unit unit-s">S</span>mall,
+               4 <span class="unit unit-m">M</span>edium,
+               2 <span class="unit unit-l">L</span>arge,
+               or a single <span class="unit unit-h">H</span>uge unit<:
+} else {
+               :>affected by <span class="unit unit-s">S</span>mall,
                <span class="unit unit-m">M</span>edium,
-               or <span class="unit unit-l">L</span>arge unit damage
+               or <span class="unit unit-l">L</span>arge unit damage<:
+} :>
        <dd>number of command points taken per unit
        <dd><span class="unit unit-o">o</span>rganic/<span class="unit unit-u">m</span>echanic unit
 <dt>HP<dd>