[wesnoth-commits] [wesnoth/wesnoth] 06dd9a: Add [find_path] option "nearest_by", and simple_fi...
Steve Cotton
noreply at github.com
Wed Sep 11 09:17:59 UTC 2019
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 06dd9a140ce5bf59687876f9b94fa099f2fec941
https://github.com/wesnoth/wesnoth/commit/06dd9a140ce5bf59687876f9b94fa099f2fec941
Author: Steve Cotton <steve at octalot.co.uk>
Date: 2019-09-11 (Wed, 11 Sep 2019)
Changed paths:
M data/lua/wml/find_path.lua
M data/schema/core/actionwml.cfg
M data/schema/game_config.cfg
A data/test/maps/simple_find_path.map
A data/test/scenarios/simple_find_path.cfg
M wml_test_schedule
Log Message:
-----------
Add [find_path] option "nearest_by", and simple_find_path test
Adding this is issue 2 of #4177, changing the behavior when [find_path]
is given a SLF which matches multiple hexes.
The map and tests here should be easy enough for manually editing them. It
duplicates some of the functionality of the existing characterize_pathfinding
tests, however those tests need their expected values to be calculated and
can't be changed by hand.
'''nearest_by''': {DevFeature1.15|2} possible values "movement_cost"
(default), "steps", "hexes". If the [destination] SLF matches multiple hexes,
the one that would need the least movement points to reach may not be the one
that's closest as measured by '''hexes''', or closest as measured by steps,
from the starting point.
Behavior in 1.14 depended on which hex was checked first.
More information about the Commits
mailing list