mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-24 09:10:19 +01:00
add snareweed "radiant" damage
This commit is contained in:
parent
e756d80134
commit
ac231edaeb
@ -8,4 +8,5 @@ wool?
|
||||
magma_conduits?
|
||||
intllib?
|
||||
doc?
|
||||
simplecrafting_lib?
|
||||
simplecrafting_lib?
|
||||
radiant_damage?
|
@ -15,7 +15,7 @@ minetest.register_alias("subterrane:dry_flowstone", "dfcaverns:dry_flowstone")
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", {
|
||||
dfcaverns.dry_stalagmite_ids = subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", {
|
||||
description = S("Dry Dripstone"),
|
||||
_doc_items_longdesc = dfcaverns.doc.dripstone_desc,
|
||||
_doc_items_usagehelp = dfcaverns.doc.dripstone_usage,
|
||||
@ -39,7 +39,7 @@ minetest.register_node("dfcaverns:dry_flowstone", {
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", {
|
||||
dfcaverns.wet_stalagmite_ids = subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", {
|
||||
description = S("Wet Dripstone"),
|
||||
_doc_items_longdesc = dfcaverns.doc.dripstone_desc,
|
||||
_doc_items_usagehelp = dfcaverns.doc.dripstone_usage,
|
||||
@ -64,7 +64,7 @@ minetest.register_node("dfcaverns:wet_flowstone", {
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:icicle", {
|
||||
dfcaverns.icicle_ids = subterrane.register_stalagmite_nodes("dfcaverns:icicle", {
|
||||
description = S("Icicle"),
|
||||
_doc_items_longdesc = dfcaverns.doc.icicle_desc,
|
||||
_doc_items_usagehelp = dfcaverns.doc.icicle_usage,
|
||||
@ -74,21 +74,3 @@ subterrane.register_stalagmite_nodes("dfcaverns:icicle", {
|
||||
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
local c_dry_stal_1 = minetest.get_content_id("dfcaverns:dry_stal_1") -- thinnest
|
||||
local c_dry_stal_2 = minetest.get_content_id("dfcaverns:dry_stal_2")
|
||||
local c_dry_stal_3 = minetest.get_content_id("dfcaverns:dry_stal_3")
|
||||
local c_dry_stal_4 = minetest.get_content_id("dfcaverns:dry_stal_4") -- thickest
|
||||
dfcaverns.dry_stalagmite_ids = {c_dry_stal_1, c_dry_stal_2, c_dry_stal_3, c_dry_stal_4}
|
||||
local c_wet_stal_1 = minetest.get_content_id("dfcaverns:wet_stal_1") -- thinnest
|
||||
local c_wet_stal_2 = minetest.get_content_id("dfcaverns:wet_stal_2")
|
||||
local c_wet_stal_3 = minetest.get_content_id("dfcaverns:wet_stal_3")
|
||||
local c_wet_stal_4 = minetest.get_content_id("dfcaverns:wet_stal_4") -- thickest
|
||||
dfcaverns.wet_stalagmite_ids = {c_wet_stal_1, c_wet_stal_2, c_wet_stal_3, c_wet_stal_4}
|
||||
local c_icicle_1 = minetest.get_content_id("dfcaverns:icicle_1") -- thinnest
|
||||
local c_icicle_2 = minetest.get_content_id("dfcaverns:icicle_2")
|
||||
local c_icicle_3 = minetest.get_content_id("dfcaverns:icicle_3")
|
||||
local c_icicle_4 = minetest.get_content_id("dfcaverns:icicle_4") -- thickest
|
||||
dfcaverns.icicle_ids = {c_icicle_1, c_icicle_2, c_icicle_3, c_icicle_4}
|
||||
|
@ -8,7 +8,6 @@ minetest.register_node("dfcaverns:snareweed", {
|
||||
_doc_items_usagehelp = dfcaverns.doc.snareweed_usage,
|
||||
tiles = {"default_dirt.png^dfcaverns_snareweed_roots.png", "default_dirt.png"},
|
||||
drawtype="plantlike_rooted",
|
||||
-- paramtype = "light",
|
||||
paramtype2 = "leveled",
|
||||
special_tiles = {{name = "dfcaverns_snareweed.png", tileable_vertical = true}},
|
||||
is_ground_content = true,
|
||||
@ -18,6 +17,21 @@ minetest.register_node("dfcaverns:snareweed", {
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
if minetest.get_modpath("radiant_damage") then
|
||||
radiant_damage.register_radiant_damage({
|
||||
damage_name = "snareweed", -- a string used in logs to identify the type of damage dealt
|
||||
interval = 1, -- number of seconds between each damage check
|
||||
range = 5, -- range of the damage. Can be omitted if inverse_square_falloff is true, in that case it defaults to the range at which 1 point of damage is done.
|
||||
inverse_square_falloff = false, -- if true, damage falls off with the inverse square of the distance. If false, damage is constant within the range.
|
||||
damage = 2, -- number of damage points dealt each interval
|
||||
nodenames = {"dfcaverns:snareweed"}, -- nodes that cause this damage. Same format as the nodenames parameter for minetest.find_nodes_in_area
|
||||
occlusion = false, -- if true, damaging effect only passes through air. Other nodes will cast "shadows".
|
||||
above_only = true, -- if true, damage only propagates directly upward.
|
||||
cumulative = false, -- if true, all nodes within range do damage. If false, only the nearest one does damage.
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
local c_water = minetest.get_content_id("default:water_source")
|
||||
local c_dirt = minetest.get_content_id("default:dirt")
|
||||
local c_snareweed = minetest.get_content_id("dfcaverns:snareweed")
|
||||
|
Loading…
Reference in New Issue
Block a user