From da208ebc84671de4a0ea2c09dd1bd8d9c3003b6d Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 20 Oct 2010 19:48:11 -0500 Subject: [PATCH] undo last change --- lib/Lacuna/DB/Result/Map/Body/Planet.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index 103c41e9..06e9705d 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -621,18 +621,18 @@ sub recalc_stats { foreach my $type (ORE_TYPES) { my $method = $type.'_hour'; my $planet_side = sprintf('%.0f',$self->$type * $stats{ore_hour} / 10000); # calculate local spend/prod - if (abs($planet_side) > $stats{$method}) { # local spend might be more than local production - $overage += abs($planet_side) - $stats{$method}; # make up the difference with an overage - $stats{$method} = 0; - } - else { +# if (abs($planet_side) > $stats{$method}) { # local spend might be more than local production +# $overage += abs($planet_side) - $stats{$method}; # make up the difference with an overage +# $stats{$method} = 0; +# } +# else { $stats{$method} += $planet_side; - } +# } } $stats{ore_hour} += $mining_ministry_ore_hour - $overage; # adjust the total ore hour to reflect mining ministry and overage - if ($stats{ore_hour} < 0) { # if there's not enough total ore production to go around - $stats{gold_hour} = $stats{ore_hour}; # arbitrarily assign it to one type - } +# if ($stats{ore_hour} < 0) { # if there's not enough total ore production to go around +# $stats{gold_hour} = $stats{ore_hour}; # arbitrarily assign it to one type +# } $self->update(\%stats); return $self; } -- 2.51.2