rename [filter] -> [filter_location] in [random_placement]

This commit is contained in:
gfgtdf 2015-12-10 00:52:24 +01:00
parent 5147bcd6df
commit ab1a4629a9
7 changed files with 17 additions and 17 deletions

View file

@ -174,7 +174,7 @@
num_items="$number_of_guards"
allow_less=yes
variable=guard_location
[filter]
[filter_location]
[filter_adjacent_location]
x,y=$x1,$y1
[/filter_adjacent_location]
@ -182,7 +182,7 @@
[filter]
[/filter]
[/not]
[/filter]
[/filter_location]
[command]
[move_unit_fake]
side=2

View file

@ -223,7 +223,7 @@
[random_placement]
variable=ambush_location
num_items={NUMBER}
[filter]
[filter_location]
x={X_SPAN}
y={Y_SPAN}
terrain=Ss
@ -238,7 +238,7 @@
[/filter]
[/not]
[/filter_adjacent_location]
[/filter]
[/filter_location]
[command]
{VARIABLE random_ambusher_type_i ("$(($random_ambusher_type_i + 1) % $random_ambusher_type_table.length)")}
[unit]

View file

@ -287,7 +287,7 @@
[random_placement]
variable=ambush_location
num_items={NUMBER}
[filter]
[filter_location]
x={X_SPAN}
y={Y_SPAN}
terrain=Hh
@ -299,7 +299,7 @@
[/not]
[/filter_adjacent_location]
[/not]
[/filter]
[/filter_location]
[command]
[if]
[variable]

View file

@ -1396,7 +1396,7 @@
variable=wc_loc
allow_less=yes
num_items={ON_DIFFICULTY 3 6 9}
[filter]
[filter_location]
terrain=S*
[and]
@ -1408,7 +1408,7 @@
[filter]
[/filter]
[/not]
[/filter]
[/filter_location]
[command]
[sound]
name={SOUND_LIST:ZOMBIE_HIT}
@ -1437,7 +1437,7 @@
variable=skele_loc
allow_less=yes
num_items={ON_DIFFICULTY 3 4 5}
[filter]
[filter_location]
terrain=Ww
[not]
@ -1470,7 +1470,7 @@
radius=1
[/not]
[/filter_adjacent_location]
[/filter]
[/filter_location]
[command]
[store_locations]
terrain=Wo

View file

@ -35,9 +35,9 @@
num_items={NUMBER}
variable=random_placement_location
allow_less=yes
[filter]
[filter_location]
{FILTER}
[/filter]
[/filter_location]
[command]
[item]
image={IMAGE}
@ -58,9 +58,9 @@
num_items="size * ({PERCENTAGE} / 100)"
variable=random_placement_location
allow_less=yes
[filter]
[filter_location]
terrain={TERRAINLIST}
[/filter]
[/filter_location]
[command]
[terrain]
x,y=$random_placement_location.x,$random_placement_location.y

View file

@ -479,10 +479,10 @@
variable=random_placement_location
allow_less=yes
min_distance={PADDING_RADIUS}
[filter]
[filter_location]
{FILTER}
include_borders=no
[/filter]
[/filter_location]
[command]
[unit]
type=$unit_type_table[$unit_type_table_i].type

View file

@ -1647,7 +1647,7 @@ wesnoth.wml_actions.random_placement = function(cfg)
local dist_le = nil
local parsed = helper.shallow_parsed(cfg)
local filter = helper.get_child(parsed, "filter") or {}
local filter = helper.get_child(parsed, "filter_location") or {}
local command = helper.get_child(parsed, "command") or helper.wml_error("[random_placement] missing required [command] subtag")
local distance = cfg.min_distance or 0
local num_items = cfg.num_items or helper.wml_error("[random_placement] missing required 'num_items' attribute")