init.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. -- Unified Inventory for Minetest 0.4.8+
  2. local modpath = minetest.get_modpath(minetest.get_current_modname())
  3. local worldpath = minetest.get_worldpath()
  4. -- Data tables definitions
  5. unified_inventory = {}
  6. unified_inventory.activefilter = {}
  7. unified_inventory.alternate = {}
  8. unified_inventory.current_page = {}
  9. unified_inventory.current_index = {}
  10. unified_inventory.current_item = {}
  11. unified_inventory.crafts_table = {}
  12. unified_inventory.crafts_table_count = 0
  13. unified_inventory.players = {}
  14. unified_inventory.items_list_size = 0
  15. unified_inventory.items_list = {}
  16. unified_inventory.filtered_items_list_size = {}
  17. unified_inventory.filtered_items_list = {}
  18. unified_inventory.pages = {}
  19. unified_inventory.buttons = {}
  20. -- Homepos stuff
  21. unified_inventory.home_pos = {}
  22. unified_inventory.home_filename =
  23. worldpath.."/unified_inventory_home.home"
  24. -- Default inventory page
  25. unified_inventory.default = "craft"
  26. -- Disable default creative inventory
  27. if creative_inventory then
  28. function creative_inventory.set_creative_formspec(player, start_i, pagenum)
  29. return
  30. end
  31. end
  32. dofile(modpath.."/datastorage.lua")
  33. dofile(modpath.."/api.lua")
  34. dofile(modpath.."/internal.lua")
  35. dofile(modpath.."/callbacks.lua")
  36. dofile(modpath.."/register.lua")
  37. dofile(modpath.."/bags.lua")
  38. dofile(modpath.."/waypoints.lua")