diff --git a/autocrafter.lua b/autocrafter.lua index cc7a86e..bd9a669 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -57,6 +57,7 @@ local function get_matching_craft(output_name, example_recipe) end if best_score < score then best_index = i + best_score = score end end @@ -432,6 +433,7 @@ minetest.register_node("pipeworks:autocrafter", { drawtype = "normal", tiles = {"pipeworks_autocrafter.png"}, groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1, dig_generic = 1, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, tube = {insert_object = function(pos, node, stack, direction) local meta = minetest.get_meta(pos) diff --git a/changelog.txt b/changelog.txt index 59ea40d..76a1755 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,11 @@ Changelog +2024-02-26 (SwissalpS) +set is_ground_content to false for various nodes. + + + 2023-06-22 (SwissalpS, rubenwardy) groups support in recipe. Set recipe as usual via recipe formspec or digilines. Autocrafter now resolves matching recipe using groups so that items in input diff --git a/devices.lua b/devices.lua index 5384b7d..9d0a2a1 100644 --- a/devices.lua +++ b/devices.lua @@ -148,6 +148,7 @@ for s in ipairs(states) do paramtype = "light", paramtype2 = "facedir", groups = dgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -203,6 +204,7 @@ for s in ipairs(states) do fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 } }, groups = dgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -254,10 +256,11 @@ minetest.register_node(nodename_valve_loaded, { fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 } }, groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -307,10 +310,11 @@ minetest.register_node("pipeworks:grating", { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, pipe_connections = { top = 1 }, after_place_node = function(pos) @@ -335,10 +339,11 @@ minetest.register_node(nodename_spigot_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, pipe_connections = { left=1, right=1, front=1, back=1, left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 }, @@ -373,10 +378,11 @@ minetest.register_node(nodename_spigot_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, pipe_connections = { left=1, right=1, front=1, back=1, left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 }, @@ -432,10 +438,11 @@ minetest.register_node(nodename_panel_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -455,10 +462,11 @@ minetest.register_node(nodename_panel_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -488,10 +496,11 @@ minetest.register_node(nodename_sensor_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -530,10 +539,11 @@ minetest.register_node(nodename_sensor_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -600,6 +610,7 @@ for fill = 0, 10 do paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -631,6 +642,7 @@ for fill = 0, 10 do paramtype = "light", paramtype2 = "facedir", groups = sgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -661,10 +673,11 @@ minetest.register_node(nodename_fountain_empty, { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, pipe_connections = { bottom = 1 }, after_place_node = function(pos) @@ -699,10 +712,11 @@ minetest.register_node(nodename_fountain_loaded, { sunlight_propagates = true, paramtype = "light", groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, pipe_connections = { bottom = 1 }, after_place_node = function(pos) @@ -752,10 +766,11 @@ minetest.register_node(nodename_sp_empty, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) @@ -777,10 +792,11 @@ minetest.register_node(nodename_sp_loaded, { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { - key = "node_sound_metal_defaults", - }, + key = "node_sound_metal_defaults", + }, walkable = true, on_place = pipeworks.rotate_on_place, after_dig_node = function(pos) diff --git a/filter-injector.lua b/filter-injector.lua index 9b58b4c..f8479f7 100644 --- a/filter-injector.lua +++ b/filter-injector.lua @@ -410,6 +410,7 @@ for _, data in ipairs({ }, paramtype2 = "facedir", groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, legacy_facedir_simple = true, _sound_def = { diff --git a/legacy.lua b/legacy.lua index fdaa0de..743d6f1 100644 --- a/legacy.lua +++ b/legacy.lua @@ -24,7 +24,7 @@ if not minetest.get_modpath("auto_tree_tap") and description = S("Auto-Tap"), tiles = {"pipeworks_nodebreaker_top_off.png","pipeworks_nodebreaker_bottom_off.png","pipeworks_nodebreaker_side2_off.png","pipeworks_nodebreaker_side1_off.png", "pipeworks_nodebreaker_back.png","pipeworks_nodebreaker_front_off.png"}, - is_ground_content = true, + is_ground_content = false, paramtype2 = "facedir", groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1, not_in_creative_inventory=1, axey=1, handy=1, pickaxey=1}, _mcl_hardness=0.8, diff --git a/pipes.lua b/pipes.lua index 8b9f01b..45d5b8f 100644 --- a/pipes.lua +++ b/pipes.lua @@ -76,6 +76,7 @@ for index, connects in ipairs(cconnects) do fixed = outsel }, groups = pgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -113,6 +114,7 @@ for index, connects in ipairs(cconnects) do fixed = outsel }, groups = pgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_metal_defaults", @@ -151,6 +153,7 @@ if REGISTER_COMPATIBILITY then paramtype = "light", description = S("Pipe Segment (legacy)"), groups = {not_in_creative_inventory = 1, pipe_to_update = 1}, + is_ground_content = false, drop = "pipeworks:pipe_1_empty", after_place_node = function(pos) pipeworks.scan_for_pipe_objects(pos) @@ -163,6 +166,7 @@ if REGISTER_COMPATIBILITY then sunlight_propagates = true, paramtype = "light", groups = {not_in_creative_inventory = 1, pipe_to_update = 1}, + is_ground_content = false, drop = "pipeworks:pipe_1_empty", after_place_node = function(pos) pipeworks.scan_for_pipe_objects(pos) diff --git a/trashcan.lua b/trashcan.lua index 29a4d08..c8ae9b2 100644 --- a/trashcan.lua +++ b/trashcan.lua @@ -11,6 +11,7 @@ minetest.register_node("pipeworks:trashcan", { "pipeworks_trashcan_side.png", }, groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1, dig_generic = 4, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, tube = { insert_object = function(pos, node, stack, direction) diff --git a/tubes/embedded_tube.lua b/tubes/embedded_tube.lua index cc4c259..05e0672 100644 --- a/tubes/embedded_tube.lua +++ b/tubes/embedded_tube.lua @@ -27,6 +27,7 @@ function pipeworks.register_embedded_tube(nodename, opts) pickaxey=1, handy=1 }, + is_ground_content = false, _mcl_hardness = 0.8, legacy_facedir_simple = true, _sound_def = { diff --git a/tubes/pane_embedded_tube.lua b/tubes/pane_embedded_tube.lua index b52aa58..4bc1e83 100644 --- a/tubes/pane_embedded_tube.lua +++ b/tubes/pane_embedded_tube.lua @@ -31,11 +31,12 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", { paramtype = "light", paramtype2 = "facedir", groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1, dig_glass = 2, pickaxey=1, handy=1}, + is_ground_content = false, _mcl_hardness=0.8, legacy_facedir_simple = true, _sound_def = { - key = "node_sound_stone_defaults", - }, + key = "node_sound_stone_defaults", + }, tube = { connect_sides = {front = 1, back = 1,}, priority = 50, diff --git a/tubes/registration.lua b/tubes/registration.lua index b837cb8..14a5df5 100644 --- a/tubes/registration.lua +++ b/tubes/registration.lua @@ -106,6 +106,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e fixed = outboxes }, groups = tgroups, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_wood_defaults", @@ -227,6 +228,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv, description = S("Pneumatic tube segment (legacy)"), after_place_node = pipeworks.after_place, groups = {not_in_creative_inventory = 1, tube_to_update = 1, tube = 1}, + is_ground_content = false, tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}}, drop = name.."_1", }) diff --git a/tubes/routing.lua b/tubes/routing.lua index ae84e7d..e0a90aa 100644 --- a/tubes/routing.lua +++ b/tubes/routing.lua @@ -50,6 +50,7 @@ pipeworks.register_tube("pipeworks:broken_tube", { node_def = { drop = "pipeworks:tube_1", groups = {not_in_creative_inventory = 1, tubedevice_receiver = 1}, + is_ground_content = false, tube = { insert_object = function(pos, node, stack, direction) minetest.item_drop(stack, nil, pos) @@ -179,6 +180,7 @@ if pipeworks.enable_one_way_tube then node_box = {type = "fixed", fixed = {{-1/2, -9/64, -9/64, 1/2, 9/64, 9/64}}}, groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, axey=1, handy=1, pickaxey=1}, + is_ground_content = false, _mcl_hardness=0.8, _sound_def = { key = "node_sound_wood_defaults",