From 53efbf9c1f435ead7388ff2e903b0f1d0209d92f Mon Sep 17 00:00:00 2001 From: lemming552 Date: Sun, 22 Apr 2012 09:24:29 -0600 Subject: [PATCH] Another check for planets that are abandoned before ships arrive. --- lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm b/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm index e39ebe9f..38c1bfa3 100644 --- a/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm +++ b/lib/Lacuna/Role/Ship/Arrive/DumpWaste.pm @@ -18,6 +18,11 @@ after handle_arrival_procedures => sub { # dump it! my $body_attacked = $self->foreign_body; +#If a scow crashes into an unclaimed planet, does anyone hear? + unless ($body_attacked->empire) { + $self->delete; + confess [-1]; + } $body_attacked->add_waste($self->hold_size); $body_attacked->update; -- 2.51.2