[Freeciv-Dev] Re: Connect feature again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 1999/10/24 07:03 , Jarda Benkovsky wrote:
>attached is a Settler's Connect command.
This is a really useful feature, but I have a few comments and suggestions.
First, I agree with some of the "FIXME" comments you put in the code,
pointing out it weaknesses:
** I really do think that this is special enough to warrent its own
activity type, e.g. ACTIVITY_CONNECT.
** Also, to support more than roads, you do need to pass the activity when
you send the packet_unit_request. But, I don't think you need to define a
new packet type. If you changed the current struct packet_unit_request from:
struct packet_unit_request
{
int unit_id;
int city_id;
int x, y;
char name[MAX_LEN_NAME];
};
to:
struct packet_unit_request
{
int unit_id;
int target_id; /* city_id or acitivity_id */
int x, y;
char name[MAX_LEN_NAME];
};
you could pass the activity through target_id (packet_diplomat_action does
something similar).
Then, you wouldn't need the special 'connecting' flag in struct unit, but
you would need to retain what activity the unit should be doing. So:
struct unit {
...
int connecting;
};
could become:
struct unit {
...
int connect_activity;
};
I believe this reorganization is least intrusive, while still providing for
more than just building roads. (I think it'll get rid of a few tests of
'punit->connecting', as well.) However, I haven't looked at this as much
as you have, so I could be missing something.
** The menu short-cut cannot be Shift-C -- that's already used by Find
City. It might, however, be acceptable to change Find City to Ctrl-F,
though this differs from Civ2. Opinions?
** Goto works fine for going to, but for connect it results in terrible,
crooked roads. I would never use it, if it built crooked roads. So, I
think connect needs a different path planner.
** The unit needs an indicator that it is in connect mode. Perhaps a "C",
in the same place as the "A" shows up for auto-settlers.
** If I start a connection with the settler on a road, it wastes a turn
trying to re-road the road. Also, if a city happens to be in the path of
the connection, the settler stops and tries to road the city (which, of
course, already has a road).
** If settler reaches a point where it can't build a road (e.g., a river
before bridge building is known) it wastes a turn trying to build a road
anyway. Should probably just skip that square and go on.
** Finally, we need to figure out a way to allow the user to specify what
activity to do along the way. Any ideas?
jjm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: Connect feature again,
Jeff Mallatt <=
|
|