sc: rename 'size' attribute to 'suit'
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index 8ce0ba7a0816ea7839933b7a664d0756608c15f9..873c75b6964c71a95ec178e9c507ceacd92dcac2 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -252,7 +252,7 @@ sub showrange {
        if (exists $get{order}) {
                $get{order} ||= '';
                if ($get{order} eq 'size') {
-                       $_->{order} = $_->{unit}*8 + $_->{size} + $_->{hp}/512 + $_->{min}/8192 for @$units;
+                       $_->{order} = $_->{unit}*8 + $_->{suit} + $_->{hp}/512 + $_->{min}/8192 for @$units;
                }
                elsif ($get{order} eq 'cost') {
                        $_->{order} = $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8 for @$units;
@@ -269,7 +269,7 @@ sub showrange {
                printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
                        if $grouped and $race ne $_->{race};
                $_->{cat} = $_->{race} if not $grouped;
-               my $sizechar = [qw/? s m l/]->[$_->{size}];
+               my $suitchar = [qw/? s m l/]->[$_->{suit}];
                print(
                        '<tr>',
                        sprintf('<t%s class="cat">%s', $cat ne $_->{cat} ? ('h', $cat = $_->{cat}) : ('d', '&nbsp;')),
@@ -280,7 +280,7 @@ sub showrange {
                                !!$_->{base} && '<span class="unit-composed">+</span>',
                                $_->{build} || '0',
                        ),
-                       sprintf('<td class="unit unit-%s">%s', $sizechar, ucfirst $sizechar),
+                       sprintf('<td class="unit unit-%s">%s', $suitchar, ucfirst $suitchar),
                        '<td class="val unit">' . join('',
                                $_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : '&nbsp;',
                                defined $_->{organic} && sprintf(