Author: sveinung
Date: Fri Nov  6 13:38:52 2015
New Revision: 30443

URL: http://svn.gna.org/viewcvs/freeciv?rev=30443&view=rev
Log:
Qt client: just show targeted in act sel dlg

It is possible to do the untargeted variant of Steal Tech and Sabotage City
from the target selection dialog. Don't show the untargeted variant when
the targeted variant is possible. Let the player pick it as a target.

This restores the 2.5 behavior.

See patch #6538

Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp

Modified: branches/S2_6/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/dialogs.cpp?rev=30443&r1=30442&r2=30443&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Fri Nov  6 13:38:52 2015
@@ -1387,6 +1387,22 @@
   QString title;
   QString tool_tip;
 
+  if (act == ACTION_SPY_SABOTAGE_CITY
+      && action_prob_possible(
+        action_probabilities[ACTION_SPY_TARGETED_SABOTAGE_CITY])) {
+    /* The player can select Sabotage City from the target selection dialog
+     * of Targeted Sabotage City. */
+    return;
+  }
+
+  if (act == ACTION_SPY_STEAL_TECH
+      && action_prob_possible(
+        action_probabilities[ACTION_SPY_TARGETED_STEAL_TECH])) {
+    /* The player can select Steal Tech from the target selection dialog of
+     * Targeted Steal Tech. */
+    return;
+  }
+
   /* Don't show disabled actions. */
   if (!action_prob_possible(action_probabilities[act])) {
     return;


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

Reply via email to