distilling out more dependencies

This commit is contained in:
FaceDeer 2022-08-01 21:38:01 -06:00
parent b6c4dedcfb
commit 57792c07f8
15 changed files with 140 additions and 98 deletions

View File

@ -2,8 +2,8 @@ local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname) local S = minetest.get_translator(modname)
local sound local sound
if minetest.get_modpath("default") then if minetest.get_modpath("df_dependencies") then
sound = default.node_sound_leaves_defaults() sound = df_dependencies.sound_leaves()
end end
local get_node_box = function(connector_thickness) local get_node_box = function(connector_thickness)

View File

@ -1,2 +1,2 @@
name=big_webs name=big_webs
optional_depends=default optional_depends=df_dependencies

View File

@ -1,67 +1,73 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
--- From "default" --- From "default"
if minetest.get_modpath("default") then
df_dependencies.sound_dirt = default.node_sound_dirt_defaults df_dependencies.sound_dirt = default.node_sound_dirt_defaults
df_dependencies.sound_glass = default.node_sound_glass_defaults df_dependencies.sound_glass = default.node_sound_glass_defaults
df_dependencies.sound_leaves = default.node_sound_leaves_defaults df_dependencies.sound_gravel = default.node_sound_gravel_defaults
df_dependencies.sound_sand = default.node_sound_sand_defaults df_dependencies.sound_leaves = default.node_sound_leaves_defaults
df_dependencies.sound_stone = default.node_sound_stone_defaults df_dependencies.sound_sand = default.node_sound_sand_defaults
df_dependencies.sound_water = default.node_sound_water_defaults df_dependencies.sound_stone = default.node_sound_stone_defaults
df_dependencies.sound_wood = default.node_sound_wood_defaults df_dependencies.sound_water = default.node_sound_water_defaults
df_dependencies.sound_wood = default.node_sound_wood_defaults
df_dependencies.soundfile_grass_footstep = "default_grass_footstep"
df_dependencies.soundfile_snow_footstep = "default_snow_footstep" df_dependencies.soundfile_grass_footstep = "default_grass_footstep"
df_dependencies.soundfile_snow_footstep = "default_snow_footstep"
df_dependencies.node_name_apple = "default:apple" df_dependencies.soundfile_gravel_footstep = "default_gravel_footstep"
df_dependencies.node_name_chest = "default:chest"
df_dependencies.node_name_coalblock = "default:coalblock" df_dependencies.node_name_apple = "default:apple"
df_dependencies.node_name_cobble = "default:cobble" df_dependencies.node_name_chest = "default:chest"
df_dependencies.node_name_coral_skeleton = "default:coral_skeleton" df_dependencies.node_name_coalblock = "default:coalblock"
df_dependencies.node_name_desert_sand = "default:desert_sand" df_dependencies.node_name_cobble = "default:cobble"
df_dependencies.node_name_dirt = "default:dirt" df_dependencies.node_name_coral_skeleton = "default:coral_skeleton"
df_dependencies.node_name_dry_grass_3 = "default:dry_grass_3" df_dependencies.node_name_desert_sand = "default:desert_sand"
df_dependencies.node_name_dry_grass_4 = "default:dry_grass_4" df_dependencies.node_name_dirt = "default:dirt"
df_dependencies.node_name_dry_shrub = "default:dry_shrub" df_dependencies.node_name_dry_grass_3 = "default:dry_grass_3"
df_dependencies.node_name_furnace = "default:furnace" df_dependencies.node_name_dry_grass_4 = "default:dry_grass_4"
df_dependencies.node_name_gold_ingot = "default:gold_ingot" df_dependencies.node_name_dry_shrub = "default:dry_shrub"
df_dependencies.node_name_gravel = "default:gravel" df_dependencies.node_name_furnace = "default:furnace"
df_dependencies.node_name_ice = "default:ice" df_dependencies.node_name_gold_ingot = "default:gold_ingot"
df_dependencies.node_name_junglewood = "default:junglewood" df_dependencies.node_name_gravel = "default:gravel"
df_dependencies.node_name_lava_source = "default:lava_source" df_dependencies.node_name_ice = "default:ice"
df_dependencies.node_name_mese_crystal = "default:mese_crystal" df_dependencies.node_name_junglewood = "default:junglewood"
df_dependencies.node_name_mossycobble = "default:mossycobble" df_dependencies.node_name_lava_source = "default:lava_source"
df_dependencies.node_name_obsidian = "default:obsidian" df_dependencies.node_name_mese_crystal = "default:mese_crystal"
df_dependencies.node_name_paper = "default:paper" df_dependencies.node_name_meselamp = "default:meselamp"
df_dependencies.node_name_river_water_flowing = "default:river_water_flowing" df_dependencies.node_name_mossycobble = "default:mossycobble"
df_dependencies.node_name_river_water_source = "default:river_water_source" df_dependencies.node_name_obsidian = "default:obsidian"
df_dependencies.node_name_sand = "default:sand" df_dependencies.node_name_paper = "default:paper"
df_dependencies.node_name_sand = "default:sand" df_dependencies.node_name_river_water_flowing = "default:river_water_flowing"
df_dependencies.node_name_silver_sand = "default:silver_sand" df_dependencies.node_name_river_water_source = "default:river_water_source"
df_dependencies.node_name_snow = "default:snow" df_dependencies.node_name_sand = "default:sand"
df_dependencies.node_name_stone = "default:stone" df_dependencies.node_name_sand = "default:sand"
df_dependencies.node_name_stone_with_coal = "default:stone_with_coal" df_dependencies.node_name_silver_sand = "default:silver_sand"
df_dependencies.node_name_stone_with_mese = "default:stone_with_mese" df_dependencies.node_name_snow = "default:snow"
df_dependencies.node_name_torch = "default:torch" df_dependencies.node_name_stone = "default:stone"
df_dependencies.node_name_torch_wall = "default:torch_wall" df_dependencies.node_name_stone_with_coal = "default:stone_with_coal"
df_dependencies.node_name_water_flowing = "default:water_flowing" df_dependencies.node_name_stone_with_mese = "default:stone_with_mese"
df_dependencies.node_name_water_source = "default:water_source" df_dependencies.node_name_torch = "default:torch"
df_dependencies.node_name_torch_wall = "default:torch_wall"
df_dependencies.node_name_water_flowing = "default:water_flowing"
df_dependencies.texture_cobble = "default_cobble.png" df_dependencies.node_name_water_source = "default:water_source"
df_dependencies.texture_coral_skeleton = "default_coral_skeleton.png"
df_dependencies.texture_dirt = "default_dirt.png"
df_dependencies.texture_gold_block = "default_gold_block.png" df_dependencies.texture_cobble = "default_cobble.png"
df_dependencies.texture_ice = "default_ice.png" df_dependencies.texture_coral_skeleton = "default_coral_skeleton.png"
df_dependencies.texture_sand = "default_sand.png" df_dependencies.texture_dirt = "default_dirt.png"
df_dependencies.texture_stone = "default_stone.png" df_dependencies.texture_gold_block = "default_gold_block.png"
df_dependencies.texture_ice = "default_ice.png"
df_dependencies.data_iron_containing_nodes = {"default:stone_with_iron", "default:steelblock"} df_dependencies.texture_sand = "default_sand.png"
df_dependencies.data_copper_containing_nodes = {"default:stone_with_copper", "default:copperblock"} df_dependencies.texture_stone = "default_stone.png"
df_dependencies.data_mese_containing_nodes = {"default:stone_with_mese", "default:mese"}
df_dependencies.data_iron_containing_nodes = {"default:stone_with_iron", "default:steelblock"}
df_dependencies.register_leafdecay = default.register_leafdecay df_dependencies.data_copper_containing_nodes = {"default:stone_with_copper", "default:copperblock"}
df_dependencies.after_place_leaves = default.after_place_leaves df_dependencies.data_mese_containing_nodes = {"default:stone_with_mese", "default:mese"}
df_dependencies.register_leafdecay = default.register_leafdecay
df_dependencies.after_place_leaves = default.after_place_leaves
df_dependencies.LIGHT_MAX = default.LIGHT_MAX
end
-- Note that a circular table reference will result in a crash, TODO: guard against that. -- Note that a circular table reference will result in a crash, TODO: guard against that.
-- Unlikely to be needed, though - it'd take a lot of work for users to get into this bit of trouble. -- Unlikely to be needed, though - it'd take a lot of work for users to get into this bit of trouble.
@ -196,11 +202,24 @@ end
-- from "bucket" -- from "bucket"
df_dependencies.node_name_bucket_empty = "bucket:bucket_empty" if minetest.get_modpath("bucket") then
df_dependencies.node_name_bucket_empty = "bucket:bucket_empty"
df_dependencies.bucket_register_liquid = bucket.register_liquid
end
-- from "wool" -- from "wool"
df_dependencies.node_name_wool_white = "wool:white" if minetest.get_modpath("wool") then
df_dependencies.node_name_wool_white = "wool:white"
end
-- from "fireflies" -- from "fireflies"
df_dependencies.node_name_fireflies = "fireflies:firefly" if minetest.get_modpath("fireflies") then
df_dependencies.node_name_fireflies = "fireflies:firefly"
end
-- from "vessels"
if minetest.get_modpath("vessels") then
df_dependencies.node_name_glass_bottle = "vessels:glass_bottle"
end

View File

@ -1,4 +1,4 @@
name = df_dependencies name = df_dependencies
description = A utility mod for df_caverns that gathers all dependencies on minetest_game in one place, to ease compatibility efforts with mineclone and other such games description = A utility mod for df_caverns that gathers all dependencies on minetest_game in one place, to ease compatibility efforts with mineclone and other such games
depends = default depends = default
optional_depends = moreblocks, stairs, doors, farming, wool, fireflies optional_depends = moreblocks, stairs, doors, farming, wool, fireflies, vessels, bucket

View File

@ -19,8 +19,11 @@ df_farming.node_names.string = df_dependencies.node_name_string
df_farming.node_names.dirt_moss = "df_farming:dirt_with_cave_moss" df_farming.node_names.dirt_moss = "df_farming:dirt_with_cave_moss"
df_farming.node_names.floor_fungus = "df_farming:cobble_with_floor_fungus" df_farming.node_names.floor_fungus = "df_farming:cobble_with_floor_fungus"
df_farming.bucket_register_liquid = df_dependencies.bucket_register_liquid
-- these are only for initialization -- these are only for initialization
minetest.after(0, function() minetest.after(0, function()
df_farming.sounds = nil df_farming.sounds = nil
df_farming.node_names = nil df_farming.node_names = nil
df_farming.bucket_register_liquid = nil
end) end)

View File

@ -1,4 +1,4 @@
name = df_farming name = df_farming
description = Adds farmable underground plants that die in sunlight. Also includes various cooking reactions. description = Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.
depends = df_dependencies depends = df_dependencies
optional_depends = farming, cottages, bucket, dynamic_liquid, doc, crafting, footprints, oil optional_depends = farming, cottages, dynamic_liquid, doc, crafting, footprints, oil

View File

@ -138,7 +138,7 @@ end
---------------------------------------------- ----------------------------------------------
-- Syrup -- Syrup
if minetest.get_modpath("bucket") then if df_dependencies.bucket_register_liquid then
minetest.register_node("df_farming:dwarven_syrup_source", { minetest.register_node("df_farming:dwarven_syrup_source", {
description = S("Dwarven Syrup Source"), description = S("Dwarven Syrup Source"),
_doc_items_longdesc = df_farming.doc.sweet_pod_syrup_desc, _doc_items_longdesc = df_farming.doc.sweet_pod_syrup_desc,
@ -236,7 +236,7 @@ if minetest.get_modpath("bucket") then
sounds = df_farming.sounds.syrup, sounds = df_farming.sounds.syrup,
}) })
bucket.register_liquid( df_farming.bucket_register_liquid(
"df_farming:dwarven_syrup_source", "df_farming:dwarven_syrup_source",
"df_farming:dwarven_syrup_flowing", "df_farming:dwarven_syrup_flowing",
"df_farming:dwarven_syrup_bucket", "df_farming:dwarven_syrup_bucket",

View File

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

View File

@ -4,7 +4,23 @@ df_underworld_items.abm_neighbors = {}
-- don't trigger on air, that's for sparkle generation -- 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.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.meselamp = df_dependencies.node_name_meselamp
df_underworld_items.LIGHT_MAX = df_dependencies.LIGHT_MAX
-- This stuff should only be used during initialization -- This stuff should only be used during initialization
minetest.after(0, function() minetest.after(0, function()
df_underworld_items.abm_neighbors = nil df_underworld_items.abm_neighbors = nil
df_underworld.sounds = nil
df_underworld.nodes = nil
df_underworld.LIGHT_MAX = nil
end) end)

View File

@ -19,7 +19,7 @@ local glowstone_def = {
}, },
is_ground_content = false, is_ground_content = false,
groups = {cracky=3}, groups = {cracky=3},
sounds = default.node_sound_glass_defaults(), sounds = df_underworld_items.sounds.glass(),
paramtype = "light", paramtype = "light",
drawtype = "glasslike", drawtype = "glasslike",
drop = "", drop = "",

View File

@ -1,5 +1,7 @@
local S = df_underworld_items.S local S = df_underworld_items.S
local lava_source = df_underworld_items.nodes.lava_source
minetest.register_node("df_underworld_items:pit_plasma", { minetest.register_node("df_underworld_items:pit_plasma", {
description = S("Glowing Pit Plasma"), description = S("Glowing Pit Plasma"),
_doc_items_longdesc = df_underworld_items.doc.pit_plasma_desc, _doc_items_longdesc = df_underworld_items.doc.pit_plasma_desc,
@ -144,7 +146,7 @@ if df_underworld_items.config.destructive_pit_plasma then
if math.random() < 0.66 then if math.random() < 0.66 then
minetest.set_node(test_pos, {name="df_underworld_items:glow_amethyst"}) minetest.set_node(test_pos, {name="df_underworld_items:glow_amethyst"})
else else
minetest.set_node(test_pos, {name="default:lava_source"}) minetest.set_node(test_pos, {name=lava_source})
end end
else else
minetest.set_node(test_pos, {name="air"}) minetest.set_node(test_pos, {name="air"})

View File

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

View File

@ -16,6 +16,7 @@ if invulnerable then
slade_groups.immortal = 1 slade_groups.immortal = 1
end end
local lava_source = df_underworld_items.nodes.lava_source
-- Ensures that the node is functioning correctly -- Ensures that the node is functioning correctly
local ensure_meta = function(pos) local ensure_meta = function(pos)
@ -188,7 +189,7 @@ local puzzle_seal_def = {
paramtype2 = "facedir", paramtype2 = "facedir",
light_source = 8, light_source = 8,
groups = slade_groups, groups = slade_groups,
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625}, fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
@ -247,9 +248,9 @@ local digging_seal_def = {
tiles = {"dfcaverns_pit_plasma_static.png", "dfcaverns_pit_plasma_static.png^dfcaverns_seal.png", "dfcaverns_pit_plasma_static.png"}, tiles = {"dfcaverns_pit_plasma_static.png", "dfcaverns_pit_plasma_static.png^dfcaverns_seal.png", "dfcaverns_pit_plasma_static.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
light_source = default.LIGHT_MAX, light_source = df_underworld_items.LIGHT_MAX,
groups = {immortal=1, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1}, groups = {immortal=1, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625}, fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
@ -302,7 +303,7 @@ local digging_seal_def = {
if minetest.get_item_group(below_node.name, "slade") == 0 then if minetest.get_item_group(below_node.name, "slade") == 0 then
tnt.boom({x=pos.x, y=pos.y-2, z=pos.z}, {radius=3}) tnt.boom({x=pos.x, y=pos.y-2, z=pos.z}, {radius=3})
minetest.set_node(pos, {name="default:lava_source"}) minetest.set_node(pos, {name=lava_source})
return return
end end
@ -321,7 +322,7 @@ local digging_seal_def = {
node.param2 = 0 node.param2 = 0
else else
tnt.boom(pos, {radius=3}) tnt.boom(pos, {radius=3})
minetest.set_node(pos, {name="default:lava_source"}) minetest.set_node(pos, {name=lava_source})
return return
end end
minetest.set_node(pos, {name="air"}) minetest.set_node(pos, {name="air"})
@ -367,7 +368,7 @@ local inscription_block_def = {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = slade_groups, groups = slade_groups,
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
can_dig = can_dig, can_dig = can_dig,
on_blast = function() end, on_blast = function() end,
@ -405,7 +406,7 @@ local capstone_def = {
paramtype2 = "facedir", paramtype2 = "facedir",
groups = slade_groups, groups = slade_groups,
light_source = 8, light_source = 8,
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
can_dig = can_dig, can_dig = can_dig,
on_blast = function() end, on_blast = function() end,
@ -418,7 +419,7 @@ minetest.register_node("df_underworld_items:slade_capstone", capstone_def)
-- Schematics -- Schematics
local n1 = { name = "df_underworld_items:slade_block" } local n1 = { name = "df_underworld_items:slade_block" }
local n5 = { name = "default:meselamp" } local n5 = { name = df_underworld_items.nodes.meselamp }
local n6 = { name = "air", prob = 0 } -- ceiling pieces to leave in place local n6 = { name = "air", prob = 0 } -- ceiling pieces to leave in place
local n8 = { name = "df_underworld_items:puzzle_seal" } local n8 = { name = "df_underworld_items:puzzle_seal" }
local n3 = { name = "air"} local n3 = { name = "air"}
@ -448,7 +449,7 @@ if minetest.get_modpath("stairs") then
{"dfcaverns_slade_block.png"}, {"dfcaverns_slade_block.png"},
S("Slade Block Stair"), S("Slade Block Stair"),
S("Slade Block Slab"), S("Slade Block Slab"),
default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }) df_underworld_items.sounds.slade
) )
if invulnerable then if invulnerable then

View File

@ -21,7 +21,7 @@ local slade_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage, _doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade.png"}, tiles = {"dfcaverns_slade.png"},
groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1}, groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
on_blast = function(pos, intensity) on_blast = function(pos, intensity)
if intensity > 3.0 then if intensity > 3.0 then
@ -41,7 +41,7 @@ local slade_brick_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage, _doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_brick.png"}, tiles = {"dfcaverns_slade_brick.png"},
groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1}, groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
} }
if invulnerable then if invulnerable then
@ -67,7 +67,7 @@ local slade_wall_def = {
walkable = true, walkable = true,
is_ground_content = false, is_ground_content = false,
groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1}, groups = { cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
} }
if invulnerable then if invulnerable then
add_immortality(slade_wall_def) add_immortality(slade_wall_def)
@ -82,9 +82,7 @@ minetest.register_node("df_underworld_items:slade_sand", {
tiles = {"dfcaverns_slade_sand.png"}, tiles = {"dfcaverns_slade_sand.png"},
is_ground_content = false, is_ground_content = false,
groups = {crumbly = 3, level = 2, falling_node = 1, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1}, groups = {crumbly = 3, level = 2, falling_node = 1, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_gravel_defaults({ sounds = df_dependencies.sound_gravel,
footstep = {name = "default_gravel_footstep", gain = 0.45},
}),
}) })
local slade_block_def = { local slade_block_def = {
@ -93,7 +91,7 @@ local slade_block_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage, _doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_block.png"}, tiles = {"dfcaverns_slade_block.png"},
groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1}, groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
} }
if invulnerable then if invulnerable then
@ -109,7 +107,7 @@ local slade_seal_def = {
_doc_items_usagehelp = df_underworld_items.doc.slade_usage, _doc_items_usagehelp = df_underworld_items.doc.slade_usage,
tiles = {"dfcaverns_slade_block.png^dfcaverns_seal.png", "dfcaverns_slade_block.png"}, 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}, groups = {cracky=3, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1},
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), sounds = df_underworld_items.sounds.slade,
is_ground_content = false, is_ground_content = false,
} }
if invulnerable then if invulnerable then
@ -154,7 +152,7 @@ if minetest.get_modpath("stairs") then
{"dfcaverns_slade_brick.png"}, {"dfcaverns_slade_brick.png"},
S("Slade Stair"), S("Slade Stair"),
S("Slade Slab"), S("Slade Slab"),
default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }) df_underworld_items.sounds.slade
) )
if invulnerable then if invulnerable then

View File

@ -6,10 +6,13 @@ local ice_sprite_usage
local ice_sprite_bottle_desc local ice_sprite_bottle_desc
local ice_sprite_bottle_usage local ice_sprite_bottle_usage
local node_name_glass_bottle = df_dependencies.node_name_glass_bottle
local node_name_firefly = df_dependencies.node_name_fireflies
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then
ice_sprite_desc = S("Ice sprites are mysterious glowing insect-like creatures that appear to be made partly of crystallized water.") ice_sprite_desc = S("Ice sprites are mysterious glowing insect-like creatures that appear to be made partly of crystallized water.")
if minetest.get_modpath("vessels") then if node_name_glass_bottle then
if minetest.get_modpath("fireflies") then if node_name_firefly then
ice_sprite_usage = S("Ice sprites can be caught with nets and placed in bottles as sources of light and freezing cold.") ice_sprite_usage = S("Ice sprites can be caught with nets and placed in bottles as sources of light and freezing cold.")
end end
ice_sprite_bottle_desc = S("A bottle containing a captured ice sprite.") ice_sprite_bottle_desc = S("A bottle containing a captured ice sprite.")
@ -104,7 +107,7 @@ minetest.register_node("ice_sprites:hidden_ice_sprite", {
}) })
-- ice sprite in a bottle -- ice sprite in a bottle
if minetest.get_modpath("vessels") then if node_name_glass_bottle then
minetest.register_node("ice_sprites:ice_sprite_bottle", { minetest.register_node("ice_sprites:ice_sprite_bottle", {
description = S("Ice Sprite in a Bottle"), description = S("Ice Sprite in a Bottle"),
@ -151,7 +154,7 @@ minetest.register_node("ice_sprites:ice_sprite_bottle", {
end end
if ice_sprite_pos then if ice_sprite_pos then
minetest.set_node(pos, {name = "vessels:glass_bottle"}) minetest.set_node(pos, {name = node_name_glass_bottle})
minetest.set_node(ice_sprite_pos, {name = "ice_sprites:ice_sprite"}) minetest.set_node(ice_sprite_pos, {name = "ice_sprites:ice_sprite"})
minetest.get_node_timer(ice_sprite_pos):start(1) minetest.get_node_timer(ice_sprite_pos):start(1)
end end
@ -161,6 +164,6 @@ minetest.register_node("ice_sprites:ice_sprite_bottle", {
minetest.register_craft( { minetest.register_craft( {
type = "shapeless", type = "shapeless",
output = "ice_sprites:ice_sprite_bottle", output = "ice_sprites:ice_sprite_bottle",
recipe = {"ice_sprites:ice_sprite", "vessels:glass_bottle"} recipe = {"ice_sprites:ice_sprite", node_name_glass_bottle}
}) })
end end