summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-09-28 18:15:37 -0400
committerShadowNinja <noreply@gmail.com>2013-09-28 18:15:37 -0400
commitf974fd8c2c8532179edea54643fb10fa4091f322 (patch)
tree8c70a55274d7f97b6fd9effe5227bef015e0a8e0 /init.lua
parente3d391d63f8d6409bdded5c80fe1f5f2de442595 (diff)
Update
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua43
1 files changed, 37 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index cc170a0..3f26fef 100644
--- a/init.lua
+++ b/init.lua
@@ -1,11 +1,42 @@
--- Unified Inventory mod 0.4.6
+-- Unified Inventory for Minetest 0.4.8+
--- disable default creative inventory
+local modpath = minetest.get_modpath(minetest.get_current_modname())
+local worldpath = minetest.get_worldpath()
+
+-- Data tables definitions
+unified_inventory = {}
+unified_inventory.activefilter = {}
+unified_inventory.alternate = {}
+unified_inventory.current_page = {}
+unified_inventory.current_index = {}
+unified_inventory.current_item = {}
+unified_inventory.crafts_table = {}
+unified_inventory.crafts_table_count = 0
+unified_inventory.players = {}
+unified_inventory.items_list_size = 0
+unified_inventory.items_list = {}
+unified_inventory.filtered_items_list_size = {}
+unified_inventory.filtered_items_list = {}
+unified_inventory.pages = {}
+unified_inventory.buttons = {}
+
+-- Homepos stuff
+unified_inventory.home_pos = {}
+unified_inventory.home_filename =
+ worldpath.."/unified_inventory_home.home"
+
+-- Default inventory page
+unified_inventory.default = "craft"
+
+-- Disable default creative inventory
if creative_inventory then
- creative_inventory.set_creative_formspec = function(player, start_i, pagenum)
- return
+ function creative_inventory.set_creative_formspec(player, start_i, pagenum)
+ return
end
end
-dofile(minetest.get_modpath("unified_inventory").."/api.lua")
-dofile(minetest.get_modpath("unified_inventory").."/bags.lua")
+dofile(modpath.."/api.lua")
+dofile(modpath.."/internal.lua")
+dofile(modpath.."/callbacks.lua")
+dofile(modpath.."/register.lua")
+dofile(modpath.."/bags.lua")