summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ward <anjayward@gmail.com>2013-02-26 14:32:16 +0000
committerAndrew Ward <anjayward@gmail.com>2013-02-26 14:32:16 +0000
commit647e7b8969334df1c6391c3370910d98a6d6629b (patch)
tree789fd01a4e2ea8180b3685619f3fbf08c4a2e679
parentf9ec33fb1b410ccbd08deb857f319e2c288c179e (diff)
Move icon/bg/cstm_announce check to correct place
-rw-r--r--api.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/api.lua b/api.lua
index ad1574b..4f8b0e8 100644
--- a/api.lua
+++ b/api.lua
@@ -1,4 +1,3 @@
-
-- Table Save Load Functions
function save_playerD()
local file = io.open(minetest.get_worldpath().."/awards.txt", "w")
@@ -54,17 +53,18 @@ function awards.register_achievement(name,data_table)
}
table.insert(awards.onDeath,tmp)
end
- if data_table['icon'] == nil or data_table['icon'] == "" then
- data_table['icon'] = "unknown.png"
- end
- if data_table['background'] == nil or data_table['background'] == "" then
- data_table['background'] = "bg_default.png"
- end
- if data_table['custom_announce'] == nil or data_table['custom_announce'] == "" then
- data_table['custom_announce'] = "Achievement Unlocked:"
- end
+ end
+ if data_table['icon'] == nil or data_table['icon'] == "" then
+ data_table['icon'] = "unknown.png"
+ end
+ if data_table['background'] == nil or data_table['background'] == "" then
+ data_table['background'] = "bg_default.png"
end
+ if data_table['custom_announce'] == nil or data_table['custom_announce'] == "" then
+ data_table['custom_announce'] = "Achievement Unlocked:"
+ end
+
awards['def'][name] = data_table
end