From 8f02cfee34ce655998ce67264e35a091c7d5491d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 11:48:36 +0200 Subject: [PATCH] sc: improve hots unit size fallback order --- sc.plp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sc.plp b/sc.plp index 48cb282..2217dc6 100644 --- a/sc.plp +++ b/sc.plp @@ -285,10 +285,15 @@ sub showrange { $grouped = 0; $get{order} ||= ''; if ($get{order} eq 'size') { - $_->{order} = $_->{unit}*8 + $_->{suit} + $_->{hp}/512 + $_->{min}/8192 for @$units; + $_->{order} = ( + $_->{unit}*16 + ($_->{size} // $_->{suit}) + $_->{cargo}/8 + + $_->{hp}/512 + $_->{min}/8192 + ) for @$units; } elsif ($get{order} eq 'cost') { - $_->{order} = $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8 for @$units; + $_->{order} = ( + $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8 + ) for @$units; } else { $units->[$_]->{order} = $_ for 0 .. $#$units; -- 2.30.0