equal
deleted
inserted
replaced
1 #summary Lua library documentation of Achievements; contains assorted helper functions |
1 #summary Lua library documentation of Achievements; contains assorted helper functions |
2 #labels !LuaLibrary |
2 #labels !LuaLibrary |
3 = Lua library: `Achievements` = |
3 = Lua library: `Achievements` = |
4 WARNING: The achievements system is still very bare bones. It might be subject to major changes in future. This library should only be used internally by Hedgewars at this point. |
4 *WARNING*: The achievements system is still very bare bones. It might be subject to major changes in future. This library should only be used internally by Hedgewars at this point. |
5 |
5 |
6 This is simple library for awarding an achievement to the player, to be used in missions. They are not meant for multiplayer. |
6 This is simple library for awarding an achievement to the player, to be used in missions. They are not meant for multiplayer. |
7 |
7 |
8 An achievement in Hedgewars is a simple award given for doing something awesome or difficult in a mission, or winning a mission in a great way. |
8 An achievement in Hedgewars is a simple award given for doing something awesome or difficult in a mission, or winning a mission in a great way. |
9 Achievements are a hidden feature in Hedgewars so far and far from complete. |
9 Achievements are a hidden feature in Hedgewars so far and far from complete. |
12 == `awardAchievement(name, statText, capgrp)` == |
12 == `awardAchievement(name, statText, capgrp)` == |
13 Awards an achievement with name `name` to player. |
13 Awards an achievement with name `name` to player. |
14 |
14 |
15 Currently, this only displays a caption and adds a mention in the stat screen. |
15 Currently, this only displays a caption and adds a mention in the stat screen. |
16 |
16 |
17 * `name`: Name of achievement. |
17 Parameters: |
18 * `statText`: Optional. If set as string, this text will be shown in the stats screen. If `nil`, a default text is used. |
18 |
19 * `capgrp`: Optional. Caption group of `AddCaption` to be used. Default is `capgrpMessage2`. If `false`, no caption is shown. |
19 * `name`: Name of achievement. |
|
20 * `statText`: Optional. If set as string, this text will be shown in the stats screen. If `nil`, a default text is used. |
|
21 * `capgrp`: Optional. Caption group of `AddCaption` to be used. Default is `capgrpMessage2`. If `false`, no caption is shown. |
20 |
22 |
21 For consistent style, treat the name like a title is written in the English language. Good: “Naughty Ninja”. Bad: “naughty ninja”. |
23 For consistent style, treat the name like a title is written in the English language. Good: “Naughty Ninja”. Bad: “naughty ninja”. |