To report the WFL call stack in the event of errors, a static stack is used to
record that call-stack. This wasn't thread-safe, and it intermittently crashed
when the game config was movetype patching (the other WFL thread involved is
the GUI2 layout code).
Also a Rule of Three fix for the call_stack_manager class. While this wasn't
the cause of the crash, it could also have lead to a call_stack.pop_back() on
an empty stack.
The bug introduced in fcd0ceda is fixed by ensuring that movetype::merge() is
called with the strings "movement_costs", "vision_costs" and "jamming_costs"
instead of "movement", "vision" and "jamming".
Both [terrain_defaults][movement] and [terrain_defaults][movement_costs] are
supported and equivalent, as added to the master branch in 3522eb2c.
These now work again:
[resistance_defaults]
id="special_res_for_test"
default="30"
[/resistance_defaults]
[resistance_defaults]
id="copy_of_arcane"
default="(arcane)"
[/resistance_defaults]
[terrain_defaults]
id="special_terrain_for_test"
[movement]
default="(swamp_water + 1)"
orcishfoot="(swamp_water * 2)"
[/movement]
[/terrain_defaults]
Formulas can now access other parts of the movetype too, as this allowed the
code to be the same as in 1.15:
[terrain_defaults]
id="special_terrain_for_test"
[movement_costs]
default="(swamp_water + 1)"
orcishfoot="(vision_costs.swamp_water * 2)"
[/movement_costs]
[/terrain_defaults]
[terrain_defaults]
id="special_terrain_for_test"
[defense]
default="(20 + 7 * movement_costs.special_terrain_for_test)"
[/defense]
[/terrain_defaults]
The formula handling will recognise "resistance", "movement_costs",
"vision_costs", "jamming_costs" and "defense". For [resistance_defaults], the
formula will recognise both "(arcane)" and "(resistance.arcane)" as equivalent,
similarly for [terrain_defaults] "(swamp_water)" is a shorthand for whichever
subtag is being patched.
A [terrain_defaults] tag may use data added in a previous [terrain_defaults],
as in the examples above where the second tag's [defense] is based on the first
tag's [movement_costs], this gives orcish grunts on the special terrain a 62%
chance to be hit. However, relying on data in the same [terrain_defaults] that
creates or changes it is unsupported - if the [movement_costs] and [defense]
were in a single [terrain_defaults] tag then the result would be implementation
defined, because no guarantee is made of the order in which the children of the
tag are processed.
The unit tests for [terrain_defaults] and [resistance_defaults] must stay
out-of-tree until we support some method of testing them without affecting the
core units' stats during other tests. The test added here is limited to
checking the ways that WML can read the stats, it's also a framework for the
out-of-tree parts to use.
This is a squashed cherry pick of these commits from 1.15:
* 72863e578b (the unit test)
* 0ba433203e
* 3522eb2c2a (adding the aliases)
* 0035b776d7 (fix for empty children)
It was already considered for registering halos, just not for rendering
regular frames. This commit touches the halo code a little so we don't
need to call get_zoom_factor() multiple times per frame.
Closes#5508.
This adds support for _<<map="{maps/01_First_Map.map}">>, as used in the
editor file format documentation.
This doesn't require another .pot update, because both the workaround in
3d77d36 and this fix generate the same string in the .pot file. However, it
does change the string that the Wesnoth executable looks for so that it matches
the .pot file's contents.
Cherry picked from commit c30c30acfc, and
additionally reverted commit 3d77d36bb0.
A couple of warnings about the scenario mode being buggy are added to the
user-visible text, find these by looking for <bold> tags within the text.
This takes all the changes to the editor documentation that were made to master
up to and including a4711ebad9. There have been no changes at all to the editor
documentation in the 1.14 branch, while there have been several updates to the
master branch that would be good to backport if the help is displayed in the
1.14 branch - this commit simply pulls the entire file into the 1.14 branch
along with enabling the editor documentation (a small change to
data/core/help.cfg, as done in commit ed611f9438).
The sound source tool isn't mentioned at all in this documentation. There is a
button for it in the 1.14 UI, but that button's only function is to say that
it's not implemented, so documentation seems unnecessary.
Fixes the dreaded "Mandatory WML child missing yet untested for. Please
report" error occurring when reading _info.cfg files that don't have a
valid [info] tag. In particular, this would cause the game version
dialog to crash to desktop.
Some units can be cut of fin the 2nd round. That's not a problem, but with a
good portion of bad luck it could happen to MKBones, making the scenario
unwinnable. That's handled by map adjustments.
Also increasing HP by 3 for the lich start, might even be more.
Discussion in #5296