summaryrefslogtreecommitdiff
path: root/unified_inventory/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 20:02:19 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:09:33 -0400
commitda66780a569712c23ae4f2996cfb4608a9f9d69d (patch)
tree217556029a78bc23ad4564720afc86de97228a04 /unified_inventory/init.lua
parent615b22df4d423aded3613db7716943a2f389b047 (diff)
downloaddreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'unified_inventory/init.lua')
-rw-r--r--unified_inventory/init.lua69
1 files changed, 69 insertions, 0 deletions
diff --git a/unified_inventory/init.lua b/unified_inventory/init.lua
new file mode 100644
index 0000000..b327ecd
--- /dev/null
+++ b/unified_inventory/init.lua
@@ -0,0 +1,69 @@
+-- Unified Inventory for Minetest 0.4.8+
+
+local modpath = minetest.get_modpath(minetest.get_current_modname())
+local worldpath = minetest.get_worldpath()
+
+-- Data tables definitions
+unified_inventory = {
+ activefilter = {},
+ active_search_direction = {},
+ alternate = {},
+ current_page = {},
+ current_searchbox = {},
+ current_index = {},
+ current_item = {},
+ current_craft_direction = {},
+ registered_craft_types = {},
+ crafts_for = {usage = {}, recipe = {} },
+ players = {},
+ items_list_size = 0,
+ items_list = {},
+ filtered_items_list_size = {},
+ filtered_items_list = {},
+ pages = {},
+ buttons = {},
+
+ -- Homepos stuff
+ home_pos = {},
+ home_filename = worldpath.."/unified_inventory_home.home",
+
+ -- Default inventory page
+ default = "craft",
+
+ -- intllib
+ gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
+
+ -- "Lite" mode
+ lite_mode = minetest.setting_getbool("unified_inventory_lite"),
+
+ pagecols = 8,
+ pagerows = 10,
+ page_y = 0,
+ formspec_y = 1,
+ main_button_x = 0,
+ main_button_y = 9,
+ craft_result_x = 0.3,
+ craft_result_y = 0.5,
+ form_header_y = 0
+}
+
+-- Disable default creative inventory
+if rawget(_G, "creative_inventory") then
+ function creative_inventory.set_creative_formspec(player, start_i, pagenum)
+ return
+ end
+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")
+
+dofile(modpath.."/item_names.lua")
+
+if minetest.get_modpath("datastorage") then
+ dofile(modpath.."/waypoints.lua")
+end
+