forked from nalc/awards
Update docs
This commit is contained in:
parent
b4a4a1fd74
commit
9c74a3f85a
30
README.md
30
README.md
|
@ -194,25 +194,29 @@ end
|
||||||
* `name` is the player name
|
* `name` is the player name
|
||||||
* `def` is the award def.
|
* `def` is the award def.
|
||||||
* return true to cancel HUD
|
* return true to cancel HUD
|
||||||
* `awards.unlock(player_name, award)`
|
* `awards.unlock(player_name, award_name)`
|
||||||
* gives an award to a player
|
* gives an award to a player
|
||||||
* `awards.get_award_states(player_name)`
|
* `awards.get_award_states(player_name)`
|
||||||
* Returns list of tables, sorted by `score`, each having the fields:
|
* Returns list of tables, sorted by `score`, each having the fields:
|
||||||
|
|
||||||
{
|
```lua
|
||||||
name = "mymod:awardname",
|
{
|
||||||
def = {}, -- Award definition
|
name = "mymod:awardname",
|
||||||
unlocked = true, -- Whether award has been unlocked
|
def = {}, -- Award definition
|
||||||
started = true, -- Whether any progress has been made
|
unlocked = true, -- Whether award has been unlocked
|
||||||
score = 0, -- Score used in sorting
|
started = true, -- Whether any progress has been made
|
||||||
|
score = 0, -- Score used in sorting
|
||||||
|
|
||||||
-- Either a table or nil
|
-- Either a table or nil
|
||||||
progress = {
|
-- Will be nil if progress is indeterminable or
|
||||||
current = 5,
|
-- if the award is unlocked
|
||||||
target = 10,
|
progress = {
|
||||||
label = "label", -- Label to show over progress bar
|
current = 5,
|
||||||
}
|
target = 10,
|
||||||
|
label = "label", -- Label to show over progress bar
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Triggers
|
## Triggers
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user