Skip to content

Commit

Permalink
Finished up Bugout and fetch bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemming552 committed Nov 30, 2014
1 parent 4c33f1b commit 1eae1b3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/Body.pod
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ B<NOTE:> You should probably B<never> 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,
Expand Down
10 changes: 9 additions & 1 deletion docs/Intelligence.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion lib/Lacuna/DB/Result/Ships/SpyPod.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion lib/Lacuna/DB/Result/Ships/SpyShuttle.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Lacuna/DB/Result/Spies.pm
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ sub neutral_assignments {
{
task =>'Bugout',
recovery => 0,
skill => '*',
skill => 'intel',
},
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Lacuna/RPC/Building/SpacePort.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
10 changes: 5 additions & 5 deletions lib/Lacuna/Role/Ship/Arrive/Orbit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions lib/Lacuna/Role/Ship/Arrive/PickUpSpies.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ after handle_arrival_procedures => sub {
# object_type => ref($self),
# object_id => $self->id,
#})->insert;
confess [-1];
};

1;

0 comments on commit 1eae1b3

Please sign in to comment.