Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#6007) Civ3 feature: Different sea types
Home

[Freeciv-Dev] (PR#6007) Civ3 feature: Different sea types

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6007) Civ3 feature: Different sea types
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Mon, 23 Aug 2004 00:14:44 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [jdorje - Sam. Aoû. 21 23:06:11 2004]:
> 
> -static const char terrain_chars[] = "adfghjm prstu";
> +static const char terrain_chars[] = "adfghjm p.st:u";
> 
> These characters should be loaded from the ruleset.  Each terrain should 
> specify an identifier that is a single-character string.
> 
> jason
> 
> 
> 
Update patch
terrains_identifier patch is needed
rm fixed already comited
FIX blending (best one need a patch )

Marcelo
diff -ruN -Xfreeciv/diff_ignore freeciv_/common/terrain.h 
freeciv__/common/terrain.h
--- freeciv_/common/terrain.h   2004-08-23 06:51:47.299810536 +0200
+++ freeciv__/common/terrain.h  2004-08-23 06:53:07.202663456 +0200
@@ -63,7 +63,9 @@
 /* Changing this breaks savegame and network compatability. */
 enum tile_terrain_type {
   T_ARCTIC, T_DESERT, T_FOREST, T_GRASSLAND, T_HILLS, T_JUNGLE, 
-  T_MOUNTAINS, T_OCEAN, T_PLAINS, T_UNUSED, T_SWAMP, T_TUNDRA, T_UNKNOWN,
+  T_MOUNTAINS, T_OCEAN, T_PLAINS, T_DEEPOCEAN, T_SWAMP, T_TUNDRA,
+  T_ABYSS, /* with T_OCEAN and T_DEEPOCEAN this do a 3 level oceanic relief */ 
+  T_UNKNOWN, /* this must be before T_LAST */
   T_LAST, /* last terrain type */
   T_ANY   /* A special flag that matches "any" terrain type. */
 };
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/civ1/buildings.ruleset 
freeciv__/data/civ1/buildings.ruleset
--- freeciv_/data/civ1/buildings.ruleset        2004-08-23 06:51:33.460914368 
+0200
+++ freeciv__/data/civ1/buildings.ruleset       2004-08-23 06:53:07.206662848 
+0200
@@ -302,7 +302,7 @@
 bldg_req       = "None"
 graphic                = "b.coastal_defense"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -444,7 +444,7 @@
 bldg_req       = "None"
 graphic                = "b.harbour"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -658,7 +658,7 @@
 bldg_req       = "None"
 graphic                = "b.offshore_platform"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -750,7 +750,7 @@
 bldg_req       = "None"
 graphic                = "b.port_facility"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/civ1/terrain.ruleset 
freeciv__/data/civ1/terrain.ruleset
--- freeciv_/data/civ1/terrain.ruleset  2004-08-23 06:52:22.422471080 +0200
+++ freeciv__/data/civ1/terrain.ruleset 2004-08-23 07:00:51.643057784 +0200
@@ -493,22 +493,22 @@
  inconvenient.\
 ")
 
-[terrain_unused_0]
-terrain_name         = "unused"
-graphic              = "-"
-graphic_alt         = "-"
-identifier          = "r"
-movement_cost        = 0
-defense_bonus        = 00
-food                 = 0
+[terrain_deepocean]
+terrain_name         = _("Deep Ocean")
+graphic              = "deepocean"
+graphic_alt         = "ocean"
+identifier          = "."
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
 shield               = 0
-trade                = 0
-special_1_name       = "none"
-graphic_special_1    = "-"
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
 graphic_special_1a   = "-"
-food_special_1       = 0
+food_special_1       = 3
 shield_special_1     = 0
-trade_special_1      = 0
+trade_special_1      = 2
 special_2_name       = "none"
 graphic_special_2    = "-"
 graphic_special_2a   = "-"
@@ -516,7 +516,7 @@
 shield_special_2     = 0
 trade_special_2      = 0
 road_trade_incr      = 0
-road_time            = 2
+road_time            = 0
 irrigation_result    = "no"
 irrigation_food_incr = 0
 irrigation_time      = 0
@@ -525,7 +525,13 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
-helptext            = ""
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
 
 [terrain_swamp]
 terrain_name         = _("Swamp")
@@ -601,3 +607,43 @@
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
 ")
+
+[terrain_abyss]
+terrain_name         = _("Abyss")
+graphic              = "Abyss"
+graphic_alt         = "ocean"
+identifier          = "."
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
+shield               = 0
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
+graphic_special_1a   = "-"
+food_special_1       = 3
+shield_special_1     = 0
+trade_special_1      = 2
+special_2_name       = "none"
+graphic_special_2    = "-"
+graphic_special_2a   = "-"
+food_special_2       = 0
+shield_special_2     = 0
+trade_special_2      = 0
+road_trade_incr      = 0
+road_time            = 0
+irrigation_result    = "no"
+irrigation_food_incr = 0
+irrigation_time      = 0
+mining_result        = "no"
+mining_shield_incr   = 0
+mining_time          = 0
+transform_result     = "no"
+transform_time       = 0
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/civ2/buildings.ruleset 
freeciv__/data/civ2/buildings.ruleset
--- freeciv_/data/civ2/buildings.ruleset        2004-08-23 06:51:33.465913608 
+0200
+++ freeciv__/data/civ2/buildings.ruleset       2004-08-23 06:53:07.212661936 
+0200
@@ -283,7 +283,7 @@
 bldg_req       = "None"
 graphic                = "b.coastal_defense"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -425,7 +425,7 @@
 name           = _("Harbour")
 tech_req       = "Seafaring"
 bldg_req       = "None"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 graphic                = "b.harbour"
 graphic_alt    = "-"
 ;spec_gate     =
@@ -645,7 +645,7 @@
 bldg_req       = "None"
 graphic                = "b.offshore_platform"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -738,7 +738,7 @@
 bldg_req       = "None"
 graphic                = "b.port_facility"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/civ2/terrain.ruleset 
freeciv__/data/civ2/terrain.ruleset
--- freeciv_/data/civ2/terrain.ruleset  2004-08-23 06:52:22.424470776 +0200
+++ freeciv__/data/civ2/terrain.ruleset 2004-08-23 06:59:33.605921232 +0200
@@ -506,28 +506,28 @@
  inconvenient.\
 ")
 
-[terrain_unused_0]
-terrain_name         = "unused"
-graphic              = "-"
-graphic_alt         = "-"
-identifier          = "r"
-movement_cost        = 0
-defense_bonus        = 00
-food                 = 0
+[terrain_deepocean]
+terrain_name         = _("Deep Ocean")
+graphic              = "deepocean"
+graphic_alt         = "ocean"
+identifier          = "."
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
 shield               = 0
-trade                = 0
-special_1_name       = "none"
-graphic_special_1    = "-"
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
 graphic_special_1a   = "-"
-food_special_1       = 0
+food_special_1       = 3
 shield_special_1     = 0
-trade_special_1      = 0
-special_2_name       = "none"
-graphic_special_2    = "-"
+trade_special_1      = 2
+special_2_name       = _("Whales")
+graphic_special_2    = "ts.whales"
 graphic_special_2a   = "-"
-food_special_2       = 0
-shield_special_2     = 0
-trade_special_2      = 0
+food_special_2       = 2
+shield_special_2     = 2
+trade_special_2      = 3
 road_trade_incr      = 0
 road_time            = 0
 irrigation_result    = "no"
@@ -538,6 +538,13 @@
 mining_time          = 0
 transform_result     = "no"
 transform_time       = 0
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
 
 [terrain_swamp]
 terrain_name         = _("Swamp")
@@ -614,3 +621,43 @@
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
 ")
+
+[terrain_abyss]
+terrain_name         = _("Abyss")
+graphic              = "abyss"
+graphic_alt         = "ocean"
+identifier          = ","
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
+shield               = 0
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
+graphic_special_1a   = "-"
+food_special_1       = 3
+shield_special_1     = 0
+trade_special_1      = 2
+special_2_name       = _("Whales")
+graphic_special_2    = "ts.whales"
+graphic_special_2a   = "-"
+food_special_2       = 2
+shield_special_2     = 2
+trade_special_2      = 3
+road_trade_incr      = 0
+road_time            = 0
+irrigation_result    = "no"
+irrigation_food_incr = 0
+irrigation_time      = 0
+mining_result        = "no"
+mining_shield_incr   = 0
+mining_time          = 0
+transform_result     = "no"
+transform_time       = 0
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
\ Pas de fin de ligne à la fin du fichier.
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/default/buildings.ruleset 
freeciv__/data/default/buildings.ruleset
--- freeciv_/data/default/buildings.ruleset     2004-08-23 06:51:33.476911936 
+0200
+++ freeciv__/data/default/buildings.ruleset    2004-08-23 06:53:07.218661024 
+0200
@@ -330,7 +330,7 @@
 bldg_req       = "None"
 graphic        = "b.coastal_defense"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -476,7 +476,7 @@
 bldg_req       = "None"
 graphic        = "b.harbour"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -701,7 +701,7 @@
 bldg_req       = "None"
 graphic        = "b.offshore_platform"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
@@ -797,7 +797,7 @@
 bldg_req       = "None"
 graphic        = "b.port_facility"
 graphic_alt    = "-"
-terr_gate      = "Ocean"
+terr_gate      = "Ocean", "Deep Ocean", "Abyss"
 ;spec_gate     =
 equiv_range    = "City"
 ;equiv_dupl    =
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/default/terrain.ruleset 
freeciv__/data/default/terrain.ruleset
--- freeciv_/data/default/terrain.ruleset       2004-08-23 06:52:22.427470320 
+0200
+++ freeciv__/data/default/terrain.ruleset      2004-08-23 06:56:28.493062664 
+0200
@@ -1,5 +1,5 @@
 
-; Modifying this file: 
+; Modifying this file:
 ; You should not modify this file except to make bugfixes or
 ; for other "maintenance".  If you want to make custom changes,
 ; you should create a new datadir subdirectory and copy this file
@@ -554,28 +554,28 @@
  inconvenient.\
 ")
 
-[terrain_unused_0]
-terrain_name         = "unused"
-graphic              = "-"
-graphic_alt         = "-"
-identifier          = "r"
-movement_cost        = 0
-defense_bonus        = 00
-food                 = 0
+[terrain_deepocean]
+terrain_name         = _("Deep Ocean")
+graphic              = "deepocean"
+graphic_alt         = "ocean"
+identifier          = "."
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
 shield               = 0
-trade                = 0
-special_1_name       = "none"
-graphic_special_1    = "-"
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
 graphic_special_1a   = "-"
-food_special_1       = 0
+food_special_1       = 3
 shield_special_1     = 0
-trade_special_1      = 0
-special_2_name       = "none"
-graphic_special_2    = "-"
+trade_special_1      = 2
+special_2_name       = _("Whales")
+graphic_special_2    = "ts.whales"
 graphic_special_2a   = "-"
-food_special_2       = 0
-shield_special_2     = 0
-trade_special_2      = 0
+food_special_2       = 2
+shield_special_2     = 2
+trade_special_2      = 3
 road_trade_incr      = 0
 road_time            = 0
 irrigation_result    = "no"
@@ -584,13 +584,20 @@
 mining_result        = "no"
 mining_shield_incr   = 0
 mining_time          = 0
-transform_result     = "no"
-transform_time       = 0
-rail_time            = 0
-airbase_time         = 0
-fortress_time        = 0
-clean_pollution_time = 0
-clean_fallout_time   = 0
+transform_result     = "Swamp"
+transform_time       = 36
+rail_time            = 3
+airbase_time         = 3
+fortress_time        = 3
+clean_pollution_time = 3
+clean_fallout_time   = 3
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+")
 
 [terrain_swamp]
 terrain_name         = _("Swamp")
@@ -677,3 +684,49 @@
 Tundra are broad, cold regions, fit for some agriculture and little\
  else.\
 ")
+
+[terrain_abyss]
+terrain_name         = _("Abyss")
+graphic              = "abyss"
+graphic_alt         = "ocean"
+identifier          = ","
+movement_cost        = 1
+defense_bonus        = 10
+food                 = 1
+shield               = 0
+trade                = 2
+special_1_name       = _("Fish")
+graphic_special_1    = "ts.fish"
+graphic_special_1a   = "-"
+food_special_1       = 3
+shield_special_1     = 0
+trade_special_1      = 2
+special_2_name       = _("Whales")
+graphic_special_2    = "ts.whales"
+graphic_special_2a   = "-"
+food_special_2       = 2
+shield_special_2     = 2
+trade_special_2      = 3
+road_trade_incr      = 0
+road_time            = 0
+irrigation_result    = "no"
+irrigation_food_incr = 0
+irrigation_time      = 0
+mining_result        = "no"
+mining_shield_incr   = 0
+mining_time          = 0
+transform_result     = "no"
+transform_time       = 0
+rail_time            = 3
+airbase_time         = 3
+fortress_time        = 3
+clean_pollution_time = 3
+clean_fallout_time   = 3
+flags                = "Oceanic", "NoPollution", "UnsafeCoast", "NoCities"
+helptext            = _("\
+Oceans cover much of the world, and only sea units (Triremes and\
+ other boats) can travel on them.\
+\n\n\
+Ocean squares can never be polluted or subjected to fallout.\
+in so deep oceans some naval unit can be in danger.\ 
+")
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/isotrident/terrain1.spec 
freeciv__/data/isotrident/terrain1.spec
--- freeciv_/data/isotrident/terrain1.spec      2004-08-23 06:51:33.480911328 
+0200
+++ freeciv__/data/isotrident/terrain1.spec     2004-08-23 06:53:07.222660416 
+0200
@@ -53,6 +53,9 @@
 
   9,    0, "t.jungle1"
 
+  10,    0, "t.deepocean1"
+  10,    1, "t.abyss1"
+
 ; Terrain special resources:
 
  0,   2, "ts.oasis"
diff -ruN -Xfreeciv/diff_ignore freeciv_/data/isotrident.tilespec 
freeciv__/data/isotrident.tilespec
--- freeciv_/data/isotrident.tilespec   2004-08-23 06:51:33.849855240 +0200
+++ freeciv__/data/isotrident.tilespec  2004-08-23 07:02:20.969478104 +0200
@@ -129,6 +129,11 @@
 num_layers = 1
 layer0_match_type = "other"
 
+[terrain_deepocean]
+is_blended = 0
+num_layers = 1
+layer0_match_type = "ocean"
+
 [terrain_swamp]
 is_blended = 1
 num_layers = 1
@@ -138,3 +143,8 @@
 is_blended = 1
 num_layers = 1
 layer0_match_type = "other"
+
+[terrain_abyss]
+is_blended = 0
+num_layers = 1
+layer0_match_type = "ocean"
diff -ruN -Xfreeciv/diff_ignore freeciv_/server/savegame.c 
freeciv__/server/savegame.c
--- freeciv_/server/savegame.c  2004-08-23 06:52:22.437468800 +0200
+++ freeciv__/server/savegame.c 2004-08-23 06:53:07.229659352 +0200
@@ -83,7 +83,7 @@
       line[nat_x] = (GET_XY_CHAR);                                          \
       if (!my_isprint(line[nat_x] & 0x7f)) {                                \
           die("Trying to write invalid map "                                \
-              "data: '%c' %d", line[nat_x], line[nat_x]);                   \
+              "data: %d '%c' ", line[nat_x], line[nat_x]);                   \
       }                                                                     \
     }                                                                       \
     line[map.xsize] = '\0';                                                 \
diff -ruN -Xfreeciv/diff_ignore freeciv_/server/stLr2K07 
freeciv__/server/stLr2K07
--- freeciv_/server/stLr2K07    1970-01-01 01:00:00.000000000 +0100
+++ freeciv__/server/stLr2K07   2004-08-23 06:53:07.230659200 +0200
@@ -0,0 +1 @@
+!<arch>

[Prev in Thread] Current Thread [Next in Thread]