summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2016-11-06 12:05:13 +0100
committerrubenwardy <rubenwardy@gmail.com>2016-11-06 11:05:13 +0000
commit43da09620ed84f13e86b958e52b5c478f01f5227 (patch)
tree239862c3b926881c4f3a9e0bc685a33b0af0dfa6 /api.lua
parentae01ea01dd80ae40a8289e57908586ec70bfa5b6 (diff)
Fix bugs when mod is run outside of Minetest Game (#34)
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index 7d921e1..916441e 100644
--- a/api.lua
+++ b/api.lua
@@ -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