From 267b7db441375c80f29b7617575bc40777f76ad9 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Mon, 19 Oct 2020 17:51:48 +0200 Subject: [PATCH] fix indention of NEAREST_HEX macro uses previously the code put the brackets in the wrong line and handfixed that but a wmlindent comment, but that then broke possible other uses of that macro. --- .../scenarios/02_Dark_Business.cfg | 23 ++++++------- .../scenarios/06_Following_the_Shadow.cfg | 33 ++++++++++--------- .../scenarios/11_Battleground.cfg | 8 ++--- .../scenarios/16_The_Mage.cfg | 11 +++---- .../scenarios/21_Against_the_World.cfg | 12 +++---- 5 files changed, 39 insertions(+), 48 deletions(-) diff --git a/data/campaigns/Secrets_of_the_Ancients/scenarios/02_Dark_Business.cfg b/data/campaigns/Secrets_of_the_Ancients/scenarios/02_Dark_Business.cfg index 386e3354476d..07312801d314 100644 --- a/data/campaigns/Secrets_of_the_Ancients/scenarios/02_Dark_Business.cfg +++ b/data/campaigns/Secrets_of_the_Ancients/scenarios/02_Dark_Business.cfg @@ -607,18 +607,19 @@ of Healing" [filter] [/filter] [/not] - [/and] ) location} + [/and] + ) location} - [move_unit_fake] - type=Spearman - x=10, $location.x - y=11, $location.y - side=2 - [/move_unit_fake] - {PLACE_GUARD $location.x $location.y (Spearman) {TRAIT1} {TRAIT2} {ID} {NAME}} - [clear_variable] - name=location - [/clear_variable] + [move_unit_fake] + type=Spearman + x=10, $location.x + y=11, $location.y + side=2 + [/move_unit_fake] + {PLACE_GUARD $location.x $location.y (Spearman) {TRAIT1} {TRAIT2} {ID} {NAME}} + [clear_variable] + name=location + [/clear_variable] #enddef # wmllint: whofield MOVE_AND_PLACE_GUARD 3 diff --git a/data/campaigns/Secrets_of_the_Ancients/scenarios/06_Following_the_Shadow.cfg b/data/campaigns/Secrets_of_the_Ancients/scenarios/06_Following_the_Shadow.cfg index 73cfaf0a7959..37609359a56e 100644 --- a/data/campaigns/Secrets_of_the_Ancients/scenarios/06_Following_the_Shadow.cfg +++ b/data/campaigns/Secrets_of_the_Ancients/scenarios/06_Following_the_Shadow.cfg @@ -184,23 +184,24 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag [or] x,y=47,13 [/or] - [/not]) location} + [/not] + ) location} - [move_unit_fake] - type={TYPE} - side=3 - x=47,$location.x - y=13,$location.y - [/move_unit_fake] - [unit] - type={TYPE} - side=3 - x=$location.x - y=$location.y - [/unit] - [clear_variable] - name=location - [/clear_variable] + [move_unit_fake] + type={TYPE} + side=3 + x=47,$location.x + y=13,$location.y + [/move_unit_fake] + [unit] + type={TYPE} + side=3 + x=$location.x + y=$location.y + [/unit] + [clear_variable] + name=location + [/clear_variable] #enddef [event] diff --git a/data/campaigns/Secrets_of_the_Ancients/scenarios/11_Battleground.cfg b/data/campaigns/Secrets_of_the_Ancients/scenarios/11_Battleground.cfg index 3f28e12eca11..86cce732f300 100644 --- a/data/campaigns/Secrets_of_the_Ancients/scenarios/11_Battleground.cfg +++ b/data/campaigns/Secrets_of_the_Ancients/scenarios/11_Battleground.cfg @@ -2,10 +2,6 @@ # A loyal saurian healer is added at the end of this scenario--very useful. -# This is slightly hackish since the closer contains VAR_NAME... -# wmlindent: opener "{NEAREST_HEX " -# wmlindent: closer "location}" - [scenario] name= _ "Battleground" map_file=11_Battleground.map @@ -187,8 +183,8 @@ Rastaban seems like an acceptable ally. He is quite different from the stodgy te [not] [filter] [/filter] - [/not] ) - location} + [/not] + ) location} [move_unit_fake] type=Saurian Soothsayer diff --git a/data/campaigns/Secrets_of_the_Ancients/scenarios/16_The_Mage.cfg b/data/campaigns/Secrets_of_the_Ancients/scenarios/16_The_Mage.cfg index 3dcb8859ae91..32d3becb5eb8 100644 --- a/data/campaigns/Secrets_of_the_Ancients/scenarios/16_The_Mage.cfg +++ b/data/campaigns/Secrets_of_the_Ancients/scenarios/16_The_Mage.cfg @@ -5,10 +5,6 @@ # Crelanu. The water destroys undead, but can be removed by living units. It is there # to prevent easy assassination of Crelanu with a few specters. -# This is slightly hackish since the closer contains VAR_NAME... -# wmlindent: opener "{NEAREST_HEX " -# wmlindent: closer "location}" - [scenario] name= _ "The Mage" map_file=16_The_Mage.map @@ -464,12 +460,13 @@ We crossed the high plateaus, and forded the Arkan-thoria. Then we headed up int # We'd prefer the gryphon to be recruited in a castle hex, so we'll try to # find an empty one. - {NEAREST_HEX 21 6 3 (terrain=C* + {NEAREST_HEX 21 6 3 ( + terrain=C* [not] [filter] [/filter] - [/not]) - location} + [/not] + ) location} [if] [variable] name=location.length diff --git a/data/campaigns/Secrets_of_the_Ancients/scenarios/21_Against_the_World.cfg b/data/campaigns/Secrets_of_the_Ancients/scenarios/21_Against_the_World.cfg index aa32aa26efea..b34b8a99adfb 100644 --- a/data/campaigns/Secrets_of_the_Ancients/scenarios/21_Against_the_World.cfg +++ b/data/campaigns/Secrets_of_the_Ancients/scenarios/21_Against_the_World.cfg @@ -6,10 +6,6 @@ # backfire as the leader will get at least a castle's worth of units a turn earlier in # this case. Several events and macros control this. (About half of this file actually.) -# This is slightly hackish since the closer contains VAR_NAME... -# wmlindent: opener "{NEAREST_HEX " -# wmlindent: closer "location}" - [scenario] name= _ "Against the World" map_file=21_Against_the_World.map @@ -680,8 +676,8 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m [not] [filter] [/filter] - [/not]) - location} + [/not] + ) location} [move_unit_fake] type=Great Mage @@ -747,8 +743,8 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m [not] [filter] [/filter] - [/not]) - location} + [/not] + ) location} [move_unit_fake] type=Elvish Enchantress