Several keys were either missing or misnamed in the formula view.
These have been changed to match the Lua and WML names for the keys.
This affects canrecruit, moves, and max_moves, as well as status.
In addition, a large number of keys were missing entirely from the formula view.
Most of these keys have now been added and can be accessed from formulas.
A few that have little use in filters (such as image_mods or profile) are still missing.
The Lua view missed a few keys that the formula view did provide.
Although these could in principle have been obtained by using the special __cfg key,
they have now been added to the Lua view anyway.
And related commits.
This reverts commit 545253ec2b.
This reverts commit 1215f65eb8.
This reverts commit 11664f4024.
This reverts commit e948df3424.
This reverts commit 3781e7839f.
This commits were reverted to exclude them from wesnoth 1.13.2 release because:
1) We are still unsure about the best name oftthese attributes
2) This breaks multiple campaigns, including LoW and the tutorial.
Feel free to revert this revert after 1.13.2 when thse issues can be solved..
(With unit tests to back it up!)
- Fixes [for]step=0
- Fixes [for]start,stop=0,0
- Fixes [for]start,end,step=0,1,-1
- Probably fixes several other things too
This explains (in the log) why a WML conditional has failed (or succeeded). Currently it is fairly basic, looping through and/or/not and printing out the specific conditional tag that failed as well as, for [variable], the current content of the variable.
It's used in the WML unit tests system, but could also be useful for debugging.
This commit also fixes an issue with passing multiple -a arguments to run_wml_tests.
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