Skip to content

Commit

Permalink
Fix potentially deprecated use of viewing_side=0 in [store_reachable_…
Browse files Browse the repository at this point in the history
…locations]
  • Loading branch information
CelticMinstrel committed Feb 17, 2021
1 parent d332006 commit 23ae4db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data/lua/wml-tags.lua
Expand Up @@ -437,7 +437,12 @@ function wml_actions.store_reachable_locations(cfg)
local range = cfg.range or "movement"
local moves = cfg.moves or "current"
local variable = cfg.variable or wml.error "[store_reachable_locations] missing required variable= key"
local reach_param = { viewing_side = cfg.viewing_side or 0 }
local reach_param = { viewing_side = cfg.viewing_side }
if cfg.viewing_side == 0 then
wml.error "[store_reachable_locations] invalid viewing_side"
elseif cfg.viewing_side == nil then
reach_param.ignore_visibility = true
end
if range == "vision" then
moves = "max"
reach_param.ignore_units = true
Expand Down

0 comments on commit 23ae4db

Please sign in to comment.