diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
commit | 2922421f4a88e56a0a1c819f62bf2bc287835388 (patch) | |
tree | b6dafb3d00ef05778e456716c03544279c2978fa /unified_inventory/init.lua | |
parent | 67d414d2f9aa5999e3f1755543a68455b4bb6d99 (diff) | |
download | dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.gz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.bz2 dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.xz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.zip |
Update several mods:
biome_lib, boost_cart, building_blocks, castle, homedecor, glooptest,
currency, roads, invsaw, maptools, mesecons, moreblocks, nixie_tubes,
pipeworks, signs_lib, technic, unified_inventory, unifiedbricks, worldedit,
xban2
Diffstat (limited to 'unified_inventory/init.lua')
-rw-r--r-- | unified_inventory/init.lua | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/unified_inventory/init.lua b/unified_inventory/init.lua index e24fff2..67bc56e 100644 --- a/unified_inventory/init.lua +++ b/unified_inventory/init.lua @@ -2,7 +2,15 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) local worldpath = minetest.get_worldpath() -local mygettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end +local mygettext +if rawget(_G, "intllib") then + mygettext = intllib.Getter() +else + function mygettext(s, ...) + local t = { ... } + return (s:gsub("@(%d+)", function(n) return t[tonumber(n)] end)) + end +end -- Data tables definitions unified_inventory = { @@ -33,7 +41,7 @@ unified_inventory = { -- intllib gettext = mygettext, - fgettext = function(s) return minetest.formspec_escape(mygettext(s)) end, + fgettext = function(...) return minetest.formspec_escape(mygettext(...)) end, -- "Lite" mode lite_mode = minetest.setting_getbool("unified_inventory_lite"), @@ -57,16 +65,24 @@ if creative then end end +-- Disable sfinv inventory +local sfinv = rawget(_G, "sfinv") +if sfinv then + sfinv.enabled = false +end + dofile(modpath.."/group.lua") dofile(modpath.."/api.lua") dofile(modpath.."/internal.lua") dofile(modpath.."/callbacks.lua") dofile(modpath.."/register.lua") -dofile(modpath.."/bags.lua") + +if minetest.setting_getbool("unified_inventory_bags") ~= false then + dofile(modpath.."/bags.lua") +end dofile(modpath.."/item_names.lua") if minetest.get_modpath("datastorage") then dofile(modpath.."/waypoints.lua") end - |