Skip to content

Commit

Permalink
Set is_ground_content in node definitions (mt-mods#348)
Browse files Browse the repository at this point in the history
SwissalpS authored Feb 26, 2024
1 parent 0dc1b97 commit 05079d8
Showing 30 changed files with 57 additions and 14 deletions.
2 changes: 2 additions & 0 deletions extranodes/init.lua
Original file line number Diff line number Diff line change
@@ -383,6 +383,7 @@ minetest.register_node(":technic:concrete_post_platform", {
description = S("Concrete Post Platform"),
tiles = {"basic_materials_concrete_block.png",},
groups={cracky=1, level=2},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
drawtype = "nodebox",
@@ -415,6 +416,7 @@ for platform = 0, 1 do
description = S("Concrete Post"),
tiles = {"basic_materials_concrete_block.png"},
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
drop = (platform == 1 and "technic:concrete_post_platform" or
"technic:concrete_post"),
3 changes: 2 additions & 1 deletion technic/items.lua
Original file line number Diff line number Diff line change
@@ -111,6 +111,7 @@ minetest.register_craftitem("technic:carbon_cloth", {
minetest.register_node("technic:machine_casing", {
description = S("Machine Casing"),
groups = {cracky=2, pickaxey=2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
sunlight_propagates = true,
@@ -166,7 +167,7 @@ for p = 0, 35 do
(ov or minetest.register_node)(block, {
description = S("@1%-Fissile Uranium Block", string.format("%.1f", p/10)),
tiles = {"technic_uranium_block.png"},
is_ground_content = true,
is_ground_content = false,
groups = {uranium_block=1, not_in_creative_inventory=nici,
cracky=1, level=has_mcl and 0 or 2, radioactive=radioactivity, pickaxey=4},
_mcl_blast_resistance = 1,
3 changes: 3 additions & 0 deletions technic/machines/HV/forcefield.lua
Original file line number Diff line number Diff line change
@@ -310,6 +310,7 @@ minetest.register_node("technic:forcefield_emitter_off", {
"technic_forcefield_emitter_off.png"
},
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, pickaxey = 3},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
on_receive_fields = forcefield_receive_fields,
@@ -344,6 +345,7 @@ minetest.register_node("technic:forcefield_emitter_on", {
},
groups = {cracky = 1, technic_machine = 1, technic_hv = 1,
not_in_creative_inventory=1, pickaxey = 3},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
drop = "technic:forcefield_emitter_off",
@@ -371,6 +373,7 @@ minetest.register_node("technic:forcefield", {
sunlight_propagates = true,
drawtype = "glasslike",
groups = {not_in_creative_inventory=1},
is_ground_content = false,
paramtype = "light",
light_source = minetest.LIGHT_MAX,
diggable = false,
2 changes: 2 additions & 0 deletions technic/machines/HV/nuclear_reactor.lua
Original file line number Diff line number Diff line change
@@ -446,6 +446,7 @@ minetest.register_node("technic:hv_nuclear_reactor_core", {
drawtype = "mesh",
mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, pickaxey = 3},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
@@ -491,6 +492,7 @@ minetest.register_node("technic:hv_nuclear_reactor_core_active", {
mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, radioactive = 4,
not_in_creative_inventory = 1, pickaxey = 3},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
1 change: 1 addition & 0 deletions technic/machines/HV/quarry.lua
Original file line number Diff line number Diff line change
@@ -498,6 +498,7 @@ minetest.register_node("technic:quarry", {
"technic_carbon_steel_block.png^technic_cable_connection_overlay.png"
},
groups = {cracky = 2, tubedevice = 1, technic_machine = 1, technic_hv = 1, pickaxey = 2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"front", "back", "left", "right"},
2 changes: 2 additions & 0 deletions technic/machines/LV/geothermal.lua
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ minetest.register_node("technic:geothermal", {
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
paramtype2 = "facedir",
@@ -109,6 +110,7 @@ minetest.register_node("technic:geothermal_active", {
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
2 changes: 2 additions & 0 deletions technic/machines/LV/lamp.lua
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ minetest.register_node("technic:lv_lamp", {
"technic_lv_lamp_side.png"
},
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, pickaxey = 2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"front", "back", "left", "right", "top"},
@@ -170,6 +171,7 @@ minetest.register_node("technic:lv_lamp_active", {
light_source = 14,
drop = "technic:lv_lamp",
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1, pickaxey = 2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"front", "back", "left", "right", "top"},
2 changes: 2 additions & 0 deletions technic/machines/LV/led.lua
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ minetest.register_node("technic:lv_led", {
inventory_image = "technic_lv_led_inv.png",
sunlight_propagates = true,
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, pickaxey = 2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"front", "back", "left", "right", "top", "bottom"},
@@ -76,6 +77,7 @@ minetest.register_node("technic:lv_led_active", {
drop = "technic:lv_led",
sunlight_propagates = true,
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1, pickaxey = 2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"front", "back", "left", "right", "top", "bottom"},
1 change: 1 addition & 0 deletions technic/machines/LV/music_player.lua
Original file line number Diff line number Diff line change
@@ -95,6 +95,7 @@ minetest.register_node("technic:music_player", {
"technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, axey = 2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom"},
2 changes: 1 addition & 1 deletion technic/machines/LV/solar_panel.lua
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ minetest.register_node("technic:solar_panel", {
"technic_solar_panel_side.png", "technic_solar_panel_side.png", "technic_solar_panel_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom"},
@@ -57,7 +58,6 @@ minetest.register_node("technic:solar_panel", {
active = false,
drawtype = "nodebox",
paramtype = "light",
is_ground_content = true,
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
2 changes: 2 additions & 0 deletions technic/machines/LV/water_mill.lua
Original file line number Diff line number Diff line change
@@ -79,6 +79,7 @@ minetest.register_node("technic:water_mill", {
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
@@ -99,6 +100,7 @@ minetest.register_node("technic:water_mill_active", {
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
2 changes: 2 additions & 0 deletions technic/machines/MV/hydro_turbine.lua
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ minetest.register_node("technic:hydro_turbine", {
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
@@ -96,6 +97,7 @@ minetest.register_node("technic:hydro_turbine_active", {
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, axey=2, handy=1,
technic_machine=1, technic_mv=1, not_in_creative_inventory=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
1 change: 1 addition & 0 deletions technic/machines/MV/tool_workshop.lua
Original file line number Diff line number Diff line change
@@ -114,6 +114,7 @@ minetest.register_node("technic:tool_workshop", {
},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1, tubedevice=1, tubedevice_receiver=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom", "back", "left", "right"},
2 changes: 2 additions & 0 deletions technic/machines/MV/wind_mill.lua
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ minetest.register_node("technic:wind_mill_frame", {
tiles = {"technic_carbon_steel_block.png", "default_glass.png"},
sunlight_propagates = true,
groups = {cracky=3, pickaxey=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
sounds = technic.sounds.node_sound_stone_defaults(),
@@ -73,6 +74,7 @@ minetest.register_node("technic:wind_mill", {
tiles = {"technic_carbon_steel_block.png"},
paramtype2 = "facedir",
groups = {cracky=1, technic_machine=1, technic_mv=1, pickaxey=2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"top", "bottom", "back", "left", "right"},
2 changes: 1 addition & 1 deletion technic/machines/other/anchor.lua
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ minetest.register_node("technic:admin_anchor", {
description = desc,
drawtype = "normal",
tiles = {"technic_admin_anchor.png"},
is_ground_content = true,
is_ground_content = false,
groups = {cracky=3, not_in_creative_inventory=1, pickaxey=1},
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
2 changes: 2 additions & 0 deletions technic/machines/other/coal_alloy_furnace.lua
Original file line number Diff line number Diff line change
@@ -54,6 +54,7 @@ minetest.register_node("technic:coal_alloy_furnace", {
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front.png"},
paramtype2 = "facedir",
groups = {cracky=2, pickaxey=2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
@@ -82,6 +83,7 @@ minetest.register_node("technic:coal_alloy_furnace_active", {
light_source = 8,
drop = "technic:coal_alloy_furnace",
groups = {cracky=2, not_in_creative_inventory=1, pickaxey=2},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
legacy_facedir_simple = true,
2 changes: 2 additions & 0 deletions technic/machines/other/constructor.lua
Original file line number Diff line number Diff line change
@@ -143,6 +143,7 @@ local function make_constructor(mark, length)
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
mesecon = 2, technic_constructor = 1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
mesecons = {effector = {action_on = make_on(mark, length)}},
@@ -222,6 +223,7 @@ local function make_constructor(mark, length)
drop = "technic:constructor_mk"..mark.."_off",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
mesecon=2, not_in_creative_inventory=1, technic_constructor=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
mesecons= {effector = {action_off = make_off(mark)}},
1 change: 1 addition & 0 deletions technic/machines/other/injector.lua
Original file line number Diff line number Diff line change
@@ -71,6 +71,7 @@ minetest.register_node("technic:injector", {
},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
tube = {
1 change: 1 addition & 0 deletions technic/machines/power_monitor.lua
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ minetest.register_node("technic:power_monitor",{
},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom", "back"},
1 change: 1 addition & 0 deletions technic/machines/register/battery_box.lua
Original file line number Diff line number Diff line change
@@ -363,6 +363,7 @@ function technic.register_battery_box(nodename, data)
side_tex,
front_tex},
groups = groups,
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom"},
1 change: 1 addition & 0 deletions technic/machines/register/cables.lua
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ local function cable_defaults(nodename, data)
handy = 1,
["technic_"..ltier.."_cable"] = 1
}
def.is_ground_content = false
def.drop = def.drop or nodename
def.sounds = def.sounds or technic.sounds.node_sound_wood_defaults()
def.on_construct = def.on_construct or function(pos) place_network_node(pos, {tier}, nodename) end
2 changes: 2 additions & 0 deletions technic/machines/register/generator.lua
Original file line number Diff line number Diff line change
@@ -134,6 +134,7 @@ function technic.register_generator(data)
},
paramtype2 = "facedir",
groups = groups,
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom", "back", "left", "right"},
@@ -206,6 +207,7 @@ function technic.register_generator(data)
},
paramtype2 = "facedir",
groups = active_groups,
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom"},
2 changes: 2 additions & 0 deletions technic/machines/register/machine_base.lua
Original file line number Diff line number Diff line change
@@ -179,6 +179,7 @@ function technic.register_base_machine(nodename, data)
},
paramtype2 = "facedir",
groups = groups,
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
tube = def.tube and tube or nil,
@@ -253,6 +254,7 @@ function technic.register_base_machine(nodename, data)
paramtype2 = "facedir",
drop = nodename,
groups = active_groups,
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = def.connect_sides or connect_default,
1 change: 1 addition & 0 deletions technic/machines/register/solar_array.lua
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ function technic.register_solar_array(nodename, data)
}
def.groups = def.groups or {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, ["technic_"..ltier]=1, axey=2, handy=1}
def.is_ground_content = false
def._mcl_blast_resistance = 1
def._mcl_hardness = 0.8
def.connect_sides = def.connect_sides or {"bottom"}
1 change: 1 addition & 0 deletions technic/machines/supply_converter.lua
Original file line number Diff line number Diff line change
@@ -182,6 +182,7 @@ minetest.register_node("technic:supply_converter", {
},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_all_tiers=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"top", "bottom"},
1 change: 1 addition & 0 deletions technic/machines/switching_station.lua
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ minetest.register_node("technic:switching_station",{
"technic_water_mill_top_active.png",
"technic_water_mill_top_active.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1, axey=2, handy=1},
is_ground_content = false,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.8,
connect_sides = {"bottom"},
3 changes: 2 additions & 1 deletion technic/radiation.lua
Original file line number Diff line number Diff line change
@@ -470,6 +470,7 @@ for _, state in pairs({"flowing", "source"}) do
liquid_renewable = false,
damage_per_second = 6,
post_effect_color = {a=192, r=80, g=160, b=80},
is_ground_content = state == "flowing",
groups = {
liquid = 2,
hot = 3,
@@ -507,7 +508,7 @@ end
minetest.register_node("technic:chernobylite_block", {
description = S("Chernobylite Block"),
tiles = {"technic_chernobylite_block.png"},
is_ground_content = true,
is_ground_content = false,
groups = {cracky=1, radioactive=4, level= has_mcl and 0 or 2, pickaxey=5},
_mcl_blast_resistance = 30,
_mcl_hardness = 40,
1 change: 1 addition & 0 deletions technic_chests/register.lua
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ function technic.chests.register_chest(nodename, data)
description = data.description,
tiles = data.tiles or get_tiles(data),
paramtype2 = "facedir",
is_ground_content = false,
legacy_facedir_simple = true,
groups = node_groups,
sounds = default.node_sound_wood_defaults(),
2 changes: 2 additions & 0 deletions technic_cnc/api.lua
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ function technic_cnc.register_program(recipeitem, suffix, model, groups, images,
use_texture_alpha = ALPHA_CLIP,
walkable = true,
groups = groups,
is_ground_content = false,
selection_box = sbox,
collision_box = cbox
})
@@ -390,6 +391,7 @@ function technic_cnc.register_cnc_machine(nodename, def)
connect_sides = {"bottom", "back", "left", "right"},
paramtype2 = "facedir",
legacy_facedir_simple = true,
is_ground_content = false,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", def.description)
Loading

0 comments on commit 05079d8

Please sign in to comment.