From: Mischa POSLAWSKY Date: Sat, 20 Jun 2015 04:23:39 +0000 (+0200) Subject: sc: calculate upgrades for subunits X-Git-Tag: v1.8~115 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/e7665dd54b42205d091a5f530f82c523bf30070f sc: calculate upgrades for subunits --- diff --git a/sc.plp b/sc.plp index e426a6e..5911275 100644 --- a/sc.plp +++ b/sc.plp @@ -73,6 +73,14 @@ for my $unit (@{$units}) { addupgrade(\$unit->{upgraded}->{$col}, $increase, $unit->{$col}); } } + for my $special (@{ $unit->{special} }) { + for my $upgrade (@{ $special->{upgrade} }) { + while (my ($col, $increase) = each %{$upgrade}) { + defined $special->{$col} or next; + addupgrade(\$special->{upgraded}->{$col}, $increase, $special->{$col}); + } + } + } } sub coltoggle {