* Add basic achievements functionality.
This reads the mainline achievements.cfg and then all the achievements of each installed add-on.
This is intentionally handled separately from other WML loading so that:
a) All achievements and their status are able to be displayed on the main menu right after Wesnoth starts and regardless of which add-ons are active.
b) Add-ons can add additional achievements to other content, whether UMC or mainline. For example, a modification that adds more achievements for mainline campaigns.
Marking something as achieved is handled by the new [set_achieved] tag and whether an achievement has been completed can be checked via [has_achievement].
There is no attempt to prevent people from manually editing which achievements they've accomplished.
NOTE: These are *not* in any way related to Steam achievements!
This adds "+" for Zoom-in as an additional hotkey (without removing the previously set value).
The "=" key doesn't seem to work when pressing it from a keyboard layout such as German Qwerty in Windows. It's also against the user's expectations that if we accidentally press on "minus" causing the map to zoom out, the expectation would be for the opposite operation to be "plus".
Re-created hotkeys file.
Borrows heavily from https://r.wesnoth.org/t41525.
Most of the common commands now have single keystrokes on the keyboard in addition to their currently defined keystrokes. Almost everything remains the same, except the following has changed:
* Continue is now `C` instead of `T`
* Go to Leader is now `K` instead of `L`
* Kill Unit is now `DEL` instead of `X`
* Undo is now `Z` or `CTRL + Z` instead of `U`
* Redo is now `SHIFT + Z` or `CTRL + SHIFT + Z` instead of `R`
* Planning mode is now `ALT + P` instead of `P`
* Delete Action (Planning Mode) is now `BACKSPACE` instead of `H`
* Suppose Dead (Planning Mode) is now `X` instead of `I`
I forgot this in the previous commit. Currently the engine doesn't
display a warning about binding to an unknown command, I'm considering
adding a warning for that.
This enables textinput events in SDL and adds handling of them. The events
are processed for hotkeys if the length of the hotkey string is 1 (which is the
case for all straightforward hotkeys).
They can't be changed, but it will at least let people know that the key works for that command.
Currently they're just hard-coded. A more general solution would be possible, if there's
any chance that more non-rebindable hotkeys are needed.
This also removes Cmd+Shift+Q as a shortcut for Quit to Desktop on OSX.
There is a new class introduced, hokey_base, that is the public
interface to the hotkey bindings. It is an abstract class that relies
on concrete classes hokey_keyboard and hotkey_mouse to do the device
specific hotkey work via the template method pattern.
There are two factory methods introduced, load_hotkey and
create_hotkey that should only be used to instantiate new objects.
This commit also changes the hotkey ":" and "+" to ";" respective "="
becausse ":" and "+" are not valid keycodes.
- Add an internal command logger to the lua kernel base, and expose
this.
- Redirect the internal lua `print` to the command logger.
- Add an external logger registration system to lua kernel, in
addition to the internal one.
- Add a lua console dialog which binds to a lua kernel base and
permits to review the contents of the logger and issue new commands,
and report errors.
- Add a hotkey binding to launch the lua console "`"
- Adds tab completion support to the lua console
...bound to ctrl+y by default, and added to the actions (not context)
menu. It executes actions in sequence until the first attack, or until
an action fails to execute. Fulfills the feature request of bug
#16807.
Simplified some return type in the process in side_actions: returning
iterators wasn't really useful for the execute functions.