Add [move_unit] force_scroll attribute
Defaults to using the [move_unit_fake] default.
This commit is contained in:
parent
62a2789cb2
commit
f6cc3acbaf
2 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,8 @@ Version 1.11.5+dev:
|
|||
* [move_unit_fake] now accepts an optional force_scroll= attribute (def. to
|
||||
'yes') that allows scrolling the viewport even when [lock_view] is in
|
||||
effect or Follow Unit Actions is disabled in Advanced Preferences.
|
||||
* [move_unit] accepts an optional force_scroll= attribute like
|
||||
[move_unit_fake] above, defaults to using the [move_unit_fake] default.
|
||||
|
||||
Version 1.11.5:
|
||||
* Add-ons client:
|
||||
|
|
|
@ -652,6 +652,7 @@ function wml_actions.move_unit(cfg)
|
|||
local to_x = tostring(cfg.to_x) or helper.wml_error(coordinate_error)
|
||||
local to_y = tostring(cfg.to_y) or helper.wml_error(coordinate_error)
|
||||
local fire_event = cfg.fire_event
|
||||
local muf_force_scroll = cfg.force_scroll
|
||||
local check_passability = cfg.check_passability; if check_passability == nil then check_passability = true end
|
||||
cfg = helper.literal(cfg)
|
||||
cfg.to_x, cfg.to_y, cfg.fire_event = nil, nil, nil
|
||||
|
@ -692,7 +693,8 @@ function wml_actions.move_unit(cfg)
|
|||
image_mods = current_unit.image_mods,
|
||||
side = current_unit_cfg.side,
|
||||
x = move_string_x,
|
||||
y = move_string_y
|
||||
y = move_string_y,
|
||||
force_scroll = muf_force_scroll
|
||||
}
|
||||
local x2, y2 = current_unit.x, current_unit.y
|
||||
current_unit.x, current_unit.y = x, y
|
||||
|
|
Loading…
Add table
Reference in a new issue