This adds support for having up to 28 distinct sub-achievements within a single achievement. This limit exists since wesnoth's layout isn't smart enough to tell a horizontal listbox to actually use its scrollbar instead of forcing a horizontal scrollbar on the whole window.
Additionally this adds the [set_sub_achievement] and [has_sub_achievement] WML tags and their respective lua functions. [has_sub_achievement] is unsafe for use in MP, for the same reasons that [has_achievement] is.
* wmlxgettext: Improve parser resiliency for malformed files
- WML files with no translatable strings will no longer
crash the script on unbalanced tags (but translatable will).
- .cfg files belonging to man(1) will no longer crash the script.
* Remove stray quotes from textdomain declarations
These are not recognized by the wmlxgettext parser.
Move the line that includes data/test/scenarios/manual_tests/ below the
line that includes data/test/macros/. This allows a manual test to use
the setup in COMMON_KEEP_A_B_C_D_UNIT_TEST, putting units in the right position
to test combat and leadership abilities.
Also improve comments in data/test/_main.cfg.
* wmlxgettext: Error out on unused #po, #po-override directives
* wmlxgettext: Ignore out of domain #po, #po-override comments
* wmlxgettext: Properly clear pending #po, #po-override on textdomain switch
* Fix misplaced #po comments in DiD, SoF, TSG, Editor
Some of these ugly relocations can be reverted in or after #7570.
Add a new guideline that reserves test names containing `_fail_`
or ending `_fail` for tests that don't `PASS`. The rest is just
collecting knowledge already written elsewhere.
* wmltools3: Make the CrossRef class iterable
Removes generator() method.
* wmltools3: Check for warn level on lack of wmlscope: set export
* wmltools3: Support passing a list of file paths to initialize CrossRef
* wmltools3: Track lineno_end for Reference
* wmltools3: Track default values for macro optional parameters
optional_args is no longer a list, but a dict.
* wmltools3: Track macro bodies as Reference.body
* wmltools3: Register quoted macro arguments verbatim
* wmltools3: Improve parse_macroref
- Support parsing nested macro calls.
- Remove excessive need of parens around macro calls/arguments.
- Support escaping quotes.
- Other compliance improvements.
Support (fe)male_name key in unit.
Support FEMALE_NAME in macros for named units with random gender.
Add female variants to generic unit names in DiD, TSG and UtBS.
Add `first_time_only=no` to some existing tests, and verify that events that
should only trigger once do trigger exactly once.
A new test of `[filter_attack]` when an event lacks attack data. In testing,
I found that it used to trigger a warning that I thought was useless code, and
had removed during 88439d6427a81a6b131acd8b0f7bf04b2d981d71's review. I think
removing it is still good, at the time that the filter was checked it would have
warned "attempt to filter attack for an event with no attack data."
A new test of what happens when a unit with only a ranged weapon fights a
unit with only a melee weapon. This commit is just the test, it depends on
the engine fix in a previous commit.
This only tests the filtering so far. There should probably be another
additional test to check what the combat results are, however that would need
an ability such as the Deep Elves' Stardust that passively affects the amount
of damage taken. It can't be tested with Slows, as that needs the defender to
hit with a weapon first.