mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-12 11:10:28 +01:00
add seal block
This commit is contained in:
parent
d352178244
commit
ff44fb87c2
@ -411,33 +411,15 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
||||
local shaftwallmin = {x=minp.x, y=math.max(underside_height-3, minp.y), z=minp.z}
|
||||
local shaftwallmax = {x=minp.x+4, y=math.min(floor_height, maxp.y), z=minp.z+4}
|
||||
local shaftcoremin = {x=minp.x+1, y=shaftwallmin.y, z=minp.z+1}
|
||||
local shaftcoremax = {x=minp.x+3, y=math.min(floor_height+3, maxp.y), z=minp.z+3}
|
||||
|
||||
minetest.debug("minp,maxp")
|
||||
minetest.debug(minetest.pos_to_string(minp))
|
||||
minetest.debug(minetest.pos_to_string(maxp))
|
||||
|
||||
minetest.debug("wall")
|
||||
minetest.debug(minetest.pos_to_string(shaftwallmin))
|
||||
minetest.debug(minetest.pos_to_string(shaftwallmax))
|
||||
|
||||
for wall_vi in area:iterp(shaftwallmin, shaftwallmax) do
|
||||
data[wall_vi] = c_slade_block
|
||||
end
|
||||
|
||||
minetest.debug("core")
|
||||
minetest.debug(minetest.pos_to_string(shaftcoremin))
|
||||
minetest.debug(minetest.pos_to_string(shaftcoremax))
|
||||
|
||||
for core_vi in area:iterp(shaftcoremin, shaftcoremax) do
|
||||
data[core_vi] = c_air
|
||||
end
|
||||
|
||||
local puzzle_seal_y = floor_height-1--math.floor((floor_height+underside_height)/2)
|
||||
local puzzle_seal_y = floor_height
|
||||
if puzzle_seal_y < maxp.y and puzzle_seal_y > minp.y then
|
||||
for seal_vi in area:iter(minp.x+1, puzzle_seal_y, minp.z+1, minp.x+3, puzzle_seal_y, minp.z+3) do
|
||||
data[seal_vi] = c_slade_block
|
||||
for seal_vi in area:iter(minp.x+1, puzzle_seal_y, minp.z+1, minp.x+3, puzzle_seal_y+2, minp.z+3) do
|
||||
data[seal_vi] = c_air
|
||||
end
|
||||
puzzle_init = {x=minp.x+2, y=puzzle_seal_y, z=minp.z+2}
|
||||
end
|
||||
@ -454,6 +436,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
vm:write_to_map()
|
||||
|
||||
if puzzle_init ~= nil then
|
||||
minetest.set_node(puzzle_init, {name="df_underworld_items:puzzle_seal"})
|
||||
end
|
||||
|
||||
if bones_loot_path then
|
||||
|
@ -9,3 +9,5 @@ dofile(modpath.."/crystals_amethyst.lua")
|
||||
dofile(modpath.."/glow_stone.lua")
|
||||
dofile(modpath.."/slade.lua")
|
||||
dofile(modpath.."/glowing_pit_plasma.lua")
|
||||
|
||||
dofile(modpath.."/puzzle_seal.lua")
|
386
df_underworld_items/models/underworld_seal.obj
Normal file
386
df_underworld_items/models/underworld_seal.obj
Normal file
@ -0,0 +1,386 @@
|
||||
# Blender v2.81 (sub 16) OBJ File: 'seal.blend'
|
||||
# www.blender.org
|
||||
mtllib underworld_seal.mtl
|
||||
o Cylinder
|
||||
v -0.292175 -0.501653 -0.705374
|
||||
v -0.292175 0.501653 -0.705374
|
||||
v 0.292175 -0.501653 -0.705374
|
||||
v 0.292175 0.501653 -0.705374
|
||||
v 0.705374 -0.501653 -0.292175
|
||||
v 0.705374 0.501653 -0.292175
|
||||
v 0.705374 -0.501653 0.292175
|
||||
v 0.705374 0.501653 0.292175
|
||||
v 0.292175 -0.501653 0.705374
|
||||
v 0.292175 0.501653 0.705374
|
||||
v -0.292175 -0.501653 0.705374
|
||||
v -0.292175 0.501653 0.705374
|
||||
v -0.705374 -0.501653 0.292175
|
||||
v -0.705374 0.501653 0.292175
|
||||
v -0.705374 -0.501653 -0.292175
|
||||
v -0.705374 0.501653 -0.292175
|
||||
v -0.146088 -0.752480 -0.352687
|
||||
v 0.146088 -0.752480 -0.352687
|
||||
v 0.146088 0.752480 -0.352687
|
||||
v -0.146088 0.752480 -0.352687
|
||||
v 0.352687 -0.752480 -0.146088
|
||||
v 0.352687 0.752480 -0.146088
|
||||
v 0.352687 -0.752480 0.146088
|
||||
v 0.352687 0.752480 0.146088
|
||||
v 0.146088 -0.752480 0.352687
|
||||
v 0.146088 0.752480 0.352687
|
||||
v -0.146088 -0.752480 0.352687
|
||||
v -0.146088 0.752480 0.352687
|
||||
v -0.352687 -0.752480 0.146088
|
||||
v -0.352687 0.752480 0.146088
|
||||
v -0.352687 -0.752480 -0.146088
|
||||
v -0.352687 0.752480 -0.146088
|
||||
v -0.000000 0.501653 -0.705374
|
||||
v 0.498774 0.501653 -0.498774
|
||||
v 0.705374 0.501653 0.000000
|
||||
v 0.498774 0.501653 0.498774
|
||||
v -0.000000 0.501653 0.705374
|
||||
v -0.498775 0.501653 0.498775
|
||||
v -0.705374 0.501653 0.000000
|
||||
v -0.498775 0.501653 -0.498774
|
||||
v -0.093326 0.852022 -0.690234
|
||||
v -0.000000 -0.501653 -0.705374
|
||||
v 0.498774 -0.501653 -0.498774
|
||||
v 0.705374 -0.501653 0.000000
|
||||
v 0.498774 -0.501653 0.498774
|
||||
v -0.000000 -0.501653 0.705374
|
||||
v -0.498775 -0.501653 0.498775
|
||||
v -0.705374 -0.501653 0.000000
|
||||
v -0.498775 -0.501653 -0.498774
|
||||
v -0.000000 -0.501653 -0.705374
|
||||
v 0.292175 -0.501653 -0.705374
|
||||
v 0.292175 -0.501653 -0.705374
|
||||
v -0.000000 0.501653 -0.705374
|
||||
v -0.292175 0.501653 -0.705374
|
||||
v -0.292175 0.501653 -0.705374
|
||||
v -0.292175 -0.501653 -0.705374
|
||||
v -0.292175 -0.501653 -0.705374
|
||||
v 0.292175 0.501653 -0.705374
|
||||
v 0.292175 0.501653 -0.705374
|
||||
v 0.498774 -0.501653 -0.498774
|
||||
v 0.705374 -0.501653 -0.292175
|
||||
v 0.705374 -0.501653 -0.292175
|
||||
v 0.498774 0.501653 -0.498774
|
||||
v 0.705374 0.501653 -0.292175
|
||||
v 0.705374 0.501653 -0.292175
|
||||
v 0.705374 -0.501653 0.000000
|
||||
v 0.705374 -0.501653 0.292175
|
||||
v 0.705374 -0.501653 0.292175
|
||||
v 0.705374 0.501653 0.000000
|
||||
v 0.705374 0.501653 0.292175
|
||||
v 0.705374 0.501653 0.292175
|
||||
v 0.498774 -0.501653 0.498774
|
||||
v 0.292175 -0.501653 0.705374
|
||||
v 0.292175 -0.501653 0.705374
|
||||
v 0.498774 0.501653 0.498774
|
||||
v 0.292175 0.501653 0.705374
|
||||
v 0.292175 0.501653 0.705374
|
||||
v -0.000000 -0.501653 0.705374
|
||||
v -0.292175 -0.501653 0.705374
|
||||
v -0.292175 -0.501653 0.705374
|
||||
v -0.000000 0.501653 0.705374
|
||||
v -0.292175 0.501653 0.705374
|
||||
v -0.292175 0.501653 0.705374
|
||||
v -0.498775 -0.501653 0.498775
|
||||
v -0.705374 -0.501653 0.292175
|
||||
v -0.705374 -0.501653 0.292175
|
||||
v -0.498775 0.501653 0.498775
|
||||
v -0.705374 0.501653 0.292175
|
||||
v -0.705374 0.501653 0.292175
|
||||
v -0.705374 -0.501653 0.000000
|
||||
v -0.705374 -0.501653 -0.292175
|
||||
v -0.705374 -0.501653 -0.292175
|
||||
v -0.705374 0.501653 0.000000
|
||||
v -0.705374 0.501653 -0.292175
|
||||
v -0.705374 0.501653 -0.292175
|
||||
v -0.498775 -0.501653 -0.498774
|
||||
v -0.498775 0.501653 -0.498774
|
||||
v -0.146088 -0.752480 -0.352687
|
||||
v 0.146088 -0.752480 -0.352687
|
||||
v 0.146088 0.752480 -0.352687
|
||||
v -0.146088 0.752480 -0.352687
|
||||
v 0.352687 -0.752480 -0.146088
|
||||
v 0.352687 0.752480 -0.146088
|
||||
v 0.352687 -0.752480 0.146088
|
||||
v 0.352687 0.752480 0.146088
|
||||
v 0.146088 -0.752480 0.352687
|
||||
v 0.146088 0.752480 0.352687
|
||||
v -0.146088 -0.752480 0.352687
|
||||
v -0.146088 0.752480 0.352687
|
||||
v -0.352687 -0.752480 0.146088
|
||||
v -0.352687 0.752480 0.146088
|
||||
v -0.352687 -0.752480 -0.146088
|
||||
v -0.352687 0.752480 -0.146088
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 1.250000 0.000000
|
||||
vt 1.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.500000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 1.250000 0.000000
|
||||
vt 1.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 1.250000 0.000000
|
||||
vt 1.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.250000 1.000000
|
||||
vt 1.250000 0.000000
|
||||
vt 1.250000 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.000000 0.292893
|
||||
vt 0.707106 0.000000
|
||||
vt 1.000000 0.707107
|
||||
vt 1.000000 0.292893
|
||||
vt 0.292893 0.000000
|
||||
vt 0.000000 0.707106
|
||||
vt 0.707107 1.000000
|
||||
vt 0.292893 1.000000
|
||||
vt 0.000000 0.707106
|
||||
vt 0.292893 0.000000
|
||||
vt 1.000000 0.292893
|
||||
vt 0.292893 1.000000
|
||||
vt 0.707107 1.000000
|
||||
vt 1.000000 0.707107
|
||||
vt 0.707106 0.000000
|
||||
vt 0.000000 0.292893
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.500000 0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.7071 0.0000 -0.7071
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.7071 0.0000 0.7071
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.7071 0.0000 0.7071
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn -0.7071 0.0000 -0.7071
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.4098 -0.8149 -0.4098
|
||||
vn 0.4098 0.8149 0.4098
|
||||
vn -0.5796 -0.8149 0.0000
|
||||
vn 0.4098 0.8149 -0.4098
|
||||
vn -0.5796 0.8149 0.0000
|
||||
vn 0.0000 -0.8149 0.5796
|
||||
vn 0.0000 0.8149 0.5796
|
||||
vn 0.5796 -0.8149 0.0000
|
||||
vn -0.4098 -0.8149 -0.4098
|
||||
vn 0.0000 -0.8149 -0.5796
|
||||
vn 0.5796 0.8149 0.0000
|
||||
vn -0.4098 0.8149 -0.4098
|
||||
vn 0.0000 0.8149 -0.5796
|
||||
vn -0.4098 -0.8149 0.4098
|
||||
vn -0.4098 0.8149 0.4098
|
||||
vn 0.4098 -0.8149 0.4098
|
||||
g Cylinder_Cylinder_Sides
|
||||
usemtl Sides
|
||||
s off
|
||||
f 53/1/1 51/2/1 50/3/1
|
||||
f 63/4/2 61/5/2 60/6/2
|
||||
f 70/7/3 67/8/3 66/9/3
|
||||
f 75/10/4 73/11/4 72/12/4
|
||||
f 81/13/5 79/14/5 78/15/5
|
||||
f 87/16/6 85/17/6 84/18/6
|
||||
f 93/19/7 91/20/7 90/21/7
|
||||
f 97/22/8 57/23/8 96/24/8
|
||||
f 50/3/1 56/25/1 54/26/1
|
||||
f 53/1/1 58/27/1 51/2/1
|
||||
f 50/3/1 54/26/1 53/1/1
|
||||
f 60/6/2 3/28/2 59/29/2
|
||||
f 63/4/2 64/30/2 61/5/2
|
||||
f 60/6/2 59/29/2 63/4/2
|
||||
f 66/9/3 5/31/3 69/32/3
|
||||
f 5/31/3 65/33/3 69/32/3
|
||||
f 69/32/3 70/7/3 66/9/3
|
||||
f 72/12/4 7/34/4 71/35/4
|
||||
f 75/10/4 76/36/4 73/11/4
|
||||
f 72/12/4 71/35/4 75/10/4
|
||||
f 78/15/5 9/37/5 77/38/5
|
||||
f 81/13/5 82/39/5 79/14/5
|
||||
f 78/15/5 77/38/5 81/13/5
|
||||
f 84/18/6 11/40/6 83/41/6
|
||||
f 87/16/6 88/42/6 85/17/6
|
||||
f 84/18/6 83/41/6 87/16/6
|
||||
f 90/21/7 13/43/7 89/44/7
|
||||
f 93/19/7 94/45/7 91/20/7
|
||||
f 90/21/7 89/44/7 93/19/7
|
||||
f 96/24/8 15/46/8 95/47/8
|
||||
f 97/22/8 2/48/8 57/23/8
|
||||
f 96/24/8 95/47/8 97/22/8
|
||||
g Cylinder_Cylinder_Caps
|
||||
usemtl Caps
|
||||
f 111/49/9 26/50/9 103/51/9
|
||||
f 104/52/10 108/53/10 112/54/10
|
||||
f 103/51/9 100/55/9 111/49/9
|
||||
f 100/55/9 101/56/9 111/49/9
|
||||
f 101/56/9 113/57/9 111/49/9
|
||||
f 111/49/9 109/58/9 26/50/9
|
||||
f 26/50/9 105/59/9 103/51/9
|
||||
f 112/54/10 98/60/10 99/61/10
|
||||
f 99/61/10 21/62/10 104/52/10
|
||||
f 104/52/10 106/63/10 108/53/10
|
||||
f 108/53/10 110/64/10 112/54/10
|
||||
f 112/54/10 99/61/10 104/52/10
|
||||
g Cylinder_Cylinder_Edges
|
||||
usemtl Edges
|
||||
f 43/65/11 102/66/11 18/67/11
|
||||
f 36/68/12 24/69/12 107/70/12
|
||||
f 48/71/13 31/72/13 29/73/13
|
||||
f 34/74/14 19/75/14 22/76/14
|
||||
f 39/77/15 30/78/15 32/79/15
|
||||
f 46/80/16 27/81/16 25/82/16
|
||||
f 37/83/17 107/84/17 28/85/17
|
||||
f 44/86/18 23/87/18 102/88/18
|
||||
f 49/89/19 17/90/19 31/91/19
|
||||
f 42/92/20 18/93/20 17/94/20
|
||||
f 35/95/21 22/96/21 24/97/21
|
||||
f 40/98/22 32/99/22 20/100/22
|
||||
f 33/101/23 20/102/23 19/103/23
|
||||
f 47/104/24 29/105/24 27/106/24
|
||||
f 38/107/25 28/108/25 30/109/25
|
||||
f 45/110/26 25/111/26 23/112/26
|
||||
f 107/70/12 10/113/12 36/68/12
|
||||
f 36/68/12 8/114/12 24/69/12
|
||||
f 22/76/14 6/115/14 34/74/14
|
||||
f 34/74/14 4/116/14 19/75/14
|
||||
f 32/79/15 16/117/15 39/77/15
|
||||
f 39/77/15 14/118/15 30/78/15
|
||||
f 28/85/17 12/119/17 37/83/17
|
||||
f 37/83/17 10/120/17 107/84/17
|
||||
f 24/97/21 8/121/21 35/95/21
|
||||
f 35/95/21 6/122/21 22/96/21
|
||||
f 20/100/22 55/123/22 40/98/22
|
||||
f 40/98/22 16/124/22 32/99/22
|
||||
f 19/103/23 4/125/23 33/101/23
|
||||
f 33/101/23 55/126/23 20/102/23
|
||||
f 30/109/25 14/127/25 38/107/25
|
||||
f 38/107/25 12/128/25 28/108/25
|
||||
f 18/67/11 52/129/11 43/65/11
|
||||
f 43/65/11 62/130/11 102/66/11
|
||||
f 29/73/13 86/131/13 48/71/13
|
||||
f 48/71/13 92/132/13 31/72/13
|
||||
f 25/82/16 74/133/16 46/80/16
|
||||
f 46/80/16 80/134/16 27/81/16
|
||||
f 102/88/18 62/135/18 44/86/18
|
||||
f 44/86/18 68/136/18 23/87/18
|
||||
f 31/91/19 92/137/19 49/89/19
|
||||
f 49/89/19 1/138/19 17/90/19
|
||||
f 17/94/20 1/139/20 42/92/20
|
||||
f 42/92/20 52/140/20 18/93/20
|
||||
f 27/106/24 80/141/24 47/104/24
|
||||
f 47/104/24 86/142/24 29/105/24
|
||||
f 23/112/26 68/143/26 45/110/26
|
||||
f 45/110/26 74/144/26 25/111/26
|
79
df_underworld_items/puzzle_seal.lua
Normal file
79
df_underworld_items/puzzle_seal.lua
Normal file
@ -0,0 +1,79 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
local get_formspec = function(pos, completion)
|
||||
completion = completion or 0.5
|
||||
local formspec =
|
||||
"size[10,10]"
|
||||
.."list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;1,1;3,3;]"
|
||||
.."container[5,0.5]"
|
||||
.."box[0,0;1,5;#0A0000]box[0.1,0.1;0.8,4.8;#000000]box[0.1," .. 0.1 + 4.8*completion ..";0.8,".. 4.8*completion ..";#FFCC22]"
|
||||
.."container_end[]"
|
||||
.."container[1,5.75]list[current_player;main;0,0;8,1;]listring[]"
|
||||
.."list[current_player;main;0,1.25;8,3;8]container_end[]"
|
||||
return formspec
|
||||
end
|
||||
|
||||
local ensure_inventory = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 3*3)
|
||||
end
|
||||
|
||||
local puzzle_seal_def = {
|
||||
description = S("Slade Puzzle Seal"),
|
||||
_doc_items_longdesc = nil,
|
||||
_doc_items_usagehelp = nil,
|
||||
drawtype = "mesh",
|
||||
mesh = "underworld_seal.obj",
|
||||
tiles = {"dfcaverns_slade_block.png", "dfcaverns_slade_block.png^dfcaverns_seal.png", "dfcaverns_slade_block.png"},
|
||||
paramtype = "light",
|
||||
light_source = 12,
|
||||
groups = {immortal=1, stone=1, level=3, slade=1, cracky=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625},
|
||||
},
|
||||
is_ground_content = false,
|
||||
on_blast = function() end,
|
||||
on_construct = function(pos)
|
||||
ensure_inventory(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
--ensure_inventory(pos) -- needed because mapgen doesn't call on_construct
|
||||
local player_name = clicker:get_player_name()
|
||||
minetest.show_formspec(player_name, "df_underworld_items_puzzle_seal:"..minetest.pos_to_string(pos)..":"..player_name, get_formspec(pos))
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
end,
|
||||
}
|
||||
|
||||
if minetest.get_modpath("stairs") then
|
||||
local stair_groups = {level = 3, mese_radiation_shield=1, pit_plasma_resistant=1, slade=1}
|
||||
if invulnerable then
|
||||
stair_groups.immortal = 1
|
||||
else
|
||||
stair_groups.cracky = 3
|
||||
end
|
||||
|
||||
stairs.register_stair(
|
||||
"slade_block",
|
||||
"df_underworld_items:slade_block",
|
||||
stair_groups,
|
||||
{"dfcaverns_slade_block.png"},
|
||||
S("Slade Block Stair"),
|
||||
default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } })
|
||||
)
|
||||
end
|
||||
|
||||
minetest.register_node("df_underworld_items:puzzle_seal", puzzle_seal_def)
|
Loading…
Reference in New Issue
Block a user