2013-09-29 00:15:37 +02:00
|
|
|
-- Unified Inventory for Minetest 0.4.8+
|
2013-09-21 21:40:20 +02:00
|
|
|
|
2013-09-29 00:15:37 +02:00
|
|
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local worldpath = minetest.get_worldpath()
|
|
|
|
|
|
|
|
-- Data tables definitions
|
|
|
|
unified_inventory = {}
|
|
|
|
unified_inventory.activefilter = {}
|
2014-06-13 16:04:20 +02:00
|
|
|
unified_inventory.active_search_direction = {}
|
2013-09-29 00:15:37 +02:00
|
|
|
unified_inventory.alternate = {}
|
|
|
|
unified_inventory.current_page = {}
|
2014-04-29 20:36:52 +02:00
|
|
|
unified_inventory.current_searchbox = {}
|
2013-09-29 00:15:37 +02:00
|
|
|
unified_inventory.current_index = {}
|
|
|
|
unified_inventory.current_item = {}
|
2014-06-13 16:04:20 +02:00
|
|
|
unified_inventory.current_craft_direction = {}
|
2014-04-30 01:11:10 +02:00
|
|
|
unified_inventory.registered_craft_types = {}
|
2014-06-13 16:04:20 +02:00
|
|
|
unified_inventory.crafts_for = { usage = {}, recipe = {} }
|
2013-09-29 00:15:37 +02:00
|
|
|
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"
|
2014-01-19 19:27:52 +01:00
|
|
|
|
2013-09-29 00:15:37 +02:00
|
|
|
-- Default inventory page
|
|
|
|
unified_inventory.default = "craft"
|
|
|
|
|
|
|
|
-- Disable default creative inventory
|
2014-01-19 19:27:52 +01:00
|
|
|
if creative_inventory then
|
2013-09-29 00:15:37 +02:00
|
|
|
function creative_inventory.set_creative_formspec(player, start_i, pagenum)
|
|
|
|
return
|
2013-09-21 21:40:20 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-05-05 09:39:03 +02:00
|
|
|
dofile(modpath.."/datastorage.lua")
|
2014-05-12 04:00:32 +02:00
|
|
|
dofile(modpath.."/group.lua")
|
2013-09-29 00:15:37 +02:00
|
|
|
dofile(modpath.."/api.lua")
|
|
|
|
dofile(modpath.."/internal.lua")
|
|
|
|
dofile(modpath.."/callbacks.lua")
|
|
|
|
dofile(modpath.."/register.lua")
|
|
|
|
dofile(modpath.."/bags.lua")
|
2014-05-26 05:41:40 +02:00
|
|
|
dofile(modpath.."/item_names.lua")
|
2014-05-05 09:39:03 +02:00
|
|
|
dofile(modpath.."/waypoints.lua")
|