1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2024-12-28 03:30:40 +01:00

Move icon/bg/cstm_announce check to correct place

This commit is contained in:
Andrew Ward 2013-02-26 14:32:16 +00:00
parent f9ec33fb1b
commit 647e7b8969

22
api.lua
View File

@ -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