diff --git a/lib/Lacuna/DB/Result/Building/Module.pm b/lib/Lacuna/DB/Result/Building/Module.pm index 97b12476..334dae30 100644 --- a/lib/Lacuna/DB/Result/Building/Module.pm +++ b/lib/Lacuna/DB/Result/Building/Module.pm @@ -58,7 +58,13 @@ before can_upgrade => sub { my $self = shift; my $plan = $self->body->get_plan($self->class, $self->level + 1); if (defined $plan) { - return 1; + my $command = $self->body->command; + if ($command->level >= $self->level + 1 || $self->isa('Lacuna::DB::Result::Building::StationCommand')) { + return 1; + } + else { + confess [1013, 'A module cannot be upgraded past the level of station command.']; + } } else { confess [1013, 'You need a plan to upgrade this module.']; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index a8c73fd8..7f923436 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,6 +1,7 @@ 3.0400 - Add: Added the Opera House, Art Museum, and Culinary Institute space station modules. - Rule: SAWs now cost less in upkeep. + - Rule: Station modules cannot be upgraded past the station command level. - API: Added proposing enacting writs at Parliament level 4. - API: Added transfering ownership of stations at Parliament level 5. - API: Added proposing firing the station's BFG at Parliament level 30.