8 Commits

Author SHA1 Message Date
Pentarctagon
d1465a9eb9
Add basic achievements functionality. (#7237)
* 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!
2023-01-21 10:32:45 -06:00
Celtic Minstrel
6d3dd6a175 Support as_type=weapon in [variable]formula= 2022-12-06 01:52:38 -05:00
Celtic Minstrel
6876695e66 Support as_type=unit in [variable]formula= 2022-11-27 13:12:47 -05:00
Celtic Minstrel
516f043e89 Support name= in [lua] ConditionalWML 2022-11-27 13:10:41 -05:00
Celtic Minstrel
67ba27b8a3
Move the end level data accessors to wesnoth.scenario (#5861) 2021-06-17 20:41:48 -04:00
Celtic Minstrel
d2a465a126 Support formula= in [variable] ConditionalWML
(cherry-picked from commit 4e52d62963b10c26f33bccfcbad758c0072da393)
2018-10-07 03:18:12 +00:00
Charles Dang
0103959c36 Cleaned up deprecated API usage in core Lua
[ci skip]
2018-03-13 16:55:36 +11:00
Charles Dang
da3a0ed7cf Added [lua] conditional tag
Also made conditions fail if they encountered a syntax or runtime error. This seems the
more logical behavior than passing.

WML conditional tags were split into their own Lua file. The one in lua/wml/object.lua
relies on local variables so was left there.
2018-01-22 23:03:16 +11:00