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

[Freeciv-Dev] (PR#7288) new terrain flag "Starter"

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7288) new terrain flag "Starter"
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Jan 2004 01:40:47 -0800
Reply-to: rt@xxxxxxxxxxx

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

This patch adds a new terrain flag "Starter".  Terrains with this flag 
are eligible to hold starting positions.

jason

Index: common/map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
retrieving revision 1.155
diff -u -r1.155 map.c
--- common/map.c        2004/01/17 17:21:20     1.155
+++ common/map.c        2004/01/21 09:39:39
@@ -440,9 +440,10 @@
   int i;
   enum tile_terrain_type t = map_get_terrain(x, y);
 
-  /* only start on clear terrain: */
-  if (t!=T_PLAINS && t!=T_GRASSLAND && t!=T_RIVER)
+  /* Only start on certain terrain types. */
+  if (!terrain_has_flag(t, TER_STARTER)) {
     return TRUE;
+  }
   
   /* don't start on a hut: */
   if (map_has_special(x, y, S_HUT))
Index: common/terrain.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.c,v
retrieving revision 1.3
diff -u -r1.3 terrain.c
--- common/terrain.c    2004/01/21 09:28:52     1.3
+++ common/terrain.c    2004/01/21 09:39:39
@@ -64,6 +64,7 @@
     /* Must match terrain flags in terrain.h. */
     "NoBarbs",
     "NoPollution",
+    "Starter",
     "Oceanic"
   };
 
Index: common/terrain.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/terrain.h,v
retrieving revision 1.10
diff -u -r1.10 terrain.h
--- common/terrain.h    2004/01/21 09:28:52     1.10
+++ common/terrain.h    2004/01/21 09:39:39
@@ -74,6 +74,7 @@
 enum terrain_flag_id {
   TER_NO_BARBS, /* No barbarians summoned on this terrain. */
   TER_NO_POLLUTION, /* This terrain cannot be polluted. */
+  TER_STARTER, /* Players will start on this terrain type. */
   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.18
diff -u -r1.18 terrain.ruleset
--- data/civ1/terrain.ruleset   2004/01/21 09:28:52     1.18
+++ data/civ1/terrain.ruleset   2004/01/21 09:40:14
@@ -140,6 +140,7 @@
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
 ;   - NoPollution      = Pollution won't be put on this terrain type.
+;   - Starter          = Players will only be started on "Starter" terrain.
 ;   - 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
@@ -292,6 +293,7 @@
 mining_time          = 10
 transform_result     = "no"
 transform_time       = 0
+flags                = "Starter"
 helptext            = _("\
 Grasslands afford exceptional agricultural opportunities.\
 ")
@@ -474,6 +476,7 @@
 mining_time          = 15
 transform_result     = "no"
 transform_time       = 0
+flags                = "Starter"
 helptext            = _("\
 Plains are very broad, sparse regions, which makes trade slightly\
  inconvenient.\
@@ -510,6 +513,7 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
+flags                = "Starter"
 helptext            = _("\
 In addition to providing for fishing, Rivers make for excellent\
  lines of communications and trade.\
Index: data/civ2/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/terrain.ruleset,v
retrieving revision 1.20
diff -u -r1.20 terrain.ruleset
--- data/civ2/terrain.ruleset   2004/01/21 09:28:52     1.20
+++ data/civ2/terrain.ruleset   2004/01/21 09:40:14
@@ -148,6 +148,7 @@
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
 ;   - NoPollution      = Pollution won't be put on this terrain type.
+;   - Starter          = Players will only be started on "Starter" terrain.
 ;   - 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
@@ -300,6 +301,7 @@
 mining_time          = 10
 transform_result     = "Hills"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Grasslands afford exceptional agricultural opportunities.\
 ")
@@ -482,6 +484,7 @@
 mining_time          = 15
 transform_result     = "Grassland"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Plains are very broad, sparse regions, which makes trade slightly\
  inconvenient.\
Index: data/default/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/terrain.ruleset,v
retrieving revision 1.21
diff -u -r1.21 terrain.ruleset
--- data/default/terrain.ruleset        2004/01/21 09:28:52     1.21
+++ data/default/terrain.ruleset        2004/01/21 09:40:14
@@ -148,6 +148,7 @@
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
 ;   - NoPollution      = Pollution won't be put on this terrain type.
+;   - Starter          = Players will only be started on "Starter" terrain.
 ;   - 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
@@ -300,6 +301,7 @@
 mining_time          = 10
 transform_result     = "Hills"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Grasslands afford exceptional agricultural opportunities.\
 ")
@@ -482,6 +484,7 @@
 mining_time          = 15
 transform_result     = "Grassland"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Plains are very broad, sparse regions, which makes trade slightly\
  inconvenient.\
Index: data/history/terrain.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/history/terrain.ruleset,v
retrieving revision 1.5
diff -u -r1.5 terrain.ruleset
--- data/history/terrain.ruleset        2004/01/21 09:28:52     1.5
+++ data/history/terrain.ruleset        2004/01/21 09:40:14
@@ -148,6 +148,7 @@
 ; flags                = General flags for this terrain:
 ;   - NoBarbs          = Barbarians will not be spawned here.
 ;   - NoPollution      = Pollution won't be put on this terrain type.
+;   - Starter          = Players will only be started on "Starter" terrain.
 ;   - 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
@@ -300,6 +301,7 @@
 mining_time          = 10
 transform_result     = "Hills"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Grasslands afford exceptional agricultural opportunities.\
 ")
@@ -482,6 +484,7 @@
 mining_time          = 15
 transform_result     = "Grassland"
 transform_time       = 24
+flags                = "Starter"
 helptext            = _("\
 Plains are very broad, sparse regions, which makes trade slightly\
  inconvenient.\

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