diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-04-04 17:42:12 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-04-04 17:42:12 +0100 |
commit | 5de9dcb7976f1c581601ab876d6bf3087991c4f6 (patch) | |
tree | 6897ade1d6e06d4bdd10d645bb93b254faf12b9e /api.lua | |
parent | 7c5fd79b57fad2b9485d801eea07c1c9fedaabe9 (diff) |
Move api_helpers.lua in api.lua
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -39,6 +39,19 @@ function awards.load() end awards.players = {} end + +function awards.player(name) + local data = awards.players[name] or {} + awards.players[name] = data + data.name = data.name or name + data.unlocked = data.unlocked or {} + return data +end + +function awards.player_or_nil(name) + return awards.players[name] +end + -- -- local function make_on_reg_wrapper() -- return function(def) |