Expect integer literals from formals X and Y.
New magic formals XSPAN and YSPAN accept ranges. (This will enable tighter type-ccking on macros like PLACE_IMAGE).
This commit is contained in:
parent
d0a30839ed
commit
ca4c995e6c
5 changed files with 12 additions and 12 deletions
|
@ -171,9 +171,9 @@
|
|||
# locations across all possible locations at once, the RNG could theoretically
|
||||
# clump all the ambushers into a single corner of the map.
|
||||
|
||||
#define UNDEAD_AMBUSH_AREA SIDE X Y NUMBER
|
||||
#define UNDEAD_AMBUSH_AREA SIDE XSPAN YSPAN NUMBER
|
||||
[store_locations]
|
||||
x,y={X},{Y}
|
||||
x,y={XSPAN},{YSPAN}
|
||||
terrain=Ss
|
||||
|
||||
[filter_adjacent_location]
|
||||
|
|
|
@ -237,12 +237,12 @@
|
|||
# locations across all possible locations at once, the RNG could theoretically
|
||||
# clump all the ambushers into a single corner of the map.
|
||||
|
||||
#define ORC_AMBUSH_AREA SIDE X Y NUMBER
|
||||
#define ORC_AMBUSH_AREA SIDE XSPAN YSPAN NUMBER
|
||||
# Any hill that's completely surrounded by other hills, mountains or
|
||||
# forest is eligible as an ambush location.
|
||||
|
||||
[store_locations]
|
||||
x,y={X},{Y}
|
||||
x,y={XSPAN},{YSPAN}
|
||||
terrain=Hh
|
||||
|
||||
[not]
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
{CLEAR_VARIABLE chgtype_store}
|
||||
#enddef
|
||||
|
||||
#define CHG_TERRAIN LETTER X Y
|
||||
#define CHG_TERRAIN LETTER XSPAN YSPAN
|
||||
[terrain]
|
||||
letter={LETTER}
|
||||
x={X}
|
||||
y={Y}
|
||||
x={XSPAN}
|
||||
y={YSPAN}
|
||||
[/terrain]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -947,10 +947,10 @@
|
|||
{VARIABLE main_spawns[$main_group].spawn_number $spawn_id}
|
||||
#enddef
|
||||
|
||||
#define DEFINE_SPAWN_LOCATION X Y
|
||||
#define DEFINE_SPAWN_LOCATION XSPAN YSPAN
|
||||
{VARIABLE_OP location add 1}
|
||||
{VARIABLE spawn_place[$location].x {X}}
|
||||
{VARIABLE spawn_place[$location].y {Y}}
|
||||
{VARIABLE spawn_place[$location].x {XSPAN}}
|
||||
{VARIABLE spawn_place[$location].y {YSPAN}}
|
||||
#enddef
|
||||
|
||||
#define DEFINE_FIXED_GROUP X Y
|
||||
|
|
|
@ -62,9 +62,9 @@ def isresource(filename):
|
|||
|
||||
def formaltype(f):
|
||||
# Deduce the expected type of the formal
|
||||
if f in ("SIDE",):
|
||||
if f in ("SIDE", "X", "Y"):
|
||||
ftype = "numeric"
|
||||
elif f in ("X", "Y", "SPAN"):
|
||||
elif f in ("XSPAN", "YSPAN", "SPAN"):
|
||||
ftype = "span"
|
||||
elif f in ("RANGE",):
|
||||
ftype = "range"
|
||||
|
|
Loading…
Add table
Reference in a new issue