mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-19 22:03:44 +01:00
Fix mistakes in award definition documentation
This commit is contained in:
parent
1ab08d68c9
commit
417ac0fe46
@ -188,16 +188,20 @@ end
|
|||||||
# API
|
# API
|
||||||
|
|
||||||
* awards.register_award(name, def), the def table has the following fields:
|
* awards.register_award(name, def), the def table has the following fields:
|
||||||
|
* `title` - title of the award (defaults to name)
|
||||||
* `description` - the title of the award. Required.
|
* `description` - the title of the award. Required.
|
||||||
* `difficulty` - see [Award Difficulty](#award-difficulty).
|
* `difficulty` - see [Award Difficulty](#award-difficulty).
|
||||||
* `requires` - list of awards that need to be unlocked before this one
|
* `requires` - list of awards that need to be unlocked before this one
|
||||||
is visible.
|
is visible.
|
||||||
|
* `prizes` - list of items to give when you earn the award
|
||||||
|
* `secret` - boolean if this award is secret (i.e. showed on awards list)
|
||||||
* `sound` - `SimpleSoundSpec` table to play on unlock.
|
* `sound` - `SimpleSoundSpec` table to play on unlock.
|
||||||
`false` to disable unlock sound.
|
`false` to disable unlock sound.
|
||||||
* `image` - the icon image, use default otherwise.
|
* `icon` - the icon image, use default otherwise.
|
||||||
* `background` - the background image, use default otherwise.
|
* `background` - the background image, use default otherwise.
|
||||||
* `trigger` - trigger definition, see [Builtin Trigger Types](#builtin-trigger-types).
|
* `trigger` - trigger definition, see [Builtin Trigger Types](#builtin-trigger-types).
|
||||||
* `on_unlock(name, def)` - callback on unlock.
|
* `on_unlock(name, def)` - callback on unlock.
|
||||||
|
|
||||||
* awards.register_trigger(name, def), the def table has the following fields:
|
* awards.register_trigger(name, def), the def table has the following fields:
|
||||||
* `type` - see [Trigger Types](#trigger-types).
|
* `type` - see [Trigger Types](#trigger-types).
|
||||||
* `progress` - used to format progress, defaults to "%1/%2".
|
* `progress` - used to format progress, defaults to "%1/%2".
|
||||||
|
Loading…
Reference in New Issue
Block a user