[Freeciv-Dev] design of future orders
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
For Arnstein's "mission orders" match he needs to add new possibilities
for orders. Currently there are two possible orders: wait and move.
His patch adds many more possible orders:
Activity orders:
pollution, road, mine, irrigate, fortify, fortress, sentry,
railroad, pillage, transform, airbase, fallout.
Action orders: autoattack, autosettle, build wonder, disband, set
homecity, build trade route, unload.
Diplomat actions: bribe, embassy, sabotage, steal, incite, poison,
investigate, sabotage unit, get sabotage list, move
The question is what the interface for all this should look like.
My plan was for a single enumeration:
{ORDER_WAIT, ORDER_MOVE, ORDER_ACTIVITY, ORDER_AUTOATTACK, ...,
ORDER_UNLOAD, ORDER_DIPLOMAT}
with secondary (alread existing) structs to hold the move direction,
activity, or diplomatic action.
Arnstein's plan renumbers the existing enumerations:
{ACTIVITY_IDLE, ... ACTIVITY_MINE,
ACTIVITY_LAST}
{ACTION_AUTOATTACK = (ACTIVITY_LAST + 1), ..., ACTION_UNLOAD,
ACTION_LAST}
{DIPLOMAT_BRIBE = (ACTION_LAST + 1), ..., DIPLOMAT_MOVE,
DIPLOMAT_LAST}
{ORDER_MOVE = (DIPLOMAT_LAST + 1), ORDER_FINISH_TURN, ORDER_LAST}
where four enumerations are used (3 of them new) and the final order
type is just an integer comprising the union of the four.
On further reflection I don't think either of these methods are ideal.
Does anyone have suggestions?
jason
- [Freeciv-Dev] design of future orders,
Jason Dorje Short <=
|
|