Fix SCATTER_UNITS placing units on map borders
This commit is contained in:
parent
e92fbcfeac
commit
e4f94adc07
1 changed files with 18 additions and 2 deletions
|
@ -515,8 +515,24 @@
|
|||
#! [/modifications]
|
||||
#! )}
|
||||
|
||||
[store_map_dimensions]
|
||||
variable=scatter_units_map_dimensions
|
||||
[/store_map_dimensions]
|
||||
|
||||
[store_locations]
|
||||
{FILTER}
|
||||
[and]
|
||||
{FILTER}
|
||||
[/and]
|
||||
|
||||
# This (and the above wrapper [and]) is used to filter out border hexes;
|
||||
# if a more straightforward way to exclude border hexes is implemented,
|
||||
# then this should be replaced with that
|
||||
[not]
|
||||
x="0, $($scatter_units_map_dimensions.width + 1)"
|
||||
[or]
|
||||
y="0, $($scatter_units_map_dimensions.height + 1)"
|
||||
[/or]
|
||||
[/not]
|
||||
|
||||
variable=possible_unit_locations
|
||||
[/store_locations]
|
||||
|
@ -590,7 +606,7 @@
|
|||
[/do]
|
||||
[/while]
|
||||
|
||||
{CLEAR_VARIABLE unit_type_table,unit_type_table_i,possible_unit_locations,random_subscript,units_to_place}
|
||||
{CLEAR_VARIABLE unit_type_table,unit_type_table_i,scatter_units_map_dimensions,possible_unit_locations,random_subscript,units_to_place}
|
||||
#enddef
|
||||
|
||||
#define FORCE_CHANCE_TO_HIT FILTER SECOND_FILTER CTH_NUMBER EXTRA_CONDITIONS_WML
|
||||
|
|
Loading…
Add table
Reference in a new issue