sc: collision diameter and transportability in size title
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 08:15:32 +0000 (10:15 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc.plp

diff --git a/sc.plp b/sc.plp
index 2a748dcd8d0b8dc34da42a19d29a7f2d9f46ab2c..8b0e5e84ab27a02627c14eec6074be7ca97e7aed 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -241,12 +241,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',