diff options
author | Rubenwardy <anjayward@gmail.com> | 2013-02-22 17:53:42 +0000 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2013-02-22 17:53:42 +0000 |
commit | bc2b7902ed5f2a192303277f242b3cca065b0623 (patch) | |
tree | 699bd6d80f9f76f1acc941a3bfc2c6b7495d42c9 /init.lua |
Initial Commit
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..f88c74b --- /dev/null +++ b/init.lua @@ -0,0 +1,44 @@ +-- AWARDS +-- by Rubenwardy, CC-BY-SA +------------------------------------------------------- +-- this is the api definition file for the awards mod +------------------------------------------------------- + +-- The global award namespace +awards={} +player_data={} + +-- A table of award definitions +awards.def={} + +-- Load files +dofile(minetest.get_modpath("awards").."/triggers.lua") + + +-- API Functions +function awards.register_achievement(name,data_table) + data_table["name"] = name + table.insert(awards.def,data_table); +end + +function awards.register_onDig(data) + table.insert(awards.onDig,data); +end + +function awards:getNodeCount(nodeName) + return self.count[nodeName] +end + + +-- Example Achievements +awards.register_achievement("award_mesefind",{ + title = "First Mese Find", + description = "Found some Mese!", +}) + +awards.register_onDig({ + award="", + func=function(player) + + end +})
\ No newline at end of file |