From 76c0ef027a4248e0a7a8fa7a97c0c6af4b43ed72 Mon Sep 17 00:00:00 2001 From: Iain C Docherty Date: Wed, 6 Feb 2013 20:31:16 -0500 Subject: [PATCH] Sort glyphs alphabetically --- lib/Lacuna.pm | 2 +- lib/Lacuna/Role/TraderRpc.pm | 4 ++-- var/www/public/changes.txt | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Lacuna.pm b/lib/Lacuna.pm index 1594d7e8..a5b1fb42 100644 --- a/lib/Lacuna.pm +++ b/lib/Lacuna.pm @@ -7,7 +7,7 @@ use Config::JSON; useall __PACKAGE__; -our $VERSION = 3.0879; +our $VERSION = 3.0880; 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}); diff --git a/lib/Lacuna/Role/TraderRpc.pm b/lib/Lacuna/Role/TraderRpc.pm index 337944ab..52a6828e 100644 --- a/lib/Lacuna/Role/TraderRpc.pm +++ b/lib/Lacuna/Role/TraderRpc.pm @@ -207,10 +207,10 @@ sub get_glyph_summary { my $empire = $self->get_empire_by_session($session_id); my $building = $self->get_building($empire, $building_id); - my $glyphs = $building->body->glyph; + my @glyphs = sort {$a->type cmp $b->type} $building->body->glyph->all; my @out; - while (my $glyph = $glyphs->next) { + foreach my $glyph (@glyphs) { push @out, { id => $glyph->id, name => $glyph->type, diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 2da8b3b6..3a536525 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,3 +1,6 @@ +3.0880: + - Fix: Glyphs should now show in alpha order in the TM and SST + 3.0879: - Fix: Eveins should no longer destruct after an upgrade - Add: Upgrading and evein adds the remaining time for this level to the next -- 2.51.2