Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] (PR#3535) Return and Recover
Home

[Freeciv-Dev] (PR#3535) Return and Recover

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: arnstein.lindgard@xxxxxxx
Subject: [Freeciv-Dev] (PR#3535) Return and Recover
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Jun 2003 12:57:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Thu Jun 26 21:51:18 2003]:

> [ali - Wed Feb 26 17:39:08 2003]:
> 
> > The idea is to send a ship home to nearest city and
> > automatically sentry; because this is something a good
> > player does often (to preserve your new veteran status
> > maybe, and come back with a vengeance later).
> 
> The patch should use pathfinding rather than iterate_outwards.
> 
> Overloading MENU_ORDER_ROAD isn't so good.  To use 'r' as the command we
> should find a better way.
> 
> It would also be nice to separate it from the "mass orders" patch. 
> Simply pressing a key to return-and-recover one of your units is a very
> useful feature.

This patch is basically a rewrite of this feature:

- find_nearest_allied_city uses pathfinding to search for the closest
city.  It works easily for both sea and land units.

- The extra mass_orders code is no longer needed.  However, this means
the "and recover" part isn't feasible: we just return to the nearest
city without then sentrying.

- A new menu item, "Return to nearest city" (shift-g), is added.

I'm a bit unsure about the pathfinding code, but I'm pretty sure the
path is found twice: once to find the nearest allied city, and again
when sending the goto route.  The goto line is also drawn, but will
immediately be undrawn - giving somewhat inconsistent results.

Nonetheless, this is a simple patch that adds a very useful feature.

jason

Attachment: return_and_recover.diff
Description: return_and_recover.diff


[Prev in Thread] Current Thread [Next in Thread]