<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40631 >

This adds new borders mode where all tiles inside borders are visible.

Applies top of #40630


 - ML

diff -Nurd -X.diff_ignore freeciv/common/game.h freeciv/common/game.h
--- freeciv/common/game.h       2009-01-06 16:37:11.000000000 +0200
+++ freeciv/common/game.h       2009-01-06 16:33:18.000000000 +0200
@@ -204,7 +204,7 @@
 /* 0 means no national borders. */
 #define GAME_DEFAULT_BORDERS         1
 #define GAME_MIN_BORDERS             0
-#define GAME_MAX_BORDERS             1
+#define GAME_MAX_BORDERS             2
 
 #define GAME_DEFAULT_HAPPYBORDERS    TRUE
 
diff -Nurd -X.diff_ignore freeciv/server/maphand.c freeciv/server/maphand.c
--- freeciv/server/maphand.c    2009-01-06 16:37:11.000000000 +0200
+++ freeciv/server/maphand.c    2009-01-06 16:35:13.000000000 +0200
@@ -1536,6 +1536,17 @@
 {
   struct player *ploser = tile_owner(ptile);
 
+  if (game.info.borders > 1) {
+    if (ploser != powner) {
+      if (ploser) {
+        map_fog_tile(ploser, ptile, V_MAIN);
+      }
+      if (powner) {
+        map_unfog_tile(powner, ptile, TRUE, V_MAIN);
+      }
+    }
+  }
+
   tile_set_owner(ptile, powner, psource);
 
   if (ploser != powner) {
diff -Nurd -X.diff_ignore freeciv/server/settings.c freeciv/server/settings.c
--- freeciv/server/settings.c   2009-01-06 16:37:11.000000000 +0200
+++ freeciv/server/settings.c   2009-01-06 16:33:08.000000000 +0200
@@ -694,8 +694,10 @@
          SSET_RULES, SSET_MILITARY, SSET_SITUATIONAL, SSET_TO_CLIENT,
          N_("National borders"),
          N_("If this is set to greater than 0, then any land tiles "
-            "around a fortress or city will be owned by that nation. "
-             "\n 0 - Disabled\n 1 - Enabled"),
+            "around a fortress or city will be owned by that nation.\n"
+             "  0 = Disabled\n"
+             "  1 = Enabled\n"
+             "  2 = See everything inside borders"),
          NULL,
          GAME_MIN_BORDERS, GAME_MAX_BORDERS, GAME_DEFAULT_BORDERS)
 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to