diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm index 3a40c0a9..02b68006 100644 --- a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -215,9 +215,9 @@ sub generate_singularity { confess [ $chance->{throw}, $chance->{reason} ]; } # TEST SETTINGS -# $task->{waste_cost} = 1; -# $task->{recovery} = 5; -# $task->{side_chance} = 95; + $task->{waste_cost} = 1; + $task->{recovery} = 5; + $task->{side_chance} = 95; # $chance->{success} = 100; # TEST SETTINGS my $btype; @@ -480,7 +480,13 @@ sub bhg_swap { star_id => $new_data->{star_id}, orbit => $new_data->{orbit}, }); -#confess [ 9999, 'in swap!' ]; + my $waste_chain = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') + ->search({ planet_id => $body->body_id }); + if ($waste_chain->count > 0) { + while (my $chain = $waste_chain->next) { + $chain->star_id($new_data->{star_id}); + } + } unless ($new_data->{type} eq "empty") { $target->update({ needs_recalc => 1, @@ -490,6 +496,13 @@ sub bhg_swap { star_id => $old_data->{star}, orbit => $old_data->{orbit}, }); + $waste_chain = Lacuna->db->resultset('Lacuna::DB::Result::WasteChain') + ->search({ planet_id => $target->body_id }); + if ($waste_chain->count > 0) { + while (my $chain = $waste_chain->next) { + $chain->star_id($old_data->{star}); + } + } } return { message => "Swapped Places", diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 5acfb48d..b7333572 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,8 +1,9 @@ 3.0851: - Mod: Change in consumption rates for secondary food. -# - Fix: Colony ships and trade ships in flight away from insurrected planet now switch flag to their own Capitol. -# - Fix: Bleeders no longer count toward population totals. + - Fix: Colony ships and trade ships in flight away from insurrected planet now switch flag to their own Capitol. + - Fix: Bleeders no longer count toward population totals. - Mod: Stockpile change is testing. + - Fix: Waste Chains have star_id change to current star in moved via BHG. 3.0850: - Fix: All non-trade inflight ships self destruct from an insurrected planet.