From c4fde040062f4bcb61317e952d473a6f55d71265 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 9 Mar 2011 17:17:44 -0600 Subject: [PATCH] clean up all the stuff that might be on the planet before conversion --- lib/Lacuna/DB/Result/Map/Body/Planet.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index 8d48bb15..2b6fd52e 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -697,6 +697,9 @@ sub convert_to_station{ $self->build_building($command); $command->finish_upgrade; + # clean it + $self->buildings->delete_all; + # add parliament my $parliament = Lacuna->db->resultset('Lacuna::DB::Result::Building')->new({ x => -1, -- 2.51.2