1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-11-19 02:55:31 +01:00

add support for Unified Inventory categories

This commit is contained in:
Vanessa Dannenberg
2021-04-02 15:48:28 -04:00
parent a6e4f2dceb
commit fc6efb450c
12 changed files with 41 additions and 2 deletions

View File

@@ -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!")