Fix tree trunk stone inclusions

Allow nodes to be ignored from the "remove
unsupported falling nodes in mapgen" hack, and
register things that don't make sense to convert
to stone ever for this exemption.
This commit is contained in:
Aaron Suen 2023-12-27 12:09:40 -05:00
parent cc02e72b30
commit abd71fca6e
11 changed files with 14 additions and 1 deletions

View File

@ -59,6 +59,7 @@ local groups = {
dynamic_light = "light level of invisible dynamic lights from nc_api_active",
ember = "(specific) fuel level of burning nc_fire embers",
falling_node = "built-in: falls as a node if not supported below",
falling_mapgen_ignore = "falling nodes that are ignored by mapgen falling node removal",
falling_repose = "angle of repose for falling nodes, higher is steeper",
fire_fuel = "for flammable nodes, convert into ember of this grade (1-8)",
firestick = "can be rubbed against another firestick to make fire; success rate factor",

View File

@ -45,6 +45,7 @@ local function reg(level)
lux_emit = math_ceil(level / 2),
stack_as_node = 1,
falling_node = 1,
falling_mapgen_ignore = 1,
},
stack_max = 1,
light_source = level * 2,

View File

@ -27,6 +27,7 @@ nodecore.register_lode("Ladder", {
sunlight_propagates = true,
groups = {
falling_node = 1,
falling_mapgen_ignore = 1,
chisel = 2,
optic_opaque = 1,
},

View File

@ -39,6 +39,8 @@ function nodecore.register_lode(shape, rawdef)
cracky = 3,
metallic = 1,
falling_node = temper.name == "hot" and 1 or nil,
falling_mapgen_ignore = temper.name == "hot"
and 1 or nil,
["lode_temper_" .. temper.name] = 1
},
["lode_temper_" .. temper.name] = true,
@ -53,6 +55,7 @@ function nodecore.register_lode(shape, rawdef)
def.light_source = nil
else
def.groups.falling_node = 1
def.groups.falling_mapgen_ignore = 1
def.groups.damage_pickup = 1
def.groups.damage_radiant = 1
end

View File

@ -15,7 +15,8 @@ local function initdata()
if v.walkable and not v.buildable_to then
idsupport[minetest.get_content_id(k)] = true
end
if ((v.groups or {}).falling_node or 0) > 0 then
if ((v.groups or {}).falling_node or 0) > 0
and ((v.groups or {}).falling_mapgen_ignore or 0) <= 0 then
idfalling[minetest.get_content_id(k)] = true
end
end

View File

@ -48,6 +48,7 @@ minetest.register_node(modname .. ":glass_crude", {
groups = {
silica = 1,
falling_node = 1,
falling_mapgen_ignore = 1,
crumbly = 2,
scaling_time = 150
},

View File

@ -32,6 +32,7 @@ minetest.register_node(modname .. ":sponge_wet", {
crumbly = 2,
coolant = 1,
falling_node = 1,
falling_mapgen_ignore = 1,
moist = 1,
sponge = 1
},

View File

@ -47,6 +47,7 @@ function nodecore.register_stone_bricks(name, desc, tile, alpha, bondalpha,
bonded = nodecore.underride(bonded, groups)
bonded.stone_bricks = 2
bonded.falling_node = nil
bonded.falling_mapgen_ignore = nil
minetest.register_node(":" .. modname .. ":bricks_" .. name .. "_bonded", {
description = "Bonded " .. desc .. " Bricks",
tiles = {tile .. "^(" .. modname .. "_bricks.png^[opacity:"

View File

@ -114,6 +114,7 @@ minetest.register_node(modname .. ":tree_bud", {
flammable = 12,
fire_fuel = 6,
falling_node = 1,
falling_mapgen_ignore = 1,
scaling_time = 80,
leaf_decay_support = 1
},

View File

@ -57,6 +57,7 @@ minetest.register_node(modname .. ":tree", {
fire_fuel = 6,
log = 1,
falling_node = 1,
falling_mapgen_ignore = 1,
scaling_time = 80,
leaf_decay_support = 1
},

View File

@ -27,6 +27,7 @@ minetest.register_node(modname .. ":ladder", {
flammable = 2,
fire_fuel = 1,
falling_node = 1,
falling_mapgen_ignore = 1,
optic_opaque = 1,
},
crush_damage = 0.25,