From 41c31457b46e2b6413c4efe8ea552a19483f746e Mon Sep 17 00:00:00 2001 From: Darin McBride Date: Wed, 3 Feb 2016 20:48:55 -0700 Subject: [PATCH] Allow sitters to see full stats of their babies' planets. --- lib/Lacuna/DB/Result/Map/Body/Planet.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index 5e80a19c..a8b0a301 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -396,10 +396,14 @@ around get_status => sub { is_isolationist => $self->empire->is_isolationist, }; if (defined $empire) { - if ($empire->id eq $self->empire_id or ( - $self->isa('Lacuna::DB::Result::Map::Body::Planet::Station') && - $empire->alliance_id && $self->empire->alliance_id == $empire->alliance_id ) - ) { + if ($empire->id eq $self->empire_id or + ( + $self->isa('Lacuna::DB::Result::Map::Body::Planet::Station') && + $empire->alliance_id && $self->empire->alliance_id == $empire->alliance_id + ) or + # maybe current empire is a sitter for the empire that owns this body? + $empire->babies->search({id => $self->empire_id})->count + ) { if ($self->needs_recalc) { $self->tick; # in case what we just did is going to change our stats } -- 2.51.2