Skip to content
Browse files

plan sort on glyph-standard-module

  • Loading branch information...
1 parent e9aa2d0 commit dd2ae37180d429e9f02ddcca8c7b0bd1ba645666 @lemming552 lemming552 committed
View
4 lib/Lacuna/DB/Result/Building.pm
@@ -62,6 +62,10 @@ use constant building_prereq => {};
use constant name => 'Building';
+sub sortable_name {
+ '50'.shift->name
+}
+
sub image {
confess 'override me';
}
View
4 lib/Lacuna/DB/Result/Building/Module.pm
@@ -25,6 +25,10 @@ use constant food_to_build => 100;
use constant ore_to_build => 500;
use constant water_to_build => 150;
+sub sortable_name {
+ '75'.shift->name
+}
+
around spend_efficiency => sub {
my ($orig, $self, $amount) = @_;
if ($self->efficiency <= $amount) {
View
4 lib/Lacuna/DB/Result/Building/Permanent.pm
@@ -5,5 +5,9 @@ use utf8;
no warnings qw(uninitialized);
extends 'Lacuna::DB::Result::Building';
+sub sortable_name {
+ '25'.shift->name
+}
+
no Moose;
__PACKAGE__->meta->make_immutable(inline_constructor => 0);
View
2 lib/Lacuna/DB/Result/Map/Body/Planet.pm
@@ -44,7 +44,7 @@ sub sorted_plans {
my ($self) = @_;
my @sorted_plans = sort {
- $a->class->name cmp $b->class->name
+ $a->class->sortable_name cmp $b->class->sortable_name
|| $a->level cmp $b->level
|| $b->extra_build_level cmp $a->extra_build_level
} @{$self->plan_cache};
View
1 var/www/public/changes.txt
@@ -2,6 +2,7 @@
- Fix: Gratch's Gauntlet on repair, checks spies current status.
- Mod: Redid Political Propaganda as a constant task.
- Mod: Cult less effective against planets running propaganda campaigns.
+ - Mod: Plan sorting is Glyph-Standard-Module Order
3.0899:
- Mod: Different speeds for the various Supply Pods. Smaller the pod, the faster.

0 comments on commit dd2ae37

Please sign in to comment.
Something went wrong with that request. Please try again.