From 6d86fcad4cdd8a6dc60627d472cd9caf46e23e9f Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Tue, 5 Apr 2011 18:23:50 -0500 Subject: [PATCH] Fix fighter reset --- lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm | 13 +++++++++++-- var/www/public/changes.txt | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm b/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm index a3e0e6c7..7c12622f 100644 --- a/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm +++ b/lib/Lacuna/Role/Ship/Arrive/TriggerDefense.pm @@ -104,8 +104,17 @@ sub ship_to_ship_combat { $ship->delete; } else { - # "reset" - $ship->send(target => $self->foreign_body->star); + # just return home + if ($ship->task eq 'Defend') { + $ship->send( + target => $self->foreign_body, + direction => 'in', + ); + } + else { + # reset to star and back + $ship->send(target => $self->foreign_body->star); + } } } diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 5cd404a3..1f5f29a5 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -9,6 +9,7 @@ - API: Added view_taxes_collected to the Parliament module. - Fix: Police Station docs now show up under Modules instead of Buildings. - Fix: view_ships_orbiting will now return the ships that are orbiting your planet instead of just the count. + - Fix: Fighters will return home after defending (instead of doubling the travel time). 3.0402 - API: Changed parliament propositions and laws to use email formatting rules. -- 2.54.0