From 7f156db0df8a77793635a32db5aee474a5c26eea Mon Sep 17 00:00:00 2001 From: rubenwardy <rw@rubenwardy.com> Date: Wed, 4 Apr 2018 23:01:50 +0100 Subject: Add check for nyancat mod before registering the award Fixes #44 --- gui.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gui.lua') diff --git a/gui.lua b/gui.lua index a6d6147..35fde59 100644 --- a/gui.lua +++ b/gui.lua @@ -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 -- cgit v1.2.3