diff --git a/docs/Map.pod b/docs/Map.pod index bbb4f81f..15680268 100644 --- a/docs/Map.pod +++ b/docs/Map.pod @@ -49,6 +49,7 @@ Returns a chunk of the map as an array of hashes. "alliance" : { "name" : "The Borg Collective", "id" : 23, + "image" : 'my_logo_v001', } } "bodies" : [ @@ -76,7 +77,8 @@ Returns a chunk of the map as an array of hashes. "y" : 28, "type" : "asteroid", "image" : "p33", - "size" : 3 + "size" : 3, + "body_has_fissure" : 1, }, ... ] diff --git a/lib/Lacuna/DB/Result/Alliance.pm b/lib/Lacuna/DB/Result/Alliance.pm index 2c082c19..72e8812e 100644 --- a/lib/Lacuna/DB/Result/Alliance.pm +++ b/lib/Lacuna/DB/Result/Alliance.pm @@ -17,6 +17,7 @@ __PACKAGE__->add_columns( announcements => { data_type => 'text', is_nullable => 1 }, date_created => { data_type => 'datetime', is_nullable => 0, set_on_create => 1 }, stash => { data_type => 'mediumblob', is_nullable => 1, 'serializer_class' => 'JSON' }, + image => { data_type => 'varchar', size => 255, is_nullable => 0, default => 'default' }, ); __PACKAGE__->belongs_to('leader', 'Lacuna::DB::Result::Empire', 'leader_id', { on_delete => 'set null' }); diff --git a/lib/Lacuna/DB/ResultSet/Map/StarLite.pm b/lib/Lacuna/DB/ResultSet/Map/StarLite.pm index 6aeb55c2..332b0cd1 100644 --- a/lib/Lacuna/DB/ResultSet/Map/StarLite.pm +++ b/lib/Lacuna/DB/ResultSet/Map/StarLite.pm @@ -39,7 +39,7 @@ sub get_star_map { } if (defined $row->station_id) { my $station = $cache->get_and_deserialize('starlite_station',$row->station_id); - if (not $station) { +# if (not $station) { my $station = { id => $row->station->id, name => $row->station->name, @@ -48,11 +48,12 @@ sub get_star_map { alliance => { name => $row->station->alliance->name, id => $row->station->alliance_id, + image => $row->station->alliance->image, } }; # set the expiry to 1hr $cache->set('starlite_station',$row->station_id, $station, 60 * 60); - } +# } $star->{station} = $station; } if (defined $row->body_id) { diff --git a/var/upgrades/3.0887.sql b/var/upgrades/3.0887.sql new file mode 100644 index 00000000..0de70ad1 --- /dev/null +++ b/var/upgrades/3.0887.sql @@ -0,0 +1,4 @@ + +alter table alliance add column image varchar(255) default 'default'; + + diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 32a36bea..65462cb5 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,4 +1,6 @@ 3.0887: + - Mod: UI star map now shows alliance logos over seized stars + - Mod: UI star map now shows fissure logo over planets with fissures on them - Mod: Star-view should now be a little more responsive again - Mod: get_star_map now allows an area up to 3001 units (scan the whole expanse in 1400 RPC anyone?) - Mod: get_star_map now includes alliance details for seized stars