Author: esr
Date: Tue Mar 15 03:45:11 2011
New Revision: 48915
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48915&view=rev
Log:
Clean up things so all macros are argument-typechecked again.
Modified:
trunk/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg
trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/11_Clash_of_Armies.cfg
trunk/data/campaigns/Under_the_Burning_Suns/_main.cfg
trunk/data/core/macros/debug-utils.cfg
trunk/data/tools/wesnoth/wmltools.py
trunk/data/tools/wmllint
Modified: trunk/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg (original)
+++ trunk/data/campaigns/Dead_Water/scenarios/01_Invasion.cfg Tue Mar 15
03:45:11 2011
@@ -155,24 +155,24 @@
[/unit]
#enddef
-#define SET_VILLAGE_ZOMBIE_PATTERN N1 N2 N3 N4 N5 TYPE
+#define SET_VILLAGE_ZOMBIE_PATTERN N1_AMOUNT N2_AMOUNT N3_AMOUNT N4_AMOUNT
N5_AMOUNT TYPE
[set_variables]
name=zombie_number_pattern
mode=replace
[value]
- number={N1}
+ number={N1_AMOUNT}
[/value]
[value]
- number={N2}
+ number={N2_AMOUNT}
[/value]
[value]
- number={N3}
+ number={N3_AMOUNT}
[/value]
[value]
- number={N4}
+ number={N4_AMOUNT}
[/value]
[value]
- number={N5}
+ number={N5_AMOUNT}
[/value]
[/set_variables]
[set_variable]
Modified:
trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/11_Clash_of_Armies.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/11_Clash_of_Armies.cfg?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/11_Clash_of_Armies.cfg
(original)
+++ trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/11_Clash_of_Armies.cfg
Tue Mar 15 03:45:11 2011
@@ -165,15 +165,15 @@
[event]
name=prestart
-#define HUMAN_SHIP X Y FACING NUM
+#define HUMAN_SHIP X Y FACING_VALUE ID_VALUE
{GENERIC_UNIT 4 "Transport Galleon" {X} {Y}}
[+unit]
- facing={FACING}
+ facing={FACING_VALUE}
upkeep=free
role="docked transport"
[variables]
- transport_num={NUM}
+ transport_num={ID_VALUE}
dock_x={X}
dock_y={Y}
[/variables]
Modified: trunk/data/campaigns/Under_the_Burning_Suns/_main.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/_main.cfg?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/campaigns/Under_the_Burning_Suns/_main.cfg (original)
+++ trunk/data/campaigns/Under_the_Burning_Suns/_main.cfg Tue Mar 15 03:45:11
2011
@@ -125,13 +125,13 @@
[/binary_path]
# Define macro that expands into include paths for this campaign
-#define UTBS_INCLUDE TARGET
- {campaigns/Under_the_Burning_Suns/{TARGET}}
+#define UTBS_INCLUDE TARGET_VALUE
+ {campaigns/Under_the_Burning_Suns/{TARGET_VALUE}}
#enddef
# Define macro that expands into map_data keys that include this campaign's
path
-#define UTBS_MAP TARGET
- map_data="{campaigns/Under_the_Burning_Suns/maps/{TARGET}}"
+#define UTBS_MAP TARGET_VALUE
+ map_data="{campaigns/Under_the_Burning_Suns/maps/{TARGET_VALUE}}"
#enddef
#Append utils folder
Modified: trunk/data/core/macros/debug-utils.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/macros/debug-utils.cfg?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/core/macros/debug-utils.cfg (original)
+++ trunk/data/core/macros/debug-utils.cfg Tue Mar 15 03:45:11 2011
@@ -64,7 +64,7 @@
[/wml_message]
#enddef
-#define TIMED_ACTIONS TITLE CONTENT_WML
+#define TIMED_ACTIONS TITLE_TEXT CONTENT_WML
# Measure (in milliseconds) the time arbitrary event WML takes to
# execute.
#
@@ -90,7 +90,7 @@
[message]
speaker=narrator
- caption={TITLE}
+ caption={TITLE_TEXT}
message="$($TIME_ACTIONS_time_end - $TIME_ACTIONS_time_begin)
milliseconds."
image=wesnoth-icon.png
[/message]
Modified: trunk/data/tools/wesnoth/wmltools.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Tue Mar 15 03:45:11 2011
@@ -149,7 +149,7 @@
# Deduce the expected type of the formal
if f.startswith("_"):
f = f[1:]
- if f == "SIDE" or f.endswith("_SIDE"):
+ if f == "SIDE" or f.endswith("_SIDE") or re.match("SIDE[0-9]", f):
ftype = "side"
elif f in ("SIDE", "X", "Y", "RED", "GREEN", "BLUE", "TURN", "PROB",
"LAYER", "TIME", "DURATION") or f.endswith("NUMBER") or f.endswith("AMOUNT") or
f.endswith("COST") or f.endswith("RADIUS") or f.endswith("_X") or
f.endswith("_Y") or f.endswith("_INCREMENT") or f.endswith("_FACTOR") or
f.endswith("_TIME") or f.endswith("_SIZE"):
ftype = "numeric"
Modified: trunk/data/tools/wmllint
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=48915&r1=48914&r2=48915&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Tue Mar 15 03:45:11 2011
@@ -1955,8 +1955,8 @@
value = value.replace("male^", " ")
value = value.replace("teamname^", " ")
value = value.replace("team_name^", " ")
- value = value.replace("weapon^", " ")
value = value.replace("UI^", " ")
+ value = value.replace("^", " ")
if '<' in value:
value = re.sub("<ref>.*< ref>", "", value)
value = re.sub("<[^>]+>text='([^']*)'<[^>]+>", r"\1", value)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits