More tweaks for macro type checking. No behavior changes.
This commit is contained in:
parent
f3989149ec
commit
e45d72d31c
14 changed files with 62 additions and 59 deletions
|
@ -11,10 +11,10 @@
|
|||
#enddef
|
||||
|
||||
# Shorthand for messages, useful for lots of short messages
|
||||
#define SPEAK SPEAKER MESSAGE
|
||||
#define SPEAK SPEAKER_STRING MESSAGE_TEXT
|
||||
[message]
|
||||
speaker={SPEAKER}
|
||||
message={MESSAGE}
|
||||
speaker={SPEAKER_STRING}
|
||||
message={MESSAGE_TEXT}
|
||||
[/message]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -468,22 +468,22 @@ _f, _f, _f, _f, _f, _f, Re, _f, _f, _f, _f, _f,
|
|||
[/event]
|
||||
#enddef
|
||||
|
||||
#define PASSAGE_NORMAL DESTINATION WIDTH WINDINESS JAGGED
|
||||
#define PASSAGE_NORMAL DESTINATION_NAME WIDTH_NUMBER WINDINESS_NUMBER JAGGED_NUMBER
|
||||
[passage]
|
||||
destination={DESTINATION}
|
||||
width={WIDTH}
|
||||
windiness={WINDINESS}
|
||||
jagged={JAGGED}
|
||||
destination={DESTINATION_NAME}
|
||||
width={WIDTH_NUMBER}
|
||||
windiness={WINDINESS_NUMBER}
|
||||
jagged={JAGGED_NUMBER}
|
||||
[/passage]
|
||||
#enddef
|
||||
|
||||
#define PASSAGE_CHANCE CHANCE DESTINATION WIDTH WINDINESS JAGGED
|
||||
#define PASSAGE_CHANCE CHANCE_NUMBER DESTINATION_NAME WIDTH_NUMBER WINDINESS_NUMBER JAGGED_NUMBER
|
||||
[passage]
|
||||
chance={CHANCE}
|
||||
destination={DESTINATION}
|
||||
width={WIDTH}
|
||||
windiness={WINDINESS}
|
||||
jagged={JAGGED}
|
||||
chance={CHANCE_NUMBER}
|
||||
destination={DESTINATION_NAME}
|
||||
width={WIDTH_NUMBER}
|
||||
windiness={WINDINESS_NUMBER}
|
||||
jagged={JAGGED_NUMBER}
|
||||
[/passage]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -497,9 +497,9 @@
|
|||
[/objectives]
|
||||
[/event]
|
||||
|
||||
#define ENDSPEECH SPEAKER
|
||||
#define ENDSPEECH SPEAKER_NAME
|
||||
[message]
|
||||
speaker={SPEAKER}
|
||||
speaker={SPEAKER_NAME}
|
||||
message= _ "We made it. Onwards to Wesmere!"
|
||||
[/message]
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#textdomain wesnoth-low
|
||||
#define INVISIBILITY_POTION USER_ID DESCRIPTION
|
||||
#define INVISIBILITY_POTION AFFIX DESCRIPTION
|
||||
[object]
|
||||
id=invisibility_potion_{USER_ID}
|
||||
id=invisibility_potion_{AFFIX}
|
||||
description={DESCRIPTION}
|
||||
duration=level
|
||||
[filter]
|
||||
id={USER_ID}
|
||||
id={AFFIX}
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=new_ability
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#textdomain wesnoth-low
|
||||
|
||||
#define TEAM_COLOR COLOR
|
||||
#define TEAM_COLOR COLOR_NAME
|
||||
[object]
|
||||
[effect]
|
||||
apply_to=image_mod
|
||||
add=RC(magenta>{COLOR})
|
||||
add=RC(magenta>{COLOR_NAME})
|
||||
[/effect]
|
||||
[/object]
|
||||
#enddef
|
||||
|
@ -252,7 +252,7 @@
|
|||
[/gold]
|
||||
#enddef
|
||||
|
||||
#define SET_GOLD SIDE FACTOR_EASY FACTOR_NORMAL FACTOR_HARD
|
||||
#define SET_GOLD SIDE EASY_FACTOR NORMAL_FACTOR HARD_FACTOR
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
|
@ -261,15 +261,15 @@
|
|||
[/store_gold]
|
||||
|
||||
#ifdef EASY
|
||||
{VARIABLE_OP gold multiply {FACTOR_EASY}}
|
||||
{VARIABLE_OP gold multiply {EASY_FACTOR}}
|
||||
#endif
|
||||
|
||||
#ifdef NORMAL
|
||||
{VARIABLE_OP gold multiply {FACTOR_NORMAL}}
|
||||
{VARIABLE_OP gold multiply {NORMAL_FACTOR}}
|
||||
#endif
|
||||
|
||||
#ifdef HARD
|
||||
{VARIABLE_OP gold multiply {FACTOR_HARD}}
|
||||
{VARIABLE_OP gold multiply {HARD_FACTOR}}
|
||||
#endif
|
||||
|
||||
[modify_side]
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#textdomain wesnoth-sof
|
||||
#define RECRUIT E N H
|
||||
#define RECRUIT EASY_VALUE NORMAL_VALUE HARD_VALUE
|
||||
#ifdef EASY
|
||||
recruit={E}
|
||||
recruit={EASY_VALUE}
|
||||
#endif
|
||||
#ifdef NORMAL
|
||||
recruit={N}
|
||||
recruit={NORMAL_VALUE}
|
||||
#endif
|
||||
#ifdef HARD
|
||||
recruit={H}
|
||||
recruit={HARD_VALUE}
|
||||
#endif
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -1226,7 +1226,7 @@
|
|||
#battling over the castle
|
||||
#1 dwarvish fighter, 1 dwarvish thunderer, 1 dwarvish guardsman
|
||||
|
||||
#define DEFENDER SIDE TYPE X Y ROLE NAME_STRING
|
||||
#define DEFENDER SIDE TYPE X Y ROLE_STRING NAME_STRING
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
|
@ -1235,7 +1235,7 @@
|
|||
y={Y}
|
||||
random_traits=yes
|
||||
upkeep=full
|
||||
role={ROLE}
|
||||
role={ROLE_STRING}
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -72,7 +72,8 @@
|
|||
number=3
|
||||
[/attack]
|
||||
|
||||
#define CENTRAL_BODY_ATTACK_ANIMATION IMAGE_FUNCTION
|
||||
#define CENTRAL_BODY_ATTACK_ANIMATION AFFIX
|
||||
# The affix should name an image function.
|
||||
start_time=-100
|
||||
missile_start_time=-50
|
||||
[missile_frame]
|
||||
|
@ -84,7 +85,7 @@
|
|||
hits=no
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/core-compact.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/core-compact.png~{AFFIX}"
|
||||
sound=magic-dark-miss.ogg
|
||||
[/frame]
|
||||
[/if]
|
||||
|
@ -92,7 +93,7 @@
|
|||
hits=yes
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/core-compact.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/core-compact.png~{AFFIX}"
|
||||
sound=magic-dark.ogg
|
||||
[/frame]
|
||||
[/else]
|
||||
|
|
|
@ -76,7 +76,8 @@
|
|||
number=3
|
||||
[/attack]
|
||||
|
||||
#define CENTRAL_BODY_ATTACK_ANIMATION IMAGE_FUNCTION
|
||||
#define CENTRAL_BODY_ATTACK_ANIMATION AFFIX
|
||||
# AFFIX must name an image function
|
||||
start_time=-100
|
||||
missile_start_time=-50
|
||||
[missile_frame]
|
||||
|
@ -88,7 +89,7 @@
|
|||
hits=no
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/core-compact.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/core-compact.png~{AFFIX}"
|
||||
sound=magic-dark-miss.ogg
|
||||
[/frame]
|
||||
[/if]
|
||||
|
@ -96,7 +97,7 @@
|
|||
hits=yes
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/core-compact.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/core-compact.png~{AFFIX}"
|
||||
sound=magic-dark.ogg
|
||||
[/frame]
|
||||
[/else]
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
number=1
|
||||
[/attack]
|
||||
|
||||
#define PULSING_SPIRE_ATTACK_ANIMATION IMAGE_FUNCTION
|
||||
#define PULSING_SPIRE_ATTACK_ANIMATION AFFIX
|
||||
# The affix names an image function.
|
||||
start_time=-100
|
||||
missile_start_time=-50
|
||||
[missile_frame]
|
||||
|
@ -67,7 +68,7 @@
|
|||
hits=no
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/spire.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/spire.png~{AFFIX}"
|
||||
sound=magic-dark-miss.ogg
|
||||
[/frame]
|
||||
[/if]
|
||||
|
@ -75,7 +76,7 @@
|
|||
hits=yes
|
||||
[frame]
|
||||
duration=200
|
||||
image="units/alien/spire.png~{IMAGE_FUNCTION}"
|
||||
image="units/alien/spire.png~{AFFIX}"
|
||||
sound=magic-dark.ogg
|
||||
[/frame]
|
||||
[/else]
|
||||
|
|
|
@ -715,20 +715,20 @@ While undead lords arrived on the Great Continent in considerable numbers only i
|
|||
frozen=1
|
||||
unwalkable=1
|
||||
#enddef
|
||||
#define FLY_DEFENSE DEF
|
||||
deep_water={DEF}
|
||||
shallow_water={DEF}
|
||||
reef={DEF}
|
||||
swamp_water={DEF}
|
||||
flat={DEF}
|
||||
sand={DEF}
|
||||
forest={DEF}
|
||||
hills={DEF}
|
||||
mountains={DEF}
|
||||
village={DEF}
|
||||
castle={DEF}
|
||||
frozen={DEF}
|
||||
unwalkable={DEF}
|
||||
#define FLY_DEFENSE DEFENSE_NUMBER
|
||||
deep_water={DEFENSE_NUMBER}
|
||||
shallow_water={DEFENSE_NUMBER}
|
||||
reef={DEFENSE_NUMBER}
|
||||
swamp_water={DEFENSE_NUMBER}
|
||||
flat={DEFENSE_NUMBER}
|
||||
sand={DEFENSE_NUMBER}
|
||||
forest={DEFENSE_NUMBER}
|
||||
hills={DEFENSE_NUMBER}
|
||||
mountains={DEFENSE_NUMBER}
|
||||
village={DEFENSE_NUMBER}
|
||||
castle={DEFENSE_NUMBER}
|
||||
frozen={DEFENSE_NUMBER}
|
||||
unwalkable={DEFENSE_NUMBER}
|
||||
#enddef
|
||||
#define FLY_RESISTANCE
|
||||
[resistance]
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# wmllint: local spelling Sulla
|
||||
|
||||
[multiplayer]
|
||||
#define SULLA_STATUE TYPE X Y FACING NAME_STRING
|
||||
#define SULLA_STATUE TYPE X Y FACING_STRING NAME_STRING
|
||||
[unit]
|
||||
type={TYPE}
|
||||
name= "`~`" + {NAME_STRING}
|
||||
x={X}
|
||||
y={Y}
|
||||
facing={FACING}
|
||||
facing={FACING_STRING}
|
||||
unrenamable=yes
|
||||
random_traits=no
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#textdomain wesnoth-anl
|
||||
|
||||
#define COMPLETE_ACTION GOLD
|
||||
#define COMPLETE_ACTION GOLD_NUMBER
|
||||
{VARIABLE finished yes}
|
||||
{VARIABLE unit.status.worked_this_turn yes}
|
||||
{VARIABLE unit.moves 0}
|
||||
|
@ -8,7 +8,7 @@
|
|||
variable=unit
|
||||
[/unstore_unit]
|
||||
[gold]
|
||||
amount={GOLD}
|
||||
amount={GOLD_NUMBER}
|
||||
side=$side_number
|
||||
[/gold]
|
||||
#enddef
|
||||
|
|
|
@ -145,7 +145,7 @@ def formaltype(f):
|
|||
# Deduce the expected type of the formal
|
||||
if f.startswith("_"):
|
||||
f = f[1:]
|
||||
if f in ("SIDE", "X", "Y", "RED", "GREEN", "BLUE", "TURN", "RADIUS") or f.endswith("NUMBER") or f.endswith("AMOUNT") or f.endswith("COST") or f.endswith("_X") or f.endswith("_Y") or f.endswith("_INCREMENT"):
|
||||
if f in ("SIDE", "X", "Y", "RED", "GREEN", "BLUE", "TURN", "RADIUS") or f.endswith("NUMBER") or f.endswith("AMOUNT") or f.endswith("COST") or f.endswith("_X") or f.endswith("_Y") or f.endswith("_INCREMENT") or f.endswith("_FACTOR"):
|
||||
ftype = "numeric"
|
||||
elif f in ("POSITION",):
|
||||
ftype = "position"
|
||||
|
|
Loading…
Add table
Reference in a new issue