forked from Minetest/dripstone
Add survival-friendly features
In VoxeLibre, the dripstone can now be broken by players.main
parent
09cf4c332e
commit
c8c11d6539
45
init.lua
45
init.lua
|
@ -34,11 +34,17 @@ local function nodebox_of_size(size)
|
|||
}
|
||||
end
|
||||
|
||||
-- Sounds
|
||||
local dripstone_sounds = nil
|
||||
if mcl_sounds then
|
||||
dripstone_sounds = mcl_sounds.node_sound_stone_defaults()
|
||||
end
|
||||
|
||||
-- Constants
|
||||
local speed_factor = 180
|
||||
local speed_factor = 30
|
||||
local seconds_per_growth = 10 * speed_factor
|
||||
local seconds_per_trickle = 1 * speed_factor
|
||||
local samples_per_interval = 100
|
||||
local samples_per_interval = 10
|
||||
|
||||
-- Namespaced node names
|
||||
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."
|
||||
, tiles = dry_dripstone_tiles
|
||||
, 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,
|
||||
|
@ -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."
|
||||
, tiles = hardened_dripstone_tiles
|
||||
, 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,
|
||||
|
@ -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."
|
||||
, tiles = molten_dripstone_tiles
|
||||
, 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,
|
||||
|
@ -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."
|
||||
, tiles = watered_dripstone_tiles
|
||||
, 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
|
||||
, _doc_items_longdesc = longdesc
|
||||
, tiles = tiles
|
||||
, groups = { pickaxey=2, material_stone=1 }
|
||||
, is_ground_content = true
|
||||
, drop = dry_dripstone_spike
|
||||
, sounds = dripstone_sounds
|
||||
, drawtype = "nodebox"
|
||||
, paramtype = "light"
|
||||
, sunlight_propagates = true
|
||||
, node_box = nodebox_of_size(size)
|
||||
, _mcl_hardness = 1.0 + size / 8
|
||||
, _mcl_blast_resistance = 1 + size / 2
|
||||
, _mcl_silk_touch_drop = true
|
||||
}
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue