Author: sveinung
Date: Tue Dec 30 10:32:30 2014
New Revision: 27452

URL: http://svn.gna.org/viewcvs/freeciv?rev=27452&view=rev
Log:
Gtk clients: ability to help wonder decides order sent when 'b' is pressed.

Check for the unit type's ability to do the Help Wonder action in stead of
relying on the presence of the HelpWonder unit type flag.

See bug #23122

Modified:
    trunk/client/gui-gtk-2.0/menu.c
    trunk/client/gui-gtk-3.0/menu.c

Modified: trunk/client/gui-gtk-2.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/menu.c?rev=27452&r1=27451&r2=27452&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/menu.c     (original)
+++ trunk/client/gui-gtk-2.0/menu.c     Tue Dec 30 10:32:30 2014
@@ -1052,7 +1052,8 @@
        get an eventual error message from the server if we try. */
     if (unit_can_add_or_build_city(punit)) {
       request_unit_build_city(punit);
-    } else if (unit_has_type_flag(punit, UTYF_HELP_WONDER)) {
+    } else if (utype_can_do_action(unit_type(punit),
+                                   ACTION_HELP_WONDER)) {
       request_unit_caravan_action(punit, ACTION_HELP_WONDER);
     }
   } unit_list_iterate_end;

Modified: trunk/client/gui-gtk-3.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/menu.c?rev=27452&r1=27451&r2=27452&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/menu.c     (original)
+++ trunk/client/gui-gtk-3.0/menu.c     Tue Dec 30 10:32:30 2014
@@ -1052,7 +1052,8 @@
        get an eventual error message from the server if we try. */
     if (unit_can_add_or_build_city(punit)) {
       request_unit_build_city(punit);
-    } else if (unit_has_type_flag(punit, UTYF_HELP_WONDER)) {
+    } else if (utype_can_do_action(unit_type(punit),
+                                   ACTION_HELP_WONDER)) {
       request_unit_caravan_action(punit, ACTION_HELP_WONDER);
     }
   } unit_list_iterate_end;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to