From e7665dd54b42205d091a5f530f82c523bf30070f Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 20 Jun 2015 06:23:39 +0200 Subject: [PATCH] sc: calculate upgrades for subunits --- sc.plp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 { -- 2.30.0