From e4f9620ce6282fb2d2440ed12a9dd4e179e323d1 Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Mon, 2 May 2011 20:49:30 -0500 Subject: [PATCH] Fix: Member's only colonization functions properly now. --- lib/Lacuna.pm | 2 +- lib/Lacuna/Role/Ship/Arrive/Colonize.pm | 4 +++- var/www/public/changes.txt | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Lacuna.pm b/lib/Lacuna.pm index e1949739..3127b9d1 100644 --- a/lib/Lacuna.pm +++ b/lib/Lacuna.pm @@ -7,7 +7,7 @@ use Config::JSON; useall __PACKAGE__; -our $VERSION = 3.0701; +our $VERSION = 3.0702; my $config = Config::JSON->new('/data/Lacuna-Server/etc/lacuna.conf'); my $db = Lacuna::DB->connect($config->get('db/dsn'),$config->get('db/username'),$config->get('db/password'), { mysql_enable_utf8 => 1}); diff --git a/lib/Lacuna/Role/Ship/Arrive/Colonize.pm b/lib/Lacuna/Role/Ship/Arrive/Colonize.pm index 6440ef6c..21f2baa1 100644 --- a/lib/Lacuna/Role/Ship/Arrive/Colonize.pm +++ b/lib/Lacuna/Role/Ship/Arrive/Colonize.pm @@ -53,7 +53,9 @@ after can_send_to_target => sub { confess [ 1009, 'Your species cannot survive on that planet.' ] if ($empire->university_level < 18 && ($target->orbit > $empire->max_orbit || $target->orbit < $empire->min_orbit)); if ($target->star->station_id) { if ($target->star->station->laws->search({type => 'MembersOnlyColonization'})->count) { - confess [1010, 'Only '.$target->star->station->alliance->name.' members can colonize planets in the jurisdiction of the space station.']; + unless ($target->star->station->alliance_id == $self->body->empire->alliance_id) { + confess [1010, 'Only '.$target->star->station->alliance->name.' members can colonize planets in the jurisdiction of the space station.']; + } } } return 1; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 79b60458..a7a68099 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,3 +1,6 @@ +3.0702 + - Fix: Member's only colonization functions properly now. + 3.0701 - Fix: Passed EvictMiningPlatform, FireBfg, RenameAsteroid, RenameStar and RenameUninhabited propositions will no longer fail with not in jurisdiction errors when they should not. - Fix: Passed RenameAsteroid and RenameUninhabited propositions will no longer fail with a DBIx error. -- 2.51.2