Skip to content

Commit

Permalink
Is ground content
Browse files Browse the repository at this point in the history
  • Loading branch information
SwissalpS committed Feb 29, 2024
1 parent 280924c commit 3cf8614
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 16 deletions.
32 changes: 17 additions & 15 deletions building_blocks/node_stairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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("(.*):(.*)")
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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",
Expand All @@ -81,15 +83,15 @@ 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",
},
})
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 = {
Expand All @@ -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 = {
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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
})
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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
})
Expand All @@ -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
})
Expand All @@ -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 = {
Expand Down
4 changes: 4 additions & 0 deletions fake_fire/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 2 additions & 0 deletions homedecor_common/registration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion homedecor_doors_and_gates/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
})
})
9 changes: 9 additions & 0 deletions homedecor_lighting/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
})
Expand All @@ -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,
})
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions homedecor_misc/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions homedecor_roofing/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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",
Expand Down Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down
1 change: 1 addition & 0 deletions homedecor_seating/armchairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homedecor_seating/longsofas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homedecor_seating/sofas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homedecor_tables/coffeetable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homedecor_tables/endtable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions homedecor_wardrobe/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 3cf8614

Please sign in to comment.