From 1eae1b35eb919ee4e1d2b4080bbc17c1179475bf Mon Sep 17 00:00:00 2001 From: Mark Lemming Date: Sun, 30 Nov 2014 16:52:14 -0700 Subject: [PATCH] Finished up Bugout and fetch bugs. --- docs/Body.pod | 1 + docs/Intelligence.pod | 10 +++++++++- lib/Lacuna/DB/Result/Ships/SpyPod.pm | 1 - lib/Lacuna/DB/Result/Ships/SpyShuttle.pm | 2 +- lib/Lacuna/DB/Result/Spies.pm | 2 +- lib/Lacuna/RPC/Building/SpacePort.pm | 2 +- lib/Lacuna/Role/Ship/Arrive/Orbit.pm | 10 +++++----- lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm | 1 + 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/Body.pod b/docs/Body.pod index fb9a752b..3253f3fd 100644 --- a/docs/Body.pod +++ b/docs/Body.pod @@ -50,6 +50,7 @@ B You should probably B call this method directly, as it is a wast "happiness" : 3939, "happiness_hour" : 25, "unhappy_date" : "01 13 2014 16:11:21 +0600", # Only given if happiness is below zero + "neutral_entry" : "01 13 2014 16:11:21 +0600", # Earliest time body can enter neutral area "propaganda_boost" : 20, "food_stored" : 33329, "food_capacity" : 40000, diff --git a/docs/Intelligence.pod b/docs/Intelligence.pod index 8462bcd0..472ae8ac 100644 --- a/docs/Intelligence.pod +++ b/docs/Intelligence.pod @@ -309,6 +309,10 @@ A string containing the new assignment name. These are the possible assignments: Don't do anything. +=item Bugout + +Only visible on non-home planets. Immediately has agent go to their home base via spypod. + =item Counter Espionage. Passively defend against all attackers. @@ -335,7 +339,7 @@ Train in Theft skill =item Political Propaganda -Give happiness generation a boost. Especially effective on unhappy colonies, but hastens an agent toward retirement. +Give happiness generation a boost. Especially effective on unhappy colonies, but hastens an agent toward retirement. Only usuable on owned planets. =item Gather Resource Intelligence @@ -377,6 +381,10 @@ Kill spies. Destroy buildings. +=item Sabotage Defenses + +Destroy buildings that are used in defense. + =item Sabotage BHG Prevent enemy planet from using Black Hole Generator. diff --git a/lib/Lacuna/DB/Result/Ships/SpyPod.pm b/lib/Lacuna/DB/Result/Ships/SpyPod.pm index b192db80..b0a1c1f1 100644 --- a/lib/Lacuna/DB/Result/Ships/SpyPod.pm +++ b/lib/Lacuna/DB/Result/Ships/SpyPod.pm @@ -26,7 +26,6 @@ with "Lacuna::Role::Ship::Send::NotIsolationist"; with "Lacuna::Role::Ship::Send::LoadWithSpies"; with "Lacuna::Role::Ship::Send::IsHostile"; with "Lacuna::Role::Ship::Arrive::CaptureWithSpies"; -with "Lacuna::Role::Ship::Arrive::PickUpSpies"; with "Lacuna::Role::Ship::Arrive::CargoExchange"; with "Lacuna::Role::Ship::Arrive::Scuttle"; diff --git a/lib/Lacuna/DB/Result/Ships/SpyShuttle.pm b/lib/Lacuna/DB/Result/Ships/SpyShuttle.pm index 76336f0e..9bf8c5df 100644 --- a/lib/Lacuna/DB/Result/Ships/SpyShuttle.pm +++ b/lib/Lacuna/DB/Result/Ships/SpyShuttle.pm @@ -26,8 +26,8 @@ with "Lacuna::Role::Ship::Send::NotIsolationist"; with "Lacuna::Role::Ship::Send::LoadWithSpies"; with "Lacuna::Role::Ship::Send::IsHostile"; with "Lacuna::Role::Ship::Arrive::CaptureWithSpies"; -with "Lacuna::Role::Ship::Arrive::Orbit"; with "Lacuna::Role::Ship::Arrive::PickUpSpies"; +with "Lacuna::Role::Ship::Arrive::Orbit"; with "Lacuna::Role::Ship::Arrive::CargoExchange"; no Moose; diff --git a/lib/Lacuna/DB/Result/Spies.pm b/lib/Lacuna/DB/Result/Spies.pm index 5c9d0028..cadf3049 100644 --- a/lib/Lacuna/DB/Result/Spies.pm +++ b/lib/Lacuna/DB/Result/Spies.pm @@ -279,7 +279,7 @@ sub neutral_assignments { { task =>'Bugout', recovery => 0, - skill => '*', + skill => 'intel', }, ); } diff --git a/lib/Lacuna/RPC/Building/SpacePort.pm b/lib/Lacuna/RPC/Building/SpacePort.pm index d69a89e4..bee81300 100644 --- a/lib/Lacuna/RPC/Building/SpacePort.pm +++ b/lib/Lacuna/RPC/Building/SpacePort.pm @@ -639,7 +639,7 @@ sub prepare_fetch_spies { } my $ships = Lacuna->db->resultset('Lacuna::DB::Result::Ships')->search( - {type => { in => [qw(spy_pod cargo_ship smuggler_ship dory spy_shuttle barge)]}, + {type => { in => [qw(cargo_ship smuggler_ship dory spy_shuttle barge)]}, task=>'Docked', body_id => $to_body_id, berth_level => {'<=' => $max_berth } }, {order_by => 'name', rows=>100} diff --git a/lib/Lacuna/Role/Ship/Arrive/Orbit.pm b/lib/Lacuna/Role/Ship/Arrive/Orbit.pm index bff33ede..a0551661 100644 --- a/lib/Lacuna/Role/Ship/Arrive/Orbit.pm +++ b/lib/Lacuna/Role/Ship/Arrive/Orbit.pm @@ -9,13 +9,13 @@ after handle_arrival_procedures => sub { # cannot orbit stars return unless $self->foreign_body_id; - # only orbit on arrival to the foreign body - return if $self->direction eq 'in'; + # only orbit on arrival to the foreign body + return if $self->direction eq 'in'; - return if ( $self->payload->{fetch_spies} ); # Don't orbit if we're fetching - $self->orbit->update; + return if ( $self->payload->{fetch_spies} ); # Don't orbit if we're fetching + $self->orbit->update; - confess [-1]; + confess [-1]; }; 1; diff --git a/lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm b/lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm index cd010c09..eba532ba 100644 --- a/lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm +++ b/lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm @@ -62,6 +62,7 @@ after handle_arrival_procedures => sub { # object_type => ref($self), # object_id => $self->id, #})->insert; + confess [-1]; }; 1; -- 2.51.2