diff --git a/chest.lua b/chest.lua index 2935a35..48b0a1b 100644 --- a/chest.lua +++ b/chest.lua @@ -1,16 +1,17 @@ +local has_default = minetest.get_modpath("default") --chest code from default(Copyright (C) 2012 celeron55, Perttu Ahola ) local chest_formspec = "size[8,9]" .. - default.gui_bg .. - default.gui_bg_img .. - default.gui_slots .. + (has_default and default.gui_bg or "") .. + (has_default and default.gui_bg_img or "") .. + (has_default and default.gui_slots or "") .. "list[current_name;main;0,0.3;8,4;]" .. "list[current_player;main;0,4.85;8,1;]" .. "list[current_player;main;0,6.08;8,3;8]" .. "listring[current_name;main]" .. "listring[current_player;main]" .. - default.get_hotbar_bg(0,4.85) + (has_default and default.get_hotbar_bg(0,4.85) or "") -- Helper functions local function drop_chest_stuff() diff --git a/init.lua b/init.lua index 4603e73..e1a672b 100644 --- a/init.lua +++ b/init.lua @@ -14,13 +14,13 @@ end dofile(MP.."/common.lua") if minetest.get_modpath("default") then - -- only load builder and chest if the default mod is available + -- only load builder if the default mod is available -- the formspecs depend on it dofile(MP.."/builder.lua") - dofile(MP.."/chest.lua") end dofile(MP.."/ambience.lua") +dofile(MP.."/chest.lua") dofile(MP.."/plants.lua") dofile(MP.."/models.lua") dofile(MP.."/nodes.lua")