From e2aee57cc99237e72d890c193341767d6c13cf9a Mon Sep 17 00:00:00 2001 From: lemming552 Date: Sat, 8 Oct 2011 10:54:04 -0600 Subject: [PATCH] Several more time boundries set. --- lib/Lacuna/DB/Result/Building/SSLa.pm | 5 ++++- lib/Lacuna/DB/Result/Building/Shipyard.pm | 1 + .../DB/Result/Building/Waste/Exchanger.pm | 2 ++ .../DB/Result/Building/Waste/Recycling.pm | 2 ++ var/www/public/changes.txt | 18 ++++++++++-------- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/Lacuna/DB/Result/Building/SSLa.pm b/lib/Lacuna/DB/Result/Building/SSLa.pm index 5f3ff4bb..c887a36d 100644 --- a/lib/Lacuna/DB/Result/Building/SSLa.pm +++ b/lib/Lacuna/DB/Result/Building/SSLa.pm @@ -128,7 +128,10 @@ has plan_time_cost => ( sub plan_cost_at_level { my ($self, $level, $base) = @_; - return sprintf('%.0f', $base * (INFLATION ** $level)); + my $time_cost = sprintf('%.0f', $base * (INFLATION ** $level)); + $time_cost = 15 if ($time_cost < 15); + $time_cost = 5184000 if ($time_cost > 5184000); + return $time_cost; } has max_level => ( diff --git a/lib/Lacuna/DB/Result/Building/Shipyard.pm b/lib/Lacuna/DB/Result/Building/Shipyard.pm index 8de79936..422c7d9e 100644 --- a/lib/Lacuna/DB/Result/Building/Shipyard.pm +++ b/lib/Lacuna/DB/Result/Building/Shipyard.pm @@ -49,6 +49,7 @@ sub get_ship_costs { my $throttle = Lacuna->config->get('ship_build_speed') || 0; my $seconds = sprintf('%0.f', $ship->base_time_cost * $self->time_cost_reduction_bonus(($self->level * 3) + $throttle)); $seconds = 15 if $seconds < 15; + $seconds = 5184000 if ($seconds > 5184000); # 60 Days my $bonus = $self->manufacturing_cost_reduction_bonus; return { seconds => $seconds, diff --git a/lib/Lacuna/DB/Result/Building/Waste/Exchanger.pm b/lib/Lacuna/DB/Result/Building/Waste/Exchanger.pm index 7aa02ef0..27065627 100644 --- a/lib/Lacuna/DB/Result/Building/Waste/Exchanger.pm +++ b/lib/Lacuna/DB/Result/Building/Waste/Exchanger.pm @@ -91,6 +91,8 @@ sub recycle { # start my $seconds = $total * $self->seconds_per_resource; + $seconds = 15 if $seconds < 15; + $seconds = 5184000 if $seconds > 5184000; $self->start_work({ water_from_recycling => $water, ore_from_recycling => $ore, diff --git a/lib/Lacuna/DB/Result/Building/Waste/Recycling.pm b/lib/Lacuna/DB/Result/Building/Waste/Recycling.pm index a67a1492..2baf9860 100644 --- a/lib/Lacuna/DB/Result/Building/Waste/Recycling.pm +++ b/lib/Lacuna/DB/Result/Building/Waste/Recycling.pm @@ -62,6 +62,8 @@ sub recycle { # start my $seconds = $total * $self->seconds_per_resource; + $seconds = 15 if $seconds < 15; + $seconds = 5184000 if $seconds > 5184000; $self->start_work({ water_from_recycling => $water, ore_from_recycling => $ore, diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 8ae8686f..33430e50 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,14 +1,16 @@ 3.0815 - - Fix: Alliance Stats now shows number of space stations and influence - - Fix: Updated documentation for Shipyard - - Fix: API - Added surface version number for bodies to better indicate that a refresh is needed + - Add: Partial repairs on buildings, dependent upon resources, is now possible. + - API: Added surface version number for bodies to better indicate that a refresh is needed. + - Fix: Alliance Stats now shows number of space stations and influence. + - Fix: Updated documentation for Shipyard. - Fix: It is no longer possible to downgrade a spaceport if it could not support the number of ships present. - - Fix: Very high negative happiness, and very long building times should not now crash the planet - - Fix: Empires no longer show a 'ghost' alliance when they leave in the stats page - - Fix: Partial repairs on buildings, dependent upon resources, is now possible - - Fix: Damaged Space Ports no longer count towards the max ships a colony can support - - Fix: Damaged Shipyards no longer count towards the max ships a colony can build + - Fix: Very high negative happiness, and very long building times should not crash the planet. + Maximum build time per building is now 60 days. + - Fix: Empires no longer show a 'ghost' alliance when they leave in the stats page. + - Fix: Damaged Space Ports no longer count towards the max ships a colony can support. + - Fix: Damaged Shipyards no longer count towards the max ships a colony can build. - Fix: Instant spy travel has now been fixed. Spies sent to a colony should only become operational after the ship arrives. + - Fix: Failing Incite Insurrection will catch the instigators and cohorts, instead of doing a self purge. 3.0814 - Fix: creating a munitions lab does not break isolation status -- 2.51.2