summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebdesigner97 <Christian_D_97@gmx.de>2014-04-23 17:49:07 +0200
committerwebdesigner97 <Christian_D_97@gmx.de>2014-04-23 17:49:07 +0200
commit816ad225c90f35dd2bbbad5f9e710103c035c577 (patch)
treec01c6ed4e0b7574e6c85739c0fe42e78a9c215c1
parent6bfe4a16d309d3db5d3b27e92c7272cf949d64ff (diff)
downloadroads-816ad225c90f35dd2bbbad5f9e710103c035c577.tar
roads-816ad225c90f35dd2bbbad5f9e710103c035c577.tar.gz
roads-816ad225c90f35dd2bbbad5f9e710103c035c577.tar.bz2
roads-816ad225c90f35dd2bbbad5f9e710103c035c577.tar.xz
roads-816ad225c90f35dd2bbbad5f9e710103c035c577.zip
fancy inv
-rw-r--r--roadsigns/workshop.lua16
-rw-r--r--streetsmod/init.lua29
2 files changed, 33 insertions, 12 deletions
diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua
index 08b94f2..272285c 100644
--- a/roadsigns/workshop.lua
+++ b/roadsigns/workshop.lua
@@ -16,7 +16,12 @@ local forms = {
"list[context;streets:signworkshop_select;6,1;1,1]",
"label[5.8,2.5;"..S("Output:").."]",
"list[context;streets:signworkshop_output;6,3;1,1]",
- "list[current_player;main;2,6;8,4]",
+ "list[current_player;main;2,6;8,1]",
+ "list[current_player;main;2,7.25;8,3;8]",
+ gui_bg,
+ gui_bg_img,
+ gui_slots,
+ default.get_hotbar_bg(2, 6)
},
active = {
"size[12,10]",
@@ -31,8 +36,13 @@ local forms = {
"list[context;streets:signworkshop_select;6,1;1,1]",
"label[5.8,2.5;"..S("Output:").."]",
"list[context;streets:signworkshop_output;6,3;1,1]",
- "list[current_player;main;2,6;8,4]"
- --
+ "list[current_player;main;2,6;8,1]",
+ "list[current_player;main;2,7.25;8,3;8]",
+ gui_bg,
+ gui_bg_img,
+ gui_slots,
+ default.get_hotbar_bg(2, 6),
+ --
}
}
minetest.register_node(":streets:signworkshop",{
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