[Freeciv-Dev] (PR#7667) Wishlist: "load" and "unload" commands
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7667) Wishlist: "load" and "unload" commands |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Tue, 30 Mar 2004 21:05:41 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7667 >
Vasc is working on an interface for the load and unload commands in gtk2.
But we have to implement the backend for them. There is a bit of a
problem with naming. We need 2 new client functions:
request_unit_load(struct unit *pcargo, struct unit *ptrans);
request_unit_unload(struct unit *pcargo, struct unit *ptrans);
/* TODO: key_unit_load and key_unit_unload functions. */
Plus two new common functions:
can_unit_load(struct unit *pcargo, struct unit *ptrans);
can_unit_unload(struct unit *pcargo, struct unit *ptrans);
And two new packets: packet_unit_load and packet_unit_unload.
The problem is there's already an unload command. It operates on a
tranporter and sends an "unload" packet to the server. The server in
turn is supposed to unload these units (as a side note I think this code
is broken). The client already has a request_unit_load and key_unit_load.
My proposal is that the original unload packet is removed and the
existing _unload functions are renamed to _unload_all. The unload_all
function at the client would then iterate over each unloadable unit and
call unload() for that unit.
If a wakeup (unsentrying) is desired for the unload operation, this
should be handled at the client end.
A patch will follow.
jason
|
|