1
0
Fork 0

Add survival-friendly features

In VoxeLibre, the dripstone can now be broken by players.
main
Bram van den Heuvel 2024-08-28 16:04:46 +02:00
parent 09cf4c332e
commit c8c11d6539
2 changed files with 44 additions and 3 deletions

View File

@ -34,11 +34,17 @@ local function nodebox_of_size(size)
} }
end end
-- Sounds
local dripstone_sounds = nil
if mcl_sounds then
dripstone_sounds = mcl_sounds.node_sound_stone_defaults()
end
-- Constants -- Constants
local speed_factor = 180 local speed_factor = 30
local seconds_per_growth = 10 * speed_factor local seconds_per_growth = 10 * speed_factor
local seconds_per_trickle = 1 * speed_factor local seconds_per_trickle = 1 * speed_factor
local samples_per_interval = 100 local samples_per_interval = 10
-- Namespaced node names -- Namespaced node names
local dry_dripstone_block = "noordstar_dripstone:dripstone_block" local dry_dripstone_block = "noordstar_dripstone:dripstone_block"
@ -195,6 +201,13 @@ minetest.register_node(dry_dripstone_block,
, _doc_items_longdesc = "Dripstone block that can suck up liquids above it and creates stalactites below it." , _doc_items_longdesc = "Dripstone block that can suck up liquids above it and creates stalactites below it."
, tiles = dry_dripstone_tiles , tiles = dry_dripstone_tiles
, drawtype = "normal" , drawtype = "normal"
, groups = { pickaxey=2, material_stone=1 }
, is_ground_content = true
, drop = dry_dripstone_spike
, sounds = dripstone_sounds
, _mcl_hardness = 2
, _mcl_blast_resistance = 5
, _mcl_silk_touch_drop = true
} }
) )
minetest.register_node(hardened_dripstone_block, minetest.register_node(hardened_dripstone_block,
@ -202,6 +215,13 @@ minetest.register_node(hardened_dripstone_block,
, _doc_items_longdesc = "Dripstone block that is no longer able to absorb liquids above it." , _doc_items_longdesc = "Dripstone block that is no longer able to absorb liquids above it."
, tiles = hardened_dripstone_tiles , tiles = hardened_dripstone_tiles
, drawtype = "normal" , drawtype = "normal"
, groups = { pickaxey=2, material_stone=1 }
, is_ground_content = true
, drop = dry_dripstone_spike
, sounds = dripstone_sounds
, _mcl_hardness = 2
, _mcl_blast_resistance = 5
, _mcl_silk_touch_drop = true
} }
) )
minetest.register_node(molten_dripstone_block, minetest.register_node(molten_dripstone_block,
@ -209,6 +229,13 @@ minetest.register_node(molten_dripstone_block,
, _doc_items_longdesc = "A dripstone block that has absorbed some lava, allowing it to form a stalactite." , _doc_items_longdesc = "A dripstone block that has absorbed some lava, allowing it to form a stalactite."
, tiles = molten_dripstone_tiles , tiles = molten_dripstone_tiles
, drawtype = "normal" , drawtype = "normal"
, groups = { pickaxey=2, material_stone=1 }
, is_ground_content = true
, drop = dry_dripstone_spike
, sounds = dripstone_sounds
, _mcl_hardness = 2
, _mcl_blast_resistance = 5
, _mcl_silk_touch_drop = true
} }
) )
minetest.register_node(watered_dripstone_block, minetest.register_node(watered_dripstone_block,
@ -216,6 +243,13 @@ minetest.register_node(watered_dripstone_block,
, _doc_items_longdesc = "A dripstone block that has absorbed some water, allowing it to form a stalactite." , _doc_items_longdesc = "A dripstone block that has absorbed some water, allowing it to form a stalactite."
, tiles = watered_dripstone_tiles , tiles = watered_dripstone_tiles
, drawtype = "normal" , drawtype = "normal"
, groups = { pickaxey=2, material_stone=1 }
, is_ground_content = true
, drop = dry_dripstone_spike
, sounds = dripstone_sounds
, _mcl_hardness = 2
, _mcl_blast_resistance = 5
, _mcl_silk_touch_drop = true
} }
) )
@ -224,10 +258,17 @@ local function make_dripstone(name, desc, longdesc, tiles, size)
{ description = desc { description = desc
, _doc_items_longdesc = longdesc , _doc_items_longdesc = longdesc
, tiles = tiles , tiles = tiles
, groups = { pickaxey=2, material_stone=1 }
, is_ground_content = true
, drop = dry_dripstone_spike
, sounds = dripstone_sounds
, drawtype = "nodebox" , drawtype = "nodebox"
, paramtype = "light" , paramtype = "light"
, sunlight_propagates = true , sunlight_propagates = true
, node_box = nodebox_of_size(size) , node_box = nodebox_of_size(size)
, _mcl_hardness = 1.0 + size / 8
, _mcl_blast_resistance = 1 + size / 2
, _mcl_silk_touch_drop = true
} }
) )
end end

View File

@ -3,4 +3,4 @@ description=Add stalactites and stalagmites to your game.
author=Noordstar author=Noordstar
title=Noordstar Dripstone title=Noordstar Dripstone
depends= depends=
optional_depends=default,mcl_cauldrons,mcl_core optional_depends=default,mcl_cauldrons,mcl_core,mcl_sounds