<th><:= coltoggle(name => 'name') :></th>
<th class="val min" title=minerals><:= coltoggle(cost => 'cost') :></th>
<th class="val gas">gas</th>
- <th class="val time">build</th>
+ <th class="val time"><:= coltoggle(build => 'build') :></th>
<th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
<th class="unit" colspan="2">attr</th>
<th class="val unit-hp"><:= coltoggle(HP => 'hp') :></th>
$_->{gas}*1.5 + $_->{min} + $_->{pop}/8 + $_->{build}/256/8
) for @rows;
}
+ elsif ($get{order} eq 'build') {
+ my %unittime = map { ($_->{name} => $_->{warp} // $_->{build}) } @rows;
+ $unittime{Templar} = $unittime{'High Templar'};
+ $_->{order} = (
+ ($_->{warp} // $_->{build})
+ + ($_->{gas}*1.5 + $_->{min} + $_->{pop}/8)/1024
+ + ($_->{base} ? ($unittime{$_->{base}->[0]} // 100) + 1 : 0)
+ ) for @rows;
+ }
elsif ($get{order} eq 'size') {
$_->{order} = (
$_->{pop}*16 + ($_->{size} // $_->{suit}) + $_->{cargo}/8