Remove formspec notification

This commit is contained in:
rubenwardy 2018-04-04 15:46:11 +01:00
parent 2c4da0b88a
commit dd2a5d2d1f

17
api.lua

@ -241,14 +241,6 @@ function awards.unlock(name, award)
-- Explicit check for nil because sound could be `false` to disable it -- Explicit check for nil because sound could be `false` to disable it
sound = {name="awards_got_generic", gain=0.25} sound = {name="awards_got_generic", gain=0.25}
end end
local custom_announce = awdef.custom_announce
if not custom_announce then
if awdef.secret then
custom_announce = S("Secret Achievement Unlocked:")
else
custom_announce = S("Achievement Unlocked:")
end
end
-- Do Notification -- Do Notification
if sound then if sound then
@ -260,14 +252,7 @@ function awards.unlock(name, award)
end end
end end
if awards.show_mode == "formspec" then if awards.show_mode == "chat" then
-- use a formspec to send it
minetest.show_formspec(name, "achievements:unlocked", "size[6,2]"..
"image_button_exit[0,0;6,2;"..background..";close1; ]"..
"image_button_exit[0.2,0.8;1,1;"..icon..";close2; ]"..
"label[1.1,1;"..title.."]"..
"label[0.3,0.1;"..custom_announce.."]")
elseif awards.show_mode == "chat" then
local chat_announce local chat_announce
if awdef.secret == true then if awdef.secret == true then
chat_announce = S("Secret Achievement Unlocked: %s") chat_announce = S("Secret Achievement Unlocked: %s")