Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7273) new terrain flag NoPollution
Home

[Freeciv-Dev] (PR#7273) new terrain flag NoPollution

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7273) new terrain flag NoPollution
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Jan 2004 14:14:58 -0800
Reply-to: rt@xxxxxxxxxxx

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

This patch adds a terrain flag NoPollution.

Simple enough...

jason

Index: common/terrain.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.c,v
retrieving revision 1.2
diff -u -r1.2 terrain.c
--- common/terrain.c    2004/01/19 20:02:21     1.2
+++ common/terrain.c    2004/01/19 22:13:02
@@ -63,6 +63,7 @@
   const char *flag_names[] = {
     /* Must match terrain flags in terrain.h. */
     "NoBarbs",
+    "NoPollution",
     "Oceanic"
   };
 
Index: common/terrain.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.h,v
retrieving revision 1.9
diff -u -r1.9 terrain.h
--- common/terrain.h    2004/01/19 20:02:21     1.9
+++ common/terrain.h    2004/01/19 22:13:02
@@ -73,6 +73,7 @@
 
 enum terrain_flag_id {
   TER_NO_BARBS, /* No barbarians summoned on this terrain. */
+  TER_NO_POLLUTION, /* This terrain cannot be polluted. */
   TER_OCEANIC, /* This is an ocean terrain. */
   TER_LAST
 };
Index: data/civ1/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ1/terrain.ruleset,v
retrieving revision 1.17
diff -u -r1.17 terrain.ruleset
--- data/civ1/terrain.ruleset   2004/01/19 21:06:15     1.17
+++ data/civ1/terrain.ruleset   2004/01/19 22:13:02
@@ -139,6 +139,7 @@
 ; transform_time       = time to transform; if 0, cannot transform
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
+;   - NoPollution      = Pollution won't be put on this terrain type.
 ;   - Oceanic          = This is an "ocean" terrain.  This has a big effect
 ;                        on gameplay.  Naval units can move on oceanic terrain,
 ;                        while land units cannot.  Oceanic tiles can be used
@@ -434,7 +435,7 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
-flags                = "Oceanic"
+flags                = "Oceanic", "NoPollution"
 helptext            = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
@@ -584,7 +585,7 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
-flags                = "NoBarbs"
+flags                = "NoBarbs", "NoPollution"
 helptext            = _("\
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
Index: data/civ2/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/terrain.ruleset,v
retrieving revision 1.19
diff -u -r1.19 terrain.ruleset
--- data/civ2/terrain.ruleset   2004/01/19 21:06:16     1.19
+++ data/civ2/terrain.ruleset   2004/01/19 22:13:02
@@ -147,6 +147,7 @@
 ; transform_time       = time to transform; if 0, cannot transform
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
+;   - NoPollution      = Pollution won't be put on this terrain type.
 ;   - Oceanic          = This is an "ocean" terrain.  This has a big effect
 ;                        on gameplay.  Naval units can move on oceanic terrain,
 ;                        while land units cannot.  Oceanic tiles can be used
@@ -442,7 +443,7 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
-flags                = "Oceanic"
+flags                = "Oceanic", "NoPollution"
 helptext            = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
@@ -585,7 +586,7 @@
 mining_time          = 0
 transform_result     = "Desert"
 transform_time       = 24
-flags                = "NoBarbs"
+flags                = "NoBarbs", "NoPollution"
 helptext            = _("\
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
Index: data/default/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/terrain.ruleset,v
retrieving revision 1.20
diff -u -r1.20 terrain.ruleset
--- data/default/terrain.ruleset        2004/01/19 21:06:16     1.20
+++ data/default/terrain.ruleset        2004/01/19 22:13:02
@@ -147,6 +147,7 @@
 ; transform_time       = time to transform; if 0, cannot transform
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
+;   - NoPollution      = Pollution won't be put on this terrain type.
 ;   - Oceanic          = This is an "ocean" terrain.  This has a big effect
 ;                        on gameplay.  Naval units can move on oceanic terrain,
 ;                        while land units cannot.  Oceanic tiles can be used
@@ -442,7 +443,7 @@
 mining_time          = 0
 transform_result     = "Swamp"
 transform_time       = 36
-flags                = "Oceanic"
+flags                = "Oceanic", "NoPollution"
 helptext            = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
@@ -585,7 +586,7 @@
 mining_time          = 0
 transform_result     = "Desert"
 transform_time       = 24
-flags                = "NoBarbs"
+flags                = "NoBarbs", "NoPollution"
 helptext            = _("\
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
Index: data/history/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/history/terrain.ruleset,v
retrieving revision 1.4
diff -u -r1.4 terrain.ruleset
--- data/history/terrain.ruleset        2004/01/19 21:06:16     1.4
+++ data/history/terrain.ruleset        2004/01/19 22:13:02
@@ -147,6 +147,7 @@
 ; transform_time       = time to transform; if 0, cannot transform
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
+;   - NoPollution      = Pollution won't be put on this terrain type.
 ;   - Oceanic          = This is an "ocean" terrain.  This has a big effect
 ;                        on gameplay.  Naval units can move on oceanic terrain,
 ;                        while land units cannot.  Oceanic tiles can be used
@@ -442,7 +443,7 @@
 mining_time          = 0
 transform_result     = "Swamp"
 transform_time       = 36
-flags                = "Oceanic"
+flags                = "Oceanic", "NoPollution"
 helptext            = _("\
 Oceans cover much of the world, and only sea units (Triremes and\
  other boats) can travel on them.\
@@ -585,7 +586,7 @@
 mining_time          = 0
 transform_result     = "Desert"
 transform_time       = 24
-flags                = "NoBarbs"
+flags                = "NoBarbs", "NoPollution"
 helptext            = _("\
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.237
diff -u -r1.237 cityturn.c
--- server/cityturn.c   2003/12/06 20:37:59     1.237
+++ server/cityturn.c   2004/01/19 22:13:03
@@ -1160,8 +1160,7 @@
        continue;
       }
 
-      if ((!is_ocean(map_get_terrain(mx, my))
-          && map_get_terrain(mx, my) <= T_TUNDRA)
+      if (!terrain_has_flag(map_get_terrain(mx, my), TER_NO_POLLUTION)
          && !map_has_special(mx, my, S_POLLUTION)) {
        map_set_special(mx, my, S_POLLUTION);
        send_tile_info(NULL, mx, my);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7273) new terrain flag NoPollution, Jason Short <=