From 75a48edbd71347c5de682240bb0cb60c11242197 Mon Sep 17 00:00:00 2001 From: lemming552 Date: Wed, 16 May 2012 17:26:26 -0600 Subject: [PATCH] Stop rapid decent of happiness with a recalc once you cross into negative happiness from negative plots. --- lib/Lacuna/DB/Result/Map/Body/Planet.pm | 2 ++ var/www/public/changes.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index b72155dc..aa990e28 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -1265,6 +1265,8 @@ sub tick_to { my $seconds = $now->epoch - $self->last_tick->epoch; my $tick_rate = $seconds / 3600; $self->last_tick($now); +# Check to see if downward spiral still happening in happiness from negative plots. + $self->needs_recalc(1) if ($self->happiness < 0 and $self->happiness_hour < -20_000); if ($self->needs_recalc) { $self->recalc_stats; } diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index d807a055..e0491493 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -2,7 +2,7 @@ - Mod: Multiple plans buildable in Archaeology Ministry via API. - Mod: view_plans from Planetary and Station Commands consolidated. UI updated to reflect. - Mod: You don't have to build all Halls of Vrbansk to sacrifice (only one) - - Add: API only, supply chain to any planet or SS. Note. No UI support yet. + - Add: Supply chain to any planet or SS. - Fix: Damaged Trade Ministry reduces the waste transferred in a waste chain. - Fix: Scows are no longer tagged with 'Trade' - Mod: Change in consumption rates for secondary food. -- 2.54.0