From 080551e64713b47f6bb5c94e2504489fb68aa5c7 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Fri, 1 Mar 2024 00:49:24 +0100 Subject: [PATCH] Is ground content (#64) see https://github.com/pandorabox-io/pandorabox.io/issues/836 --- building_blocks/node_stairs.lua | 32 ++++++++++++++++-------------- fake_fire/init.lua | 4 ++++ homedecor_common/registration.lua | 2 ++ homedecor_doors_and_gates/init.lua | 3 ++- homedecor_lighting/init.lua | 9 +++++++++ homedecor_misc/init.lua | 4 ++++ homedecor_roofing/init.lua | 6 ++++++ homedecor_seating/armchairs.lua | 1 + homedecor_seating/longsofas.lua | 1 + homedecor_seating/sofas.lua | 1 + homedecor_tables/coffeetable.lua | 1 + homedecor_tables/endtable.lua | 1 + homedecor_wardrobe/init.lua | 1 + itemframes/init.lua | 2 ++ lavalamp/init.lua | 2 ++ 15 files changed, 54 insertions(+), 16 deletions(-) diff --git a/building_blocks/node_stairs.lua b/building_blocks/node_stairs.lua index 8304632e..d45e21a8 100644 --- a/building_blocks/node_stairs.lua +++ b/building_blocks/node_stairs.lua @@ -13,6 +13,8 @@ local function building_blocks_stairs(nodename, def) def._mcl_hardness=1.6 end + def.is_ground_content = def.is_ground_content == true + minetest.register_node(nodename, def) if minetest.get_modpath("moreblocks") then local mod, name = nodename:match("(.*):(.*)") @@ -31,7 +33,7 @@ building_blocks_stairs("building_blocks:grate", { tiles = {"building_blocks_grate.png"}, paramtype = "light", sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, use_texture_alpha = "clip", groups = {cracky=1, dig_generic=3}, _sound_def = { @@ -44,7 +46,7 @@ building_blocks_stairs("building_blocks:smoothglass", { tiles = {"building_blocks_sglass.png"}, paramtype = "light", sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, use_texture_alpha = "clip", groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3}, _sound_def = { @@ -57,7 +59,7 @@ building_blocks_stairs("building_blocks:woodglass", { tiles = {"building_blocks_wglass.png"}, paramtype = "light", sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, use_texture_alpha = "clip", groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3}, _sound_def = { @@ -68,7 +70,7 @@ building_blocks_stairs("building_blocks:woodglass", { building_blocks_stairs("building_blocks:Adobe", { tiles = {"building_blocks_Adobe.png"}, description = S("Adobe"), - is_ground_content = true, + is_ground_content = false, groups = {crumbly=3, dig_stone=2}, _sound_def = { key = "node_sound_stone_defaults", @@ -81,7 +83,7 @@ end building_blocks_stairs("building_blocks:fakegrass", { tiles = grasstex, description = S("Fake Grass"), - is_ground_content = true, + is_ground_content = false, groups = {crumbly=3, dig_sand=3}, _sound_def = { key = "node_sound_dirt_defaults", @@ -89,7 +91,7 @@ building_blocks_stairs("building_blocks:fakegrass", { }) building_blocks_stairs("building_blocks:hardwood", { tiles = {"building_blocks_hardwood.png"}, - is_ground_content = true, + is_ground_content = false, description = S("Hardwood"), groups = {choppy=1,flammable=1, dig_tree=1}, _sound_def = { @@ -98,7 +100,7 @@ building_blocks_stairs("building_blocks:hardwood", { }) building_blocks_stairs("building_blocks:Roofing", { tiles = {"building_blocks_Roofing.png"}, - is_ground_content = true, + is_ground_content = false, description = S("Roof block"), groups = {snappy=3, dig_generic=4}, _sound_def = { @@ -108,7 +110,7 @@ building_blocks_stairs("building_blocks:Roofing", { building_blocks_stairs("building_blocks:Tar", { description = S("Tar"), tiles = {"building_blocks_tar.png"}, - is_ground_content = true, + is_ground_content = false, groups = {crumbly=1, tar_block = 1, dig_generic=4}, _sound_def = { key = "node_sound_stone_defaults", @@ -117,7 +119,7 @@ building_blocks_stairs("building_blocks:Tar", { building_blocks_stairs("building_blocks:Marble", { description = S("Marble"), tiles = {"building_blocks_marble.png"}, - is_ground_content = true, + is_ground_content = false, groups = {cracky=3, marble = 1, dig_stone=2}, _sound_def = { key = "node_sound_stone_defaults", @@ -139,7 +141,7 @@ minetest.register_node("building_blocks:brobble_spread", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {crumbly=3, dig_generic=4, handy=1}, _mcl_hardness=0.6 }) @@ -162,7 +164,7 @@ if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopbloc fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {crumbly=2, dig_generic=4, handy=1}, _mcl_hardness=0.6, _sound_def = { @@ -184,7 +186,7 @@ minetest.register_node("building_blocks:Tarmac_spread", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {cracky=3, dig_generic=4, pickaxey=5}, _mcl_hardness=1.6, _sound_def = { @@ -204,7 +206,7 @@ minetest.register_node("building_blocks:terrycloth_towel", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {crumbly=3, dig_generic=4, handy=1}, _mcl_hardness=0.6 }) @@ -228,7 +230,7 @@ minetest.register_node("building_blocks:BWtile", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {crumbly=3, dig_generic=4, handy=1}, _mcl_hardness=0.6 }) @@ -245,7 +247,7 @@ minetest.register_node("building_blocks:Fireplace", { paramtype2 = "facedir", light_source = minetest.LIGHT_MAX, sunlight_propagates = true, - is_ground_content = true, + is_ground_content = false, groups = {cracky=2, dig_generic=4, pickaxey=5}, _mcl_hardness=1.6, _sound_def = { diff --git a/fake_fire/init.lua b/fake_fire/init.lua index 39e15f56..20a26e87 100644 --- a/fake_fire/init.lua +++ b/fake_fire/init.lua @@ -146,6 +146,7 @@ minetest.register_node("fake_fire:ice_fire", { paramtype = "light", paramtype2 = "facedir", groups = {dig_immediate=3, not_in_creative_inventory=1, dig_generic=3, handy=1}, + is_ground_content = false, _mcl_hardness=0.6, sunlight_propagates = true, buildable_to = true, @@ -188,6 +189,7 @@ minetest.register_node("fake_fire:fancy_fire", { paramtype2 = "facedir", use_texture_alpha = "clip", groups = {oddly_breakable_by_hand=3, flammable=0, handy=1}, + is_ground_content = false, _mcl_hardness=0.6, sunlight_propagates = true, light_source = 13, @@ -234,6 +236,7 @@ minetest.register_node("fake_fire:embers", { }, light_source = 9, groups = {crumbly=3, dig_stone=2, handy=1}, + is_ground_content = false, _mcl_hardness=0.6, paramtype = "light", _sound_def = { @@ -266,6 +269,7 @@ for _, mat in ipairs(materials) do description = desc, tiles = {tex.."^chimney_top.png", tex}, groups = {snappy=3, dig_stone=2, handy=1}, + is_ground_content = false, _mcl_hardness=0.6, paramtype = "light", _sound_def = { diff --git a/homedecor_common/registration.lua b/homedecor_common/registration.lua index 16abc545..cb2b13cd 100644 --- a/homedecor_common/registration.lua +++ b/homedecor_common/registration.lua @@ -19,6 +19,8 @@ function homedecor.register(name, original_def) def._mcl_hardness=1.6 end + def.is_ground_content = def.is_ground_content == true + def.drawtype = def.drawtype or (def.mesh and "mesh") or (def.node_box and "nodebox") diff --git a/homedecor_doors_and_gates/init.lua b/homedecor_doors_and_gates/init.lua index 4d646c42..b18d7837 100644 --- a/homedecor_doors_and_gates/init.lua +++ b/homedecor_doors_and_gates/init.lua @@ -247,6 +247,7 @@ for i, g in ipairs(gate_list) do paramtype = "light", use_texture_alpha = "clip", groups = {snappy=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, sounds = default.node_sound_wood_defaults(), paramtype2 = "facedir", @@ -709,4 +710,4 @@ minetest.register_lbm({ end minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "doors:hidden"}) end -}) \ No newline at end of file +}) diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua index 03eca8a9..f3e4073a 100644 --- a/homedecor_lighting/init.lua +++ b/homedecor_lighting/init.lua @@ -276,6 +276,7 @@ for brightness_level = 0, 14 do }, node_box = glowlight_nodebox.half, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 }, + is_ground_content = false, _mcl_hardness=1.6, light_source = brightness_level, _sound_def = { @@ -345,6 +346,7 @@ for brightness_level = 0, 14 do }, node_box = glowlight_nodebox.quarter, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 }, + is_ground_content = false, _mcl_hardness=1.6, light_source = brightness_level, _sound_def = { @@ -415,6 +417,7 @@ for brightness_level = 0, 14 do }, node_box = glowlight_nodebox.small_cube, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1, axey=5 }, + is_ground_content = false, _mcl_hardness=1.6, light_source = brightness_level, _sound_def = { @@ -869,6 +872,7 @@ for _, light_brightn_name in ipairs({"off", "on"}) do "group:mesecon_conductor_craftable" }, groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_stone_defaults", @@ -918,6 +922,7 @@ for _, light_brightn_name in ipairs({"off", "on"}) do "group:mesecon_conductor_craftable" }, groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_stone_defaults", @@ -1133,6 +1138,7 @@ minetest.register_node(":homedecor:chain_steel_top", { paramtype = "light", inventory_image = "basic_materials_chain_steel_inv.png", groups = {cracky=3, dig_glass=1, pickaxey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = topchains_sbox, }) @@ -1148,6 +1154,7 @@ minetest.register_node(":homedecor:chain_brass_top", { paramtype = "light", inventory_image = "basic_materials_chain_brass_inv.png", groups = {cracky=3, dig_glass=1, pickaxey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = topchains_sbox, }) @@ -1176,6 +1183,7 @@ minetest.register_node(":homedecor:chandelier_steel", { mesh = "homedecor_chandelier.obj", use_texture_alpha = "clip", groups = {cracky=3, dig_glass=1, pickaxey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_stone_defaults", @@ -1206,6 +1214,7 @@ minetest.register_node(":homedecor:chandelier_brass", { mesh = "homedecor_chandelier.obj", use_texture_alpha = "clip", groups = {cracky=3, dig_glass=1, pickaxey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_stone_defaults", diff --git a/homedecor_misc/init.lua b/homedecor_misc/init.lua index ee4092e6..eef97490 100644 --- a/homedecor_misc/init.lua +++ b/homedecor_misc/init.lua @@ -637,6 +637,7 @@ minetest.register_node(":homedecor:tatami_mat", { drawtype = "nodebox", paramtype = "light", groups = {snappy=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, node_box = { type = "fixed", @@ -1037,6 +1038,7 @@ minetest.register_node(":homedecor:japanese_wall_top", { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = jp_cbox, collision_box = jp_cbox, @@ -1056,6 +1058,7 @@ minetest.register_node(":homedecor:japanese_wall_middle", { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = jp_cbox, collision_box = jp_cbox, @@ -1075,6 +1078,7 @@ minetest.register_node(":homedecor:japanese_wall_bottom", { paramtype = "light", paramtype2 = "facedir", groups = {snappy=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = jp_cbox, collision_box = jp_cbox, diff --git a/homedecor_roofing/init.lua b/homedecor_roofing/init.lua index 93a5738e..64f76383 100644 --- a/homedecor_roofing/init.lua +++ b/homedecor_roofing/init.lua @@ -9,6 +9,7 @@ minetest.register_node(":homedecor:skylight", { wield_image = homedecor.textures.glass, inventory_image = "homedecor_skylight_inv.png", groups = { snappy = 3, dig_tree = 2 , axey=5}, + is_ground_content = false, _mcl_hardness=1.6, paramtype = "light", _sound_def = { @@ -26,6 +27,7 @@ minetest.register_node(":homedecor:skylight_frosted", { inventory_image = "homedecor_skylight_frosted_inv.png", use_texture_alpha = "blend", groups = { snappy = 3, dig_tree = 2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, paramtype = "light", _sound_def = { @@ -45,6 +47,7 @@ for s, s_loc in pairs({ ["asphalt"] = S("asphalt"), ["terracotta"] = S("terracot paramtype = "light", walkable = false, groups = { snappy = 3, dig_tree = 2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", @@ -104,6 +107,7 @@ homedecor_roofing.register_outer_corner = function(modname, subname, groups, slo selection_box = ocorner_cbox, collision_box = ocorner_cbox, groups = groups, + is_ground_content = false, _mcl_hardness=1.6, on_place = minetest.rotate_node, _sound_def = { @@ -129,6 +133,7 @@ homedecor_roofing.register_inner_corner = function(modname, subname, groups, slo paramtype2 = "facedir", collision_box = icorner_cbox, groups = groups, + is_ground_content = false, _mcl_hardness=1.6, on_place = minetest.rotate_node, _sound_def = { @@ -156,6 +161,7 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups collision_box = slope_cbox, use_texture_alpha = "blend", groups = groups, + is_ground_content = false, _mcl_hardness=1.6, on_place = minetest.rotate_node, _sound_def = { diff --git a/homedecor_seating/armchairs.lua b/homedecor_seating/armchairs.lua index af5ab958..22c1c107 100644 --- a/homedecor_seating/armchairs.lua +++ b/homedecor_seating/armchairs.lua @@ -20,6 +20,7 @@ minetest.register_node(":lrfurn:armchair", { palette = "unifieddyes_palette_colorwallmounted.png", inventory_image = "lrfurn_armchair_inv.png", groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", diff --git a/homedecor_seating/longsofas.lua b/homedecor_seating/longsofas.lua index 35b3f4f8..e919ef92 100644 --- a/homedecor_seating/longsofas.lua +++ b/homedecor_seating/longsofas.lua @@ -19,6 +19,7 @@ minetest.register_node(":lrfurn:longsofa", { inventory_image = "lrfurn_longsofa_inv.png", wield_scale = { x = 0.6, y = 0.6, z = 0.6 }, groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", diff --git a/homedecor_seating/sofas.lua b/homedecor_seating/sofas.lua index b6e50eac..5ee43f61 100644 --- a/homedecor_seating/sofas.lua +++ b/homedecor_seating/sofas.lua @@ -19,6 +19,7 @@ minetest.register_node(":lrfurn:sofa", { inventory_image = "lrfurn_sofa_inv.png", wield_scale = { x = 0.6, y = 0.6, z = 0.6 }, groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", diff --git a/homedecor_tables/coffeetable.lua b/homedecor_tables/coffeetable.lua index 4db76c74..16af01e8 100644 --- a/homedecor_tables/coffeetable.lua +++ b/homedecor_tables/coffeetable.lua @@ -59,6 +59,7 @@ minetest.register_node(":lrfurn:coffeetable", { paramtype2 = "facedir", use_texture_alpha = "blend", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", diff --git a/homedecor_tables/endtable.lua b/homedecor_tables/endtable.lua index 6fcc373c..e772d4a8 100644 --- a/homedecor_tables/endtable.lua +++ b/homedecor_tables/endtable.lua @@ -17,6 +17,7 @@ minetest.register_node(":lrfurn:endtable", { paramtype2 = "facedir", use_texture_alpha = "blend", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_wood_defaults", diff --git a/homedecor_wardrobe/init.lua b/homedecor_wardrobe/init.lua index 8ecf2413..07be366c 100644 --- a/homedecor_wardrobe/init.lua +++ b/homedecor_wardrobe/init.lua @@ -94,6 +94,7 @@ local def = { paramtype2 = "facedir", groups = {snappy = 3, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, selection_box = wd_cbox, collision_box = wd_cbox, diff --git a/itemframes/init.lua b/itemframes/init.lua index 29152000..3571be5b 100644 --- a/itemframes/init.lua +++ b/itemframes/init.lua @@ -136,6 +136,7 @@ minetest.register_node("itemframes:frame",{ paramtype2 = "facedir", sunlight_propagates = true, groups = {choppy = 2, dig_immediate = 2, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, legacy_wallmounted = true, _sound_def = { @@ -217,6 +218,7 @@ minetest.register_node("itemframes:pedestal",{ tiles = {"itemframes_pedestal.png"}, paramtype = "light", groups = {cracky = 3, dig_stone = 2, pickaxey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_stone_defaults", diff --git a/lavalamp/init.lua b/lavalamp/init.lua index a377ba3b..72a3171f 100644 --- a/lavalamp/init.lua +++ b/lavalamp/init.lua @@ -35,6 +35,7 @@ minetest.register_node("lavalamp:lavalamp", { fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 }, }, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_glass_defaults", @@ -66,6 +67,7 @@ minetest.register_node("lavalamp:lavalamp_off", { fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 }, }, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, axey=5}, + is_ground_content = false, _mcl_hardness=1.6, _sound_def = { key = "node_sound_glass_defaults",