add "filling" craft type for unified_inventory

This commit is contained in:
OgelGames 2022-01-22 15:21:48 +11:00
parent a75119f848
commit 356ffc2c94
4 changed files with 56 additions and 15 deletions

View File

@ -11,5 +11,6 @@ read_globals = {
"VoxelArea",
-- Deps
"default", "monitoring", "advtrains"
"default", "monitoring", "advtrains",
"unified_inventory",
}

View File

@ -1,8 +1,20 @@
minetest.register_craftitem("vacuum:air_bottle", {
description = "Air Bottle",
inventory_image = vacuum.air_bottle_image
})
if minetest.get_modpath("unified_inventory") then
unified_inventory.register_craft_type("filling", {
description = "Filling",
icon = "vacuum_airpump_front.png",
width = 1,
height = 1,
})
unified_inventory.register_craft({
type = "filling",
output = "vacuum:air_bottle",
items = {"vessels:steel_bottle"},
width = 0,
})
end

View File

@ -1,4 +1,4 @@
name = vacuum
description = Adds vacuum with propagation, air bottles, and an airpump for pumping out vacuum
depends = default, vessels
optional_depends = doors, wool, mesecons, pipeworks, monitoring, mesecons_random, technic, spacesuit, digilines, advtrains
optional_depends = doors, wool, mesecons, pipeworks, monitoring, mesecons_random, technic, spacesuit, digilines, advtrains, unified_inventory

View File

@ -1,3 +1,4 @@
-- spacesuit repair recipes
local function repair_recipe(partname)
minetest.register_craft({
@ -17,3 +18,30 @@ repair_recipe("spacesuit:helmet")
repair_recipe("spacesuit:chestplate")
repair_recipe("spacesuit:pants")
repair_recipe("spacesuit:boots")
if minetest.get_modpath("unified_inventory") then
unified_inventory.register_craft({
type = "filling",
output = "spacesuit:helmet 1 1",
items = {"spacesuit:helmet 1 60000"},
width = 0,
})
unified_inventory.register_craft({
type = "filling",
output = "spacesuit:chestplate 1 1",
items = {"spacesuit:chestplate 1 60000"},
width = 0,
})
unified_inventory.register_craft({
type = "filling",
output = "spacesuit:pants 1 1",
items = {"spacesuit:pants 1 60000"},
width = 0,
})
unified_inventory.register_craft({
type = "filling",
output = "spacesuit:boots 1 1",
items = {"spacesuit:boots 1 60000"},
width = 0,
})
end