Clean up things so all macros are argument-typechecked again.
This commit is contained in:
parent
6f4535ac88
commit
2afb4a71f4
6 changed files with 17 additions and 17 deletions
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -149,7 +149,7 @@ def formaltype(f):
|
|||
# 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"
|
||||
|
|
|
@ -1955,8 +1955,8 @@ def inner_spellcheck(nav, value, spelldict):
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue