Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2021-04-08 13:32:05 +02:00
commit e2fdcc4fb2
13 changed files with 43 additions and 4 deletions

View File

@ -19,6 +19,6 @@ read_globals = {
-- mods
"default", "mesecon", "digiline",
"screwdriver"
"screwdriver", "unified_inventory"
}

View File

@ -426,6 +426,7 @@ minetest.register_node("pipeworks:autocrafter", {
},
},
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:autocrafter"
minetest.register_craft( {
output = "pipeworks:autocrafter 2",

View File

@ -28,6 +28,7 @@ minetest.register_node("pipeworks:steel_block_embedded_tube", {
after_dig_node = pipeworks.after_dig,
on_rotate = pipeworks.on_rotate,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:steel_block_embedded_tube"
minetest.register_craft( {
output = "pipeworks:steel_block_embedded_tube 1",
@ -81,6 +82,7 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", {
after_dig_node = pipeworks.after_dig,
on_rotate = pipeworks.on_rotate,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:steel_pane_embedded_tube"
minetest.register_craft( {
output = "pipeworks:steel_pane_embedded_tube 1",

View File

@ -222,6 +222,8 @@ for s in ipairs(states) do
new_flow_logic_register.directional_horizonal_rotate(nodename_valve_empty, true)
end
end
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:pump_off"
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:valve_off_empty"
local nodename_valve_loaded = "pipeworks:valve_on_loaded"
minetest.register_node(nodename_valve_loaded, {
@ -301,6 +303,7 @@ minetest.register_node("pipeworks:grating", {
end,
on_rotate = false
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:grating"
-- outlet spigot
@ -378,6 +381,8 @@ minetest.register_node(nodename_spigot_loaded, {
drop = "pipeworks:spigot",
on_rotate = pipeworks.fix_after_rotation
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:spigot"
-- new flow logic does not currently distinguish between these two visual states.
-- register both so existing flowing spigots continue to work (even if the visual doesn't match the spigot's behaviour).
new_flow_logic_register.directional_horizonal_rotate(nodename_spigot_empty, false)
@ -441,6 +446,9 @@ minetest.register_node(nodename_panel_loaded, {
drop = "pipeworks:entry_panel_empty",
on_rotate = pipeworks.fix_after_rotation
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:entry_panel_empty"
-- TODO: AFAIK the two panels have no visual difference, so are redundant under new flow logic - alias?
new_flow_logic_register.directional_horizonal_rotate(nodename_panel_empty, true)
new_flow_logic_register.directional_horizonal_rotate(nodename_panel_loaded, true)
@ -525,6 +533,8 @@ minetest.register_node(nodename_sensor_loaded, {
mesecons = pipereceptor_on,
on_rotate = pipeworks.fix_after_rotation
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:flow_sensor_empty"
new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_empty, true)
new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_loaded, true)
-- activate flow sensor at roughly half the pressure pumps drive pipes
@ -603,6 +613,7 @@ for fill = 0, 10 do
on_rotate = false
})
end
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:storage_tank_0"
-- fountainhead
@ -639,6 +650,7 @@ minetest.register_node(nodename_fountain_empty, {
},
on_rotate = false
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:fountainhead"
local nodename_fountain_loaded = "pipeworks:fountainhead_pouring"
minetest.register_node(nodename_fountain_loaded, {
@ -734,6 +746,7 @@ minetest.register_node(nodename_sp_loaded, {
check_for_pole = pipeworks.check_for_vert_pipe,
check_for_horiz_pole = pipeworks.check_for_horiz_pipe
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:straight_pipe_empty"
new_flow_logic_register.directional_horizonal_rotate(nodename_sp_empty, true)
new_flow_logic_register.directional_horizonal_rotate(nodename_sp_loaded, true)

View File

@ -479,6 +479,7 @@ for _, data in ipairs({
minetest.register_node("pipeworks:"..data.name, node)
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:"..data.name
end
minetest.register_craft( {

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

View File

@ -981,6 +981,8 @@ end
end
end
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = BASENAME.."000000"
------------------------------------
-- Overheated Lua controlled Tube --
------------------------------------

View File

@ -1,5 +1,5 @@
name = pipeworks
description = This mod uses mesh nodes and nodeboxes to supply a complete set of 3D pipes and tubes, along with devices that work with them.
depends = default, basic_materials, screwdriver
optional_depends = mesecons, mesecons_mvps, digilines, signs_lib
optional_depends = mesecons, mesecons_mvps, digilines, signs_lib, unified_inventory
min_minetest_version = 5.2.0

View File

@ -133,7 +133,7 @@ for index, connects in ipairs(cconnects) do
new_flow_logic_register.simple(emptypipe)
new_flow_logic_register.simple(fullpipe)
end
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:pipe_1_empty"
if REGISTER_COMPATIBILITY then

View File

@ -192,6 +192,7 @@ if pipeworks.enable_one_way_tube then
check_for_pole = pipeworks.check_for_vert_tube,
check_for_horiz_pole = pipeworks.check_for_horiz_tube
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:one_way_tube"
minetest.register_craft({
output = "pipeworks:one_way_tube 2",
recipe = {

View File

@ -40,6 +40,7 @@ minetest.register_node("pipeworks:trashcan", {
minetest.get_meta(pos):get_inventory():set_stack(listname, index, ItemStack(""))
end,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:trashcan"
minetest.register_craft({
output = "pipeworks:trashcan",

View File

@ -200,6 +200,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv,
end
end
end
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = name.."_000000"
else
-- 6d tubes: uses only 10 nodes instead of 64, but the textures must be rotated
local cconnects = {{}, {1}, {1, 2}, {1, 3}, {1, 3, 5}, {1, 2, 3}, {1, 2, 3, 5}, {1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6}}
@ -222,6 +223,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv,
tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}},
drop = name.."_1",
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = name.."_1"
table.insert(tubenodes, cname)
for xm = 0, 1 do
for xp = 0, 1 do

View File

@ -7,7 +7,7 @@ end
local function set_wielder_formspec(data, meta)
meta:set_string("formspec",
"invsize[8,"..(6+data.wield_inv_height)..";]"..
"size[8,"..(6+data.wield_inv_height)..";]"..
"item_image[0,0;1,1;"..data.name_base.."_off]"..
"label[1,0;"..minetest.formspec_escape(data.description).."]"..
"list[current_name;"..minetest.formspec_escape(data.wield_inv_name)..";"..((8-data.wield_inv_width)*0.5)..",1;"..data.wield_inv_width..","..data.wield_inv_height..";]"..
@ -371,6 +371,7 @@ if pipeworks.enable_node_breaker then
eject_drops = true,
}
register_wielder(data)
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:nodebreaker_off"
minetest.register_craft({
output = "pipeworks:nodebreaker_off",
recipe = {
@ -422,6 +423,7 @@ if pipeworks.enable_deployer then
end,
eject_drops = false,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:deployer_off"
minetest.register_craft({
output = "pipeworks:deployer_off",
recipe = {
@ -457,6 +459,7 @@ if pipeworks.enable_dispenser then
end,
eject_drops = false,
})
pipeworks.ui_cat_tube_list[#pipeworks.ui_cat_tube_list+1] = "pipeworks:dispenser_off"
minetest.register_craft({
output = "pipeworks:dispenser_off",
recipe = {