mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-26 19:00:36 +01:00
in anticipation of eventually adding stuff below the Slade, making glowing pit erosion self-limiting.
This commit is contained in:
parent
a1eb415587
commit
5c703563c3
@ -283,9 +283,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local pit_value = nvals_pit[area_pit:index(x,y,z)] * pit.variance
|
||||
local distance = vector.distance({x=x, y=y, z=z}, {x=pit.location.x, y=y, z=pit.location.z}) + pit_value
|
||||
if distance < pit.radius -3 then
|
||||
if y < y_min + 4 then -- make a layer of amethyst at the bottom of the pit to keep the plasma from digging infinitely downward.
|
||||
data[vi] = c_amethyst
|
||||
elseif y < median + floor_displace + wave - pit.depth then
|
||||
if y < median + floor_displace + wave - pit.depth then
|
||||
data[vi] = c_pit_plasma
|
||||
else
|
||||
data[vi] = c_air
|
||||
|
@ -138,9 +138,18 @@ if df_underworld_items.config.destructive_pit_plasma then
|
||||
for y = pos.y-1, pos.y+1 do
|
||||
for z = pos.z-1, pos.z+1 do
|
||||
local test_pos = {x=x, y=y, z=z}
|
||||
if minetest.get_item_group(minetest.get_node(test_pos).name, "pit_plasma_resistant") == 0 then
|
||||
local node_name = minetest.get_node(test_pos).name
|
||||
if minetest.get_item_group(node_name, "pit_plasma_resistant") == 0 then
|
||||
sparkle_pos = test_pos
|
||||
minetest.set_node(test_pos, {name="air"})
|
||||
if minetest.get_item_group(node_name, "stone") > 0 then
|
||||
if math.random() < 0.66 then
|
||||
minetest.set_node(test_pos, {name="df_underworld_items:glow_amethyst"})
|
||||
else
|
||||
minetest.set_node(test_pos, {name="default:lava_source"})
|
||||
end
|
||||
else
|
||||
minetest.set_node(test_pos, {name="air"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user