sc: split up size column header
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index f063a1ffcebc859c2a72b564373e432017b6e1ec..f134226f3ac8aaa8b53c22cfea45e7491cf1a588 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -98,7 +98,8 @@ sub coltoggle {
        <th class="val min"><img src="/minerals.png" alt="min"></th>
        <th class="val gas"><img src="/gas.png" alt="gas"></th>
        <th class="val time"><:= coltoggle(qw'build cost') :></th>
-       <th class="unit" colspan="4"><:= coltoggle(qw'size size') :></th>
+       <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
+       <th class="unit" colspan="2">attr</th>
        <th class="val unit-hp">HP</th>
        <th class="val unit-shield">shield</th>
        <th class="val unit-armor" title="armor">⛨</th>
@@ -241,12 +242,17 @@ sub showrange {
                                !!$_->{base} && '<span class="unit-composed">+</span>',
                                $_->{build} || '0',
                        ),
-                       sprintf('<td class="unit unit-%s" title="%3$s">%s',
+                       sprintf('<td class="unit unit-%s" title="%4$s%3$s">%s',
                                $_->            {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} || '-', ''),
+                               (
+                                       [qw( x s m l l h h h h )]->[ $_->{cargo} ],
+                                       $_->{cargo} || '-',
+                                       $_->{cargo} ? 'transportable' : 'untransportable',
+                               ),
+                               defined $_->{size} && sprintf('⌀%.1f ', $_->{size}),
                        ),
                        sprintf('<td class="val unit%s">%s',
                                defined $_->{pop} && $_->{pop} < 0 && ' unit-supply',
@@ -292,8 +298,6 @@ sub showrange {
                                showrange($_->{speed}, $_->{upgraded}->{speed}),
                        $_->{attr}->{jump}
                                && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
-                       $_->{attr}->{flying}
-                               && qq'<span class="unit unit-jump" title="flying">↑</span>',
                        '<td class="unit-magic">' . showmagic($_),
                        !$_->{attack}->[1] ? () : (
                                '<tr><td colspan=12>', showattack($_, 1), '<td colspan=3>'