They break some unit tests and we can't seem to decide whether the tests
are truly at fault (that is beyond the fact that they _should_ certainly
use [terrain] instead of [terrain_mask]) or whether the issue that the
author was trying to fix at the beginning was an issue in the first
place.
This reverts the following commits:
* commit 6b78073b49
* commit 2f650419da
* commit a436c46f13
* commit fcf8b72efd
* commit 079692d424
* commit 730d837296
previously there were 2 flags share_view=yes/no and share_maps=yes/no,
but only 3 possible settings (share both, share none, only share shroud)
(so share_maps= was ignored if share_viewv=yes). This made the wml code and
the c++ code needlessly complicated.
Now these 2 flags are replaced by share_vision=all/shroud/none
A new unit test, called 'test_role_lua' was added, to ensure that the [role]
tag could be used from Lua.
Also, in the first unit test the types list is stored in a variable, to
ensure that variable substitution works as intended
This is somewhat incomplete, but already covers most core functionality
and helped uncover an important bug in the BFS implementation (see
commit 1c927c8407).
Most notably, normalize_path() isn't tested yet, as well as corner cases
with empty strings and get_wml_location().
this commit also changed slightly the way that wml menu events
are synced. previously they were run via "run_in_synced_context",
now they are run via "run_in_synced_context_if_not_already", which
makes it safe to fire them from lua (a synced context).
Reverts commit e85c37e161 which was
an error.
I chose to use a scoped_pointer this time around because the
definition of play_controller should not actually depend on the
complete definition of unit_type.
Unlike [allied_with] and [enemy_of], these will match if only if
there is *any* ally or enemy matching the filter. The other versions
of the tag match only if all sides matching the filter are
allied / opposed.
This commit also adds a unit test that checks that it works as
expected.
This commit only includes files that weren't incorrectly modified by
wmlindent as the result of bugs; in other words, all files but the
following:
* break_replay_with_lua_random.cfg
* characterize_pathfinding.cfg
* event_handlers_in_events.cfg
* recruit_facing.cfg
There is some WML in data/test/scenarios/ that causes wmlindent to
misbehave (bug #22264 and possibly others awaiting a more thorough
diagnosis), so that subdir is not part of this commit.
wmlindent chokes on these
commit made with the following command:
find data/test/scenarios/ -type f -print0 | xargs -0 sed -i
"s|^\([[:space:]]*\[\/.*\]\)[[:space:]]*)\}[[:space:]]*$|\1\n)}|"