git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
424c0db
)
sc: calculate upgrades for subunits
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 20 Jun 2015 04:23:39 +0000
(06:23 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000
(15:38 +0200)
sc.plp
patch
|
blob
|
history
diff --git
a/sc.plp
b/sc.plp
index e426a6e5ae6f5c822c5386fdf4c33839d5e17cf5..5911275d119720053099aa0fc776fa162fd0aa76 100644
(file)
--- 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 {