sc: indicate optional transport [overlord] capability
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 07:50:56 +0000 (09:50 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc.css
sc.plp

diff --git a/sc.css b/sc.css
index 7ad23e1c9cdae7782b3a9d4338762d7cf4801ea4..6eb9473ff00c1006813cb0f04657d664d01001c6 100644 (file)
--- a/sc.css
+++ b/sc.css
@@ -101,6 +101,16 @@ tbody .unit-shield {
 .unit-magic {
        padding-left: 0.5em;
 }
+.magic-opt::before {
+       color: #000;
+       content: '(';
+       position: absolute;
+       margin-left: -0.33em;
+}
+.magic-opt::after {
+       color: #000;
+       content: ')';
+}
 .magic-perma {
        text-decoration: underline;
                text-decoration-color: #8C0;
diff --git a/sc.plp b/sc.plp
index 5b7e4a7a1a1ef7cac4fc92c88063036a532f2190..f063a1ffcebc859c2a72b564373e432017b6e1ec 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -242,7 +242,8 @@ sub showrange {
                                $_->{build} || '0',
                        ),
                        sprintf('<td class="unit unit-%s" title="%3$s">%s',
-                               $_->{cargo} < 0      ? ('supply', T => 'transport') :
+                               $_->            {cargo} < 0 ? ('supply',           T => 'transport') :
+                               $_->{upgraded}->{cargo} < 0 ? ('supply magic-opt', T => 'optional transport') :
                                $_->{attr}->{flying}    ? ('air', F => 'flying') :
                                $_->{attr}->{structure} ? ('x',   B => 'building') :
                                ([qw( x s m l l h h h h )]->[ $_->{cargo} ], $_->{cargo} || '-', ''),