From 76ee26d4d697c420c544a3be2e158074e58110f5 Mon Sep 17 00:00:00 2001 From: lemming552 Date: Thu, 2 Aug 2012 16:47:10 -0600 Subject: [PATCH 1/2] Slightly clearer text. --- var/messages/tutorial/counter_spy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/messages/tutorial/counter_spy.txt b/var/messages/tutorial/counter_spy.txt index e7d39668..12b2601e 100644 --- a/var/messages/tutorial/counter_spy.txt +++ b/var/messages/tutorial/counter_spy.txt @@ -9,5 +9,5 @@ Regards, Not Tou Re Ell (I'm evil, you just don't know it yet!) Lacuna Expanse Corp -Task: Train another spy and assign them to Counter Espionage. +Task: Train another spy and assign both of them to Counter Espionage. Reward: Free resources. -- 2.51.2 From 51ef17151528e950f44370468d2ac3fc26f0ef0b Mon Sep 17 00:00:00 2001 From: lemming552 Date: Wed, 8 Aug 2012 19:55:09 -0600 Subject: [PATCH 2/2] Fixed BHG related supply chain. --- lib/Lacuna/RPC/Building/BlackHoleGenerator.pm | 30 ++++++++++--------- var/www/public/changes.txt | 1 + 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm index e51320b5..839fd651 100644 --- a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -482,16 +482,6 @@ sub bhg_swap { star_id => $new_data->{star_id}, orbit => $new_data->{orbit}, }); - my $waste_chain = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') - ->search({ planet_id => $body->id }); - if ($waste_chain->count > 0) { - while (my $chain = $waste_chain->next) { - $chain->update({ - star_id => $new_data->{star_id} - }); - } - $body->recalc_chains; - } unless ($new_data->{type} eq "empty") { $target->update({ @@ -502,17 +492,29 @@ sub bhg_swap { star_id => $old_data->{star_id}, orbit => $old_data->{orbit}, }); - $waste_chain = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') + my $target_waste = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') ->search({ planet_id => $target->id }); - if ($waste_chain->count > 0) { - while (my $chain = $waste_chain->next) { + if ($target_waste->count > 0) { + while (my $chain = $target_waste->next) { $chain->update({ star_id => $old_data->{star_id} }); } - $target->recalc_chains; + } + $target->recalc_chains; # Recalc all chains + } + + my $waste_chain = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') + ->search({ planet_id => $body->id }); + if ($waste_chain->count > 0) { + while (my $chain = $waste_chain->next) { + $chain->update({ + star_id => $new_data->{star_id} + }); } } + $body->recalc_chains; # Recalc all chains + return { id => $body->id, message => "Swapped Places", diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 9e33e3f7..1009dfe3 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -2,6 +2,7 @@ - Mod: Removed option to disable display of incoming ships. (To see if it fixes some resource issues) - Mod: Attempt to make Counter Espionage tutorial message clearer since people don't read the entire email. - Fix: Stockpile wasn't checking levels properly on downgrade and demolish. + - Fix: Chains were being recalculated at the wrong time if a swap was being done with it's target. 3.0864: - Mod: LCOT cheaper to build, longer to build, and spy proofed. -- 2.51.2