Fix bugs when mod is run outside of Minetest Game (#34)

This commit is contained in:
Wuzzy
2016-11-06 12:05:13 +01:00
committed by rubenwardy
parent ae01ea01dd
commit 43da09620e
2 changed files with 17 additions and 11 deletions

View File

@ -463,9 +463,13 @@ function awards.show_to(name, to, sid, text)
if sid == nil or sid < 1 then
sid = 1
end
local deco = ""
if minetest.global_exists("default") then
deco = default.gui_bg .. default.gui_bg_img
end
-- Show formspec to user
minetest.show_formspec(to,"awards:awards",
"size[11,5]" .. default.gui_bg .. default.gui_bg_img ..
"size[11,5]" .. deco ..
awards.getFormspec(name, to, sid))
end
end