Permalink
Browse files

Stakes didn't check to see if their destination was an asteroid on ar…

…rival.
  • Loading branch information...
lemming552
lemming552 committed Jul 26, 2012
1 parent 1b2d340 commit 7d7654456de358486d18ddde7a253c0cce9a6d06
View
@@ -7,7 +7,7 @@ use Config::JSON;
useall __PACKAGE__;
our $VERSION = 3.0862;
our $VERSION = 3.0863;
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});
@@ -15,7 +15,11 @@ after handle_arrival_procedures => sub {
my $claimed = 0;
my $claimer_id = 0;
my $claimed_by = 'Unknown';
if ($planet->is_locked) {
my $asteroid = 0;
if ($planet->isa('Lacuna::DB::Result::Map::Body::Asteroid')) {
$asteroid = 1;
}
elsif ($planet->is_locked) {
$claimed = 1;
}
elsif ($planet->empire_id) {
@@ -35,7 +39,13 @@ after handle_arrival_procedures => sub {
params => [$self->name, $planet->x, $planet->y, $planet->name, $claimer_id, $claimed_by],
);
}
elsif ($asteroid) {
$empire->send_predefined_message(
tags => ['Colonization','Alert'],
filename => 'cannot_stake_asteroid.txt',
params => [$self->name, $planet->x, $planet->y, $planet->name],
);
}
# let's claim this for our very own!
else {
$planet->claim($empire->id);
@@ -0,0 +1,7 @@
Coming Home
~~~
Our Stake named %s arrived at {Starmap %s %s %s} and found that it had been turned into an asteroid. The Stake has rerouted back home.
Regards,
Your Humble Assistant
@@ -1,3 +1,6 @@
3.0863:
- Fix: Stakes no longer will attempt to stake asteroids.
3.0862:
- Fix: Fixed broken seize method for Parliament.
- Fix: Checked for an empty argument SQL call.

0 comments on commit 7d76544

Please sign in to comment.