diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-04-05 17:09:42 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-04-05 17:11:51 +0100 |
commit | 4e6ade249e63650ed1bd3a5e23f446ad4b3f7edf (patch) | |
tree | 5af2991d87bf86bb91d7c654b3bade6e06be704c /api.lua | |
parent | e110bbbc7a8dea47b9ed536fcd31dc21169c6bd6 (diff) |
Use awards for technical things, and achievements for user facing things
Fixes #18
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -286,7 +286,7 @@ function awards.register_on_unlock(func) table.insert(awards.on_unlock, func) end -function awards.register_achievement(name, def) +function awards.register_award(name, def) def.name = name -- Add Triggers @@ -337,7 +337,7 @@ function awards.clear_player(name) end -- This function is called whenever a target condition is met. --- It checks if a player already has that achievement, and if they do not, +-- It checks if a player already has that award, and if they do not, -- it gives it to them ---------------------------------------------- --awards.unlock(name, award) @@ -411,7 +411,7 @@ function awards.unlock(name, award) if awards.show_mode == "chat" then local chat_announce - if awdef.secret == true then + if awdef.secret then chat_announce = S("Secret Achievement Unlocked: %s") else chat_announce = S("Achievement Unlocked: %s") @@ -433,7 +433,7 @@ function awards.unlock(name, award) alignment = {x = 0, y = -1} }) local hud_announce - if awdef.secret == true then + if awdef.secret then hud_announce = S("Secret Achievement Unlocked!") else hud_announce = S("Achievement Unlocked!") |