Author: esr
Date: Thu Sep 23 13:45:58 2010
New Revision: 46661
URL: http://svn.gna.org/viewcvs/wesnoth?rev=46661&view=rev
Log:
Improve typechecking for the new terrain macros.
Modified:
trunk/data/core/terrain-graphics/internal-generic.cfg
trunk/data/core/terrain-graphics/new-macros.cfg
trunk/data/tools/wesnoth/wmltools.py
Modified: trunk/data/core/terrain-graphics/internal-generic.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/terrain-graphics/internal-generic.cfg?rev=46661&r1=46660&r2=46661&view=diff
==============================================================================
--- trunk/data/core/terrain-graphics/internal-generic.cfg (original)
+++ trunk/data/core/terrain-graphics/internal-generic.cfg Thu Sep 23 13:45:58
2010
@@ -346,7 +346,7 @@
# Simplified macro for defining ImagePathFunction-using variations of water
# terrains. Assumes 15 frames, sets flag to "base" and layer to "-1000".
-#define ANIMATED_WATER_15 TERRAIN IPF TIME IMAGESTEM
+#define ANIMATED_WATER_15 TERRAINLIST IPF TIME IMAGESTEM
[terrain_graphics]
map="
, *
@@ -357,7 +357,7 @@
[tile]
pos=1
- type={TERRAIN}
+ type={TERRAINLIST}
set_no_flag=base
[/tile]
@@ -372,7 +372,7 @@
# Simplified macro for defining ImagePathFunction-using water transitions.
# Note: the animations are disabled for now.
-#define ANIMATED_WATER_15_TRANSITION TERRAIN ADJACENT LAYER IPF TIME IMAGESTEM
+#define ANIMATED_WATER_15_TRANSITION TERRAINLIST ADJACENT LAYER IPF TIME
IMAGESTEM
[terrain_graphics]
map="
, 2
@@ -387,7 +387,7 @@
[/tile]
[tile]
pos=2
- type={TERRAIN}
+ type={TERRAINLIST}
[/tile]
rotations=n,ne,se,s,sw,nw
Modified: trunk/data/core/terrain-graphics/new-macros.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/terrain-graphics/new-macros.cfg?rev=46661&r1=46660&r2=46661&view=diff
==============================================================================
--- trunk/data/core/terrain-graphics/new-macros.cfg (original)
+++ trunk/data/core/terrain-graphics/new-macros.cfg Thu Sep 23 13:45:58 2010
@@ -29,7 +29,7 @@
[/terrain_graphics]
#enddef
-#define NEW:FOREST TERRAIN ADJACENT IMAGESTEM
+#define NEW:FOREST TERRAINLIST ADJACENT IMAGESTEM
# This assumes centered images. Places the images named
# {IMAGESTEM}-small[1-11].png on all {TERRAIN} adjacent to {ADJACENT}, and
# {IMAGESTEM}[1-11].png on all others.
@@ -43,7 +43,7 @@
, *"
[tile]
pos=1
- type={TERRAIN}
+ type={TERRAINLIST}
no_flag=forest
set_flag=forest,small_forest
[/tile]
@@ -73,7 +73,7 @@
, *"
[tile]
pos=1
- type={TERRAIN}
+ type={TERRAINLIST}
set_no_flag=forest
[/tile]
@@ -240,4 +240,4 @@
center=90,144
[/image]
[/terrain_graphics]
-#enddef
+#enddef
Modified: trunk/data/tools/wesnoth/wmltools.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=46661&r1=46660&r2=46661&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Thu Sep 23 13:45:58 2010
@@ -165,7 +165,7 @@
ftype = "range"
elif f in ("ALIGN",):
ftype = "alignment"
- elif f in ("TYPES",):
+ elif f in ("TYPES"):
ftype = "types"
elif f.startswith("ADJACENT") or f.startswith("TERRAINLIST") or f ==
"RESTRICTING":
ftype = "terrain_pattern"
@@ -173,7 +173,7 @@
ftype = "terrain_code"
elif f in ("NAME", "NAMESPACE", "VAR", "IMAGESTEM", "ID", "FLAG",
"BUILDER") or f.endswith("_NAME") or f.endswith("_ID") or f.endswith("_VAR"):
ftype = "name"
- elif f in ("ID_STRING", "NAME_STRING", "DESCRIPTION"):
+ elif f in ("ID_STRING", "NAME_STRING", "DESCRIPTION", "IPF"):
ftype = "optional_string"
elif f in ("STRING", "TYPE", "TEXT") or f.endswith("_STRING") or
f.endswith("_TYPE") or f.endswith("_TEXT"):
ftype = "string"
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits