Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10999) unload order
Home

[Freeciv-Dev] (PR#10999) unload order

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#10999) unload order
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2004 11:35:07 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [chrisk - Sat Nov 13 11:37:56 2004]:
> 
> 
> CVS 13 NOV 2004 S2 GTK2
> 
> The unload order (shift-u) for ships is displayed in the orders menu even
> for transporter ships that are empty.

And here's a patch, without the garbage, for real this time.
Index: client/gui-ftwl/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-ftwl/mapview.c,v
retrieving revision 1.11
diff -u -r1.11 mapview.c
--- client/gui-ftwl/mapview.c   9 Oct 2004 16:48:27 -0000       1.11
+++ client/gui-ftwl/mapview.c   15 Nov 2004 19:01:18 -0000
@@ -1446,7 +1446,7 @@
       ADD("unit_homecity");
     }
 
-    if (get_transporter_capacity(punit) > 0) {
+    if (get_transporter_occupancy(punit) > 0) {
       ADD("unit_unload");
     }
     if (is_unit_activity_on_tile(ACTIVITY_SENTRY, punit->tile)) {
Index: client/gui-gtk/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/menu.c,v
retrieving revision 1.91
diff -u -r1.91 menu.c
--- client/gui-gtk/menu.c       19 Oct 2004 06:29:12 -0000      1.91
+++ client/gui-gtk/menu.c       15 Nov 2004 19:01:18 -0000
@@ -1160,7 +1160,7 @@
       menus_set_sensitive("<main>/_Orders/Make _Homecity",
                          can_unit_change_homecity(punit));
       menus_set_sensitive("<main>/_Orders/_Unload Transporter",
-                         get_transporter_capacity(punit)>0);
+                         get_transporter_occupancy(punit) > 0);
       menus_set_sensitive("<main>/_Orders/Load",
        can_unit_load(punit, find_transporter_for_unit(punit,
                                                       punit->tile)));
Index: client/gui-gtk-2.0/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/menu.c,v
retrieving revision 1.53
diff -u -r1.53 menu.c
--- client/gui-gtk-2.0/menu.c   13 Nov 2004 23:35:49 -0000      1.53
+++ client/gui-gtk-2.0/menu.c   15 Nov 2004 19:01:19 -0000
@@ -1314,7 +1314,7 @@
       menus_set_sensitive("<main>/_Orders/Make _Homecity",
                          can_unit_change_homecity(punit));
       menus_set_sensitive("<main>/_Orders/_Unload Transporter",
-                         get_transporter_capacity(punit)>0);
+                         get_transporter_occupancy(punit) > 0);
       menus_set_sensitive("<main>/_Orders/_Load",
        can_unit_load(punit, find_transporter_for_unit(punit,
                                                       punit->tile)));
Index: client/gui-mui/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/gui_main.c,v
retrieving revision 1.87
diff -u -r1.87 gui_main.c
--- client/gui-mui/gui_main.c   13 Nov 2004 09:26:51 -0000      1.87
+++ client/gui-mui/gui_main.c   15 Nov 2004 19:01:19 -0000
@@ -1259,7 +1259,8 @@
       menu_entry_sensitive(MENU_ORDER_SENTRY, can_unit_do_activity(punit, 
ACTIVITY_SENTRY));
       menu_entry_sensitive(MENU_ORDER_PILLAGE, can_unit_do_activity(punit, 
ACTIVITY_PILLAGE));
       menu_entry_sensitive(MENU_ORDER_HOMECITY, 
can_unit_change_homecity(punit));
-      menu_entry_sensitive(MENU_ORDER_UNLOAD, get_transporter_capacity(punit) 
> 0);
+      menu_entry_sensitive(MENU_ORDER_UNLOAD,
+                          get_transporter_occupancy(punit) > 0);
       menu_entry_sensitive(MENU_ORDER_WAKEUP_OTHERS, 
is_unit_activity_on_tile(ACTIVITY_SENTRY, punit->tile));
       menu_entry_sensitive(MENU_ORDER_AUTO_SETTLER, (can_unit_do_auto(punit) 
&& unit_flag(punit, F_SETTLERS)));
       menu_entry_sensitive(MENU_ORDER_AUTO_ATTACK, (can_unit_do_auto(punit) && 
!unit_flag(punit, F_SETTLERS)));
Index: client/gui-mui/mapclass.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/mapclass.c,v
retrieving revision 1.99
diff -u -r1.99 mapclass.c
--- client/gui-mui/mapclass.c   29 Sep 2004 02:24:21 -0000      1.99
+++ client/gui-mui/mapclass.c   15 Nov 2004 19:01:20 -0000
@@ -1690,7 +1690,7 @@
                  Map_InsertCommand(&list, _("Paradrop"), PACK_USERDATA(punit, 
MENU_ORDER_POLLUTION));
                if (unit_flag(punit, F_NUCLEAR))
                  Map_InsertCommand(&list, _("Explode Nuclear"), 
PACK_USERDATA(punit, MENU_ORDER_NUKE));
-               if (get_transporter_capacity(punit) > 0)
+               if (get_transporter_occupancy(punit) > 0)
                  Map_InsertCommand(&list, _("Unload"), PACK_USERDATA(punit, 
MENU_ORDER_UNLOAD));
                if (is_unit_activity_on_tile(ACTIVITY_SENTRY, punit->tile))
                  Map_InsertCommand(&list, _("Wake up"), PACK_USERDATA(punit, 
MENU_ORDER_WAKEUP_OTHERS));
Index: client/gui-sdl/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/mapview.c,v
retrieving revision 1.73
diff -u -r1.73 mapview.c
--- client/gui-sdl/mapview.c    1 Oct 2004 17:40:28 -0000       1.73
+++ client/gui-sdl/mapview.c    15 Nov 2004 19:01:20 -0000
@@ -2058,7 +2058,8 @@
   }
   
   /* draw current occupy status */
-  if (pUnit->owner == game.player_idx && get_transporter_capacity(pUnit) > 0) {
+  if (pUnit->owner == game.player_idx
+      && get_transporter_occupancy(pUnit) > 0) {
     
     des.y += NORMAL_TILE_HEIGHT / 2;
     copy = des;
Index: client/gui-sdl/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/menu.c,v
retrieving revision 1.26
diff -u -r1.26 menu.c
--- client/gui-sdl/menu.c       25 Aug 2004 18:24:19 -0000      1.26
+++ client/gui-sdl/menu.c       15 Nov 2004 19:01:21 -0000
@@ -1155,7 +1155,7 @@
        local_hide(ID_UNIT_ORDER_HOMECITY);
       }
 
-      if (pUnit->occupy && get_transporter_capacity(pUnit) > 0) {
+      if (pUnit->occupy && get_transporter_occupancy(pUnit) > 0) {
        local_show(ID_UNIT_ORDER_UNLOAD);
       } else {
        local_hide(ID_UNIT_ORDER_UNLOAD);
Index: client/gui-win32/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/menu.c,v
retrieving revision 1.29
diff -u -r1.29 menu.c
--- client/gui-win32/menu.c     3 Nov 2004 07:06:18 -0000       1.29
+++ client/gui-win32/menu.c     15 Nov 2004 19:01:21 -0000
@@ -753,7 +753,7 @@
        if (can_unit_unload(punit, find_unit_by_id(punit->transported_by))
         && can_unit_exist_at_tile(punit, punit->tile)) {
          request_unit_unload(punit);
-       } else if (get_transporter_capacity(punit) > 0) {
+       } else if (get_transporter_occupancy(punit) > 0) {
          key_unit_unload_all();
        }
       }
@@ -1137,7 +1137,7 @@
       my_enable_menu(menu, IDM_ORDERS_UNLOAD,
        (can_unit_unload(punit, find_unit_by_id(punit->transported_by))
         && can_unit_exist_at_tile(punit, punit->tile)) 
-       || get_transporter_capacity(punit) > 0);
+       || get_transporter_occupancy(punit) > 0);
       my_enable_menu(menu, IDM_ORDERS_WAKEUP_OTHERS,
                     is_unit_activity_on_tile(ACTIVITY_SENTRY,
                                              punit->tile));
Index: client/gui-xaw/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/menu.c,v
retrieving revision 1.70
diff -u -r1.70 menu.c
--- client/gui-xaw/menu.c       10 Nov 2004 17:01:59 -0000      1.70
+++ client/gui-xaw/menu.c       15 Nov 2004 19:01:21 -0000
@@ -397,7 +397,7 @@
       menu_entry_sensitive(MENU_ORDER, MENU_ORDER_HOMECITY, 
                           can_unit_change_homecity(punit));
       menu_entry_sensitive(MENU_ORDER, MENU_ORDER_UNLOAD_TRANSPORTER, 
-                          get_transporter_capacity(punit)>0);
+                          get_transporter_occupancy(punit) > 0);
       menu_entry_sensitive(MENU_ORDER, MENU_ORDER_LOAD,
        can_unit_load(punit, find_transporter_for_unit(punit,
                                                       punit->tile)));

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