bypass dependency indirection for df_underworld_items

This commit is contained in:
FaceDeer 2022-08-08 13:53:33 -06:00
parent a1f99b711f
commit 18bf4d7942
10 changed files with 25 additions and 49 deletions

View File

@ -30,6 +30,10 @@ elseif minetest.get_modpath("mcl_core") then
df_dependencies.data_mese_containing_nodes = {} -- TODO
end
-- common nodes that can be found next to pit plasma, triggering matter degradation
-- don't trigger on air, that's for sparkle generation
df_dependencies.abm_pit_plasma_neighbors = {"group:stone", "group:lava", "group:water"}
df_dependencies.texture_cobble = select_required({default="default_cobble.png", mcl_core="default_cobble.png"})
df_dependencies.texture_coral_skeleton = select_required({default="default_coral_skeleton.png", mcl_ocean="mcl_ocean_dead_horn_coral_block.png"})
df_dependencies.texture_dirt = select_required({default="default_dirt.png", mcl_core="default_dirt.png"})

View File

@ -16,10 +16,10 @@ local lantern_nodebox = {
{-0.375, -0.375, -0.375, 0.375, 0.375, 0.375},
}
local mese_crystal_node = df_underworld_items.nodes.mese_crystal
local brick_texture = "dfcaverns_slade_brick.png"--df_underworld_items.textures.stone_brick
local lantern_texture = df_underworld_items.textures.meselamp
local ancient_lantern_sound = df_underworld_items.sounds.slade
local mese_crystal_node = df_dependencies.node_name_mese_crystal
local brick_texture = "dfcaverns_slade_brick.png"
local lantern_texture = df_dependencies.texture_meselamp
local ancient_lantern_sound = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } })
local invulnerable = df_underworld_items.config.invulnerable_slade and not minetest.settings:get_bool("creative_mode")

View File

@ -7,7 +7,7 @@ minetest.register_node("df_underworld_items:glow_amethyst", {
tiles = {"dfcaverns_glow_amethyst.png"},
is_ground_content = false,
groups = {cracky=3, pit_plasma_resistant=1},
sounds = df_underworld_items.sounds.glass(),
sounds = df_dependencies.sound_glass(),
light_source = 6,
paramtype = "light",
use_texture_alpha = "blend",

View File

@ -1,27 +0,0 @@
df_underworld_items.abm_neighbors = {}
-- common nodes that can be found next to pit plasma, triggering matter degradation
-- don't trigger on air, that's for sparkle generation
df_underworld_items.abm_neighbors.pit_plasma = {"group:stone", "df_underworld_items:glow_amethyst", "group:lava", "group:water"}
df_underworld_items.sounds = {}
df_underworld_items.sounds.glass = df_dependencies.sound_glass
df_underworld_items.sounds.stone = df_dependencies.sound_stone
df_underworld_items.sounds.slade = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } })
df_underworld_items.sounds.slade_gravel = df_dependencies.sound_gravel({footstep = {name = df_dependencies.soundfile_gravel_footstep, gain = 0.45},})
df_underworld_items.nodes = {}
df_underworld_items.nodes.lava_source = df_dependencies.node_name_lava_source
df_underworld_items.nodes.mese_crystal = df_dependencies.node_name_mese_crystal
df_underworld_items.textures = {}
df_underworld_items.textures.meselamp = df_dependencies.texture_meselamp
-- This stuff should only be used during initialization
minetest.after(0, function()
df_underworld_items.abm_neighbors = nil
df_underworld_items.sounds = nil
df_underworld_items.nodes = nil
df_underworld_items.textures = nil
end)

View File

@ -19,7 +19,7 @@ local glowstone_def = {
},
is_ground_content = false,
groups = {cracky=3},
sounds = df_underworld_items.sounds.glass(),
sounds = df_dependencies.sound_glass(),
paramtype = "light",
drawtype = "glasslike",
drop = "",
@ -28,7 +28,7 @@ local glowstone_def = {
_mcl_hardness = 0.5,
}
local tnt_boom = df_dependencies.tnt_boom
if minetest.get_modpath("tnt") then
if tnt_boom then
glowstone_def.on_dig = function(pos, node, digger)
tnt_boom(pos, {radius=3})
end

View File

@ -1,6 +1,6 @@
local S = df_underworld_items.S
local lava_source = df_underworld_items.nodes.lava_source
local lava_source = df_dependencies.node_name_lava_source
minetest.register_node("df_underworld_items:pit_plasma", {
description = S("Glowing Pit Plasma"),
@ -133,7 +133,7 @@ if df_underworld_items.config.destructive_pit_plasma then
minetest.register_abm({
label = "glowing pit matter degradation",
nodenames = {"group:pit_plasma"},
neighbors = df_underworld_items.abm_neighbors.pit_plasma,
neighbors = df_dependencies.abm_pit_plasma_neighbors,
interval = 2,
chance = 30,
catch_up = false,

View File

@ -5,7 +5,6 @@ df_underworld_items.S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
dofile(modpath.."/config.lua")
dofile(modpath.."/dependencies.lua")
dofile(modpath.."/doc.lua")
dofile(modpath.."/crystals_amethyst.lua")

View File

@ -1,4 +1,4 @@
name = df_underworld_items
description = Various node types used by the dfcaverns mapgen mod for its underworld layer.
depends = df_dependencies
optional_depends = doc, radiant_damage, mesecons_mvps, tnt, stairs, hunter_statue
optional_depends = doc, radiant_damage, mesecons_mvps, hunter_statue

View File

@ -20,7 +20,7 @@ if invulnerable then
slade_mcl_hardness = -1
end
local lava_source = df_underworld_items.nodes.lava_source
local lava_source = df_dependencies.node_name_lava_source
-- Ensures that the node is functioning correctly
local ensure_meta = function(pos)
@ -193,7 +193,7 @@ local puzzle_seal_def = {
paramtype2 = "facedir",
light_source = 8,
groups = slade_groups,
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
selection_box = {
type = "fixed",
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
@ -258,7 +258,7 @@ local digging_seal_def = {
paramtype2 = "facedir",
light_source = minetest.LIGHT_MAX,
groups = {immortal=1, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
selection_box = {
type = "fixed",
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
@ -378,7 +378,7 @@ local inscription_block_def = {
},
paramtype2 = "facedir",
groups = slade_groups,
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = slade_mcl_blast_resistance,
_mcl_hardness = slade_mcl_hardness,
@ -418,7 +418,7 @@ local capstone_def = {
paramtype2 = "facedir",
groups = slade_groups,
light_source = 8,
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = slade_mcl_blast_resistance,
_mcl_hardness = slade_mcl_hardness,

View File

@ -23,7 +23,7 @@ local slade_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade.png"},
groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
@ -45,7 +45,7 @@ local slade_brick_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_brick.png"},
groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
@ -73,7 +73,7 @@ local slade_wall_def = {
walkable = true,
is_ground_content = false,
groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, wall=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
}
@ -90,7 +90,7 @@ minetest.register_node("df_underworld_items:slade_sand", {
tiles = {"dfcaverns_slade_sand.png"},
is_ground_content = false,
groups = {crumbly = 3, level = 2, falling_node = 1, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = df_underworld_items.sounds.slade_gravel,
sounds = df_dependencies.sound_gravel({footstep = {name = df_dependencies.soundfile_gravel_footstep, gain = 0.45},}),
_mcl_blast_resistance = 2000,
_mcl_hardness = 5,
})
@ -101,7 +101,7 @@ local slade_block_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_block.png"},
groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
@ -119,7 +119,7 @@ local slade_seal_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_block.png^dfcaverns_seal.png", "dfcaverns_slade_block.png"},
groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = df_underworld_items.sounds.slade,
sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }),
is_ground_content = false,
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,