Add check for nyancat mod before registering the award

Fixes #44
This commit is contained in:
rubenwardy
2018-04-04 23:01:50 +01:00
parent 0017a174bd
commit 7f156db0df
4 changed files with 23 additions and 17 deletions

View File

@ -39,10 +39,13 @@ function awards.get_formspec(name, to, sid)
local def = awards.registered_awards[item.name]
if def and def.secret and not item.got then
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret Award)")).."]"..
"image[1,0;3,3;awards_unknown.png]"
formspec = formspec .. "label[1,2.75;"..
minetest.formspec_escape(S("(Secret Award)")).."]"..
"image[1,0;3,3;awards_unknown.png]"
if def and def.description then
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Unlock this award to find out what it is."))..";]"
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..
minetest.formspec_escape(
S("Unlock this award to find out what it is."))..";]"
end
else
local title = item.name