Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7131) client orders to replace client goto
Home

[Freeciv-Dev] Re: (PR#7131) client orders to replace client goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7131) client orders to replace client goto
From: "Arnstein Lindgard" <a-l@xxxxxxx>
Date: Wed, 7 Jan 2004 05:55:13 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7131 >

On Sun, 4 Jan 2004 23:19:30 -0800 Jason Short wrote:
> Here's a first implementation of client orders.

1)
> ACTIVITY_GOTO is dropped for use with client goto (it is still used for 
> server goto, but server goto should become deprecated when client-side 
> air goto is implemented).  Instead a unit on client orders may have any 
> activity (it will be ACTIVITY_IDLE for standard goto) and has 
> punit->has_orders set.  But a unit on a connect orders may have, for 
> instance, ACTIVITY_ROAD instead.

I'll define a "mission order" as an order to be executed only on the
last position in the path. Some sprites are involved.

My interpretation is that you intend activity to be used for
connecting workers, and for mission orders I'd expand this

enum unit_orders {
  ORDERS_MOVE, ORDERS_WAIT
};

with items that duplicate allowed "activities", plus a few more like
build city. Or maybe use a union that includes unit_activity or
unit_orders.

2) Maybe a patroller should go into waiting instead of covering the
same distance twice or more on the same turn, when moves left is
greater than route distance.

3) I suggest expanding the boolean "has_orders" into an enum:

enum order_types {
  OTYPE_NONE = 0, OTYPE_GOTO, OTYPE_STATIONARY
};
#define unit_has_orders(punit)        \
  ((punit)->has_orders > OTYPE_NONE)

so that the client knows whether to display the "G" sprite, since
you're removing ACTIVITY_GOTO. For the Mission orders patch, a
settler retains a "B" sprite for one turn after reaching the
destination, because he needs a MP to found city. Ie on the last turn
there should only be a "B" and no "G". Also then we could have a
queue of orders to be executed on the same tile, and maybe a new
sprite other than "G".


Arnstein




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