From b40893c403820afe03b4f4e299250c9cf174a145 Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Mon, 2 May 2011 20:57:12 -0500 Subject: [PATCH] Fix: New players will not be given a planet around a star under the member's only colonization law. --- lib/Lacuna/DB/Result/Empire.pm | 7 +++++++ var/www/public/changes.txt | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Lacuna/DB/Result/Empire.pm b/lib/Lacuna/DB/Result/Empire.pm index d56e78d6..ee986160 100644 --- a/lib/Lacuna/DB/Result/Empire.pm +++ b/lib/Lacuna/DB/Result/Empire.pm @@ -481,6 +481,13 @@ sub find_home_planet { # find an uncontested planet in the possible planets my $home_planet; while (my $planet = $possible_planets->next) { + # skip planets with member's only colonization + if ($planet->star->station_id) { + if ($planet->star->station->laws->search({type => 'MembersOnlyColonization'})->count) { + next; + } + } + unless ($planet->is_locked) { $planet->lock; $home_planet = $planet; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index a7a68099..19880f06 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,5 +1,6 @@ 3.0702 - - Fix: Member's only colonization functions properly now. + - Fix: Member's only colonization properly checks the Alliance id. + - Fix: New players will not be given a planet around a star under the member's only colonization law. 3.0701 - Fix: Passed EvictMiningPlatform, FireBfg, RenameAsteroid, RenameStar and RenameUninhabited propositions will no longer fail with not in jurisdiction errors when they should not. -- 2.51.2