From 816ad225c90f35dd2bbbad5f9e710103c035c577 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Wed, 23 Apr 2014 17:49:07 +0200 Subject: fancy inv --- streetsmod/init.lua | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'streetsmod') diff --git a/streetsmod/init.lua b/streetsmod/init.lua index 80a6ae0..fd43645 100644 --- a/streetsmod/init.lua +++ b/streetsmod/init.lua @@ -5,7 +5,17 @@ Forum : http://bit.ly/12cPMeo Depends : default ]] --- Create variables and tables +-- kaeza: intllib + -- Boilerplate to support localized strings if intllib mod is installed. + --local S + if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) + else + S = function ( s ) return s end + end + +-- Create variable and tables print("Streets: " .. S("Creating variables and tables...")) streets = {} streets.version = "1.4.4dev" @@ -16,15 +26,16 @@ fin = 0 } streets.forms = {} - --- kaeza: intllib - -- Boilerplate to support localized strings if intllib mod is installed. - -- local S - if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) + +-- Support for mimnetest_next's fancy inventories + if gui_bg and gui_bg_img and gui_slots and type(default.get_hotbar_bg) == "function" then + -- Everything fine :) + -- minetest_next rules! :P else - S = function ( s ) return s end + gui_bg = "" + gui_bg_img = "" + gui_slots = "" + default.get_hotbar_bg = function() return "" end end -- rubenwardy: smartfs -- cgit v1.2.3