mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-30 15:23:02 +00:00
Booby trap redstone nodes in ruined portal (20%)
This commit is contained in:
parent
8fa8a6fe37
commit
bdde99f147
1 changed files with 10 additions and 1 deletions
|
@ -413,7 +413,10 @@ local function ruined_portal_callback(p1, p2, size, rotation, pr)
|
|||
local biome_is_cold = (biome_data.heat < 15) or false
|
||||
local biome_name = minetest.get_biome_name(biome_data.biome)
|
||||
local biome_is_ocean = string.find(biome_name, "ocean") and true or false
|
||||
local r_boobytrapped = pr:next(1, 100)
|
||||
local nodes = minetest.find_nodes_in_area(p1, p2, {
|
||||
"mesecons_pistons:piston_normal_off",
|
||||
"mesecons_pistons:piston_sticky_off",
|
||||
"mcl_core:goldblock",
|
||||
"mcl_stairs:slab_goldblock",
|
||||
"mcl_stairs:slab_goldblock_double",
|
||||
|
@ -546,8 +549,14 @@ local function ruined_portal_callback(p1, p2, size, rotation, pr)
|
|||
end
|
||||
end
|
||||
end
|
||||
-- Booby trap all redstone mechanisms (20%)
|
||||
if r_boobytrapped <= 20 and (
|
||||
"mesecons_pistons:piston_normal_off" == node.name or
|
||||
"mesecons_pistons:piston_sticky_off" == node.name
|
||||
) then
|
||||
node.name = "mcl_tnt:tnt"
|
||||
-- Replace gold with air (30%)
|
||||
if (
|
||||
elseif (
|
||||
"mcl_core:goldblock" == node.name or
|
||||
"mcl_stairs:slab_goldblock" == node.name or
|
||||
"mcl_stairs:slab_goldblock_double" == node.name or
|
||||
|
|
Loading…
Reference in a new issue