mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-06-29 14:50:41 +02:00
add support for Unified Inventory categories
This commit is contained in:
13
init.lua
13
init.lua
@ -5,6 +5,7 @@
|
||||
--
|
||||
|
||||
pipeworks = {}
|
||||
pipeworks.ui_cat_tube_list = {}
|
||||
|
||||
pipeworks.worldpath = minetest.get_worldpath()
|
||||
pipeworks.modpath = minetest.get_modpath("pipeworks")
|
||||
@ -148,4 +149,16 @@ end
|
||||
|
||||
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
|
||||
|
||||
-- Unified Inventory categories integration
|
||||
|
||||
if unified_inventory and unified_inventory.registered_categories then
|
||||
if not unified_inventory.registered_categories["automation"] then
|
||||
unified_inventory.register_category("automation", {
|
||||
symbol = "pipeworks:lua_tube000000",
|
||||
label = "Automation components"
|
||||
})
|
||||
end
|
||||
unified_inventory.add_category_items("automation", pipeworks.ui_cat_tube_list)
|
||||
end
|
||||
|
||||
minetest.log("info", "Pipeworks loaded!")
|
||||
|
Reference in New Issue
Block a user