Author: sveinung
Date: Sat Apr  1 22:18:16 2017
New Revision: 35189

URL: http://svn.gna.org/viewcvs/freeciv?rev=35189&view=rev
Log:
rscompat: restore "Recycle Unit"'s DiplRel rules.

Hrm Feature #644449 made it legal to do "Recycle Unit" to an adjacent city.
It is possible to be adjacent to non allied cities. This accidentally
removed the old implicit rules that only an allied city could have its
production helped with "Recycle Unit". Gna bug #25597 restored the old rules
by making them explicit in the ruleset. Make the explicit in upgraded
rulesets too.

See hrm Bug #648790

Modified:
    branches/S3_0/server/rscompat.c

Modified: branches/S3_0/server/rscompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/rscompat.c?rev=35189&r1=35188&r2=35189&view=diff
==============================================================================
--- branches/S3_0/server/rscompat.c     (original)
+++ branches/S3_0/server/rscompat.c     Sat Apr  1 22:18:16 2017
@@ -602,6 +602,20 @@
                                            FALSE, FALSE, TRUE,
                                            "EvacuateFirst"));
 
+    /* The target city must be domestic, allied or on our team. */
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("DiplRel", "Local", FALSE,
+                                           FALSE, TRUE, "War"));
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("DiplRel", "Local", FALSE,
+                                           FALSE, TRUE, "Cease-fire"));
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("DiplRel", "Local", FALSE,
+                                           FALSE, TRUE, "Armistice"));
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("DiplRel", "Local", FALSE,
+                                           FALSE, TRUE, "Peace"));
+
     action_enabler_add(enabler);
 
     /* Disbanding a unit (without getting anything in return) is now action


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

Reply via email to