Without this, the engine may match map borders and send the respawnee
back to the player's recall list as those count as invalid locations
like "recall","recall".
This bit was subject to a particularly bad case of code copy-pasting
when the only real variable is the id of the first respawn hub
candidate.
Added a statement to clear the respawn_hub WML variable after running
the code since it's never used again afterwards.
It allows the user to browse to the cache (using a desktop API call),
copy its path to clipboard, clean the cache contents (deleting stale
files), or purge it entirely.
This is ideal for people sticking to the same cache dir for very long
and thus keeping content that was generated by previous versions of
Wesnoth they might not even use anymore. Purging the cache might also
aid troubleshooting (although there is a --nocache switch for that too).
The dialog also makes Wesnoth slightly more transparent about its own
disk usage, information which may not be readily accessible to people
without the technical know-how to locate a hidden directory.
For now it's accessed by pushing a button in Preferences -> General,
even though this is not ideal since it is actually Advanced Preferences
material given the nature of the cache. Unfortunately, the Advanced
page's layout is currently monopolized by the advanced preferences
options and I'm not interested right now in solving that UI design
puzzle; it will have to wait, much like the Paths dialog has done and
continues to do for 1.12.
Previously, only terrain with C or K in the terrain code passed the
SLF. Now we check whether the hex is a castle instead, independent of
the terrain code.
The dialogue was changed to make it less basic, and the map was altered
to have the player start in the West, with Al'Tar now to the North.
This enables the player to be more actively involved in the battle
earlier on in the scenario.
This replaces the page number slider with a "minimal" variant slider and
an adjacent label widget whose text we enter manually.
The label format is "<PAGE>/<COUNT>" and it's untranslatable. Hopefully
this shouldn't cause any localization issues since it's all numbers and
we currently can't use alternative numeral systems anyway.
I'm leaving the page slider's maximum_value_label attribute intact just
in case this needs to be reverted later, since it's going into the 1.12
branch too.
The default variant's text label is both inflexible in content (can't
customize the format for non-edge values) and layout (reserves way more
space than it needs at a time for its text label, often resulting in
huge horizontal gaps between a slider and an adjacent widget). This
makes it unsuitable for use in gui2::tchat_log.
This new minimal variant will be wired into gui2::tchat_log next.
This is done for cases when the value cannot be read from the unit_info
table, which might happen in some UMC. This fixes a rare bug affecting
the Fast Micro AI attack evaluation
Check whether the unit in the way has an unoccupied hex to move to.
Previously, it was only checked whether its reach was >1, which
sometimes can include only hexes occupied by units on its own side,
making the actual move impossible.
Fixes its help entry looking like this:
> --change-passphrase ADD-ON OLD NEW ADD-ON OLD NEW ADD-ON OLD NEW
> Change the passphrase for ADD-ON from OLD to NEW
When it really should look like this:
> --change-passphrase ADD-ON OLD NEW
> Change the passphrase for ADD-ON from OLD to NEW
This copies the current contents of the dialog to clipboard. The button
currently lacks a tooltip because the tooltip has the potential to cause
map labels to glitch through the dialog when displayed (see commit
eab3e6fb646fda8cc6101a3e568c86c2b17b707f and bug #22176).
This copies the contents of the main display area to clipboard. The
button currently lacks a tooltip because the tooltip causes map labels
to glitch through the dialog when displayed (noticeable in e.g. the test
scenario). I'll file a bug for this issue later using a (commented-out)
line introduced by this commit as a test case.