mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2024-11-16 14:50:18 +01:00
Randomize spawner position (a bit)
This commit is contained in:
parent
1d43f7c06e
commit
84a04cec27
7
init.lua
7
init.lua
|
@ -133,7 +133,14 @@ local function make(pos, brick, sandstone, stone, sand, ptype, room_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local ok, msg, flood_sand = tsm_pyramids.make_room(pos, ptype, room_id)
|
local ok, msg, flood_sand = tsm_pyramids.make_room(pos, ptype, room_id)
|
||||||
|
local r = math.random(1,3)
|
||||||
|
if r == 1 then
|
||||||
add_spawner({x=pos.x+11,y=pos.y+2, z=pos.z+17})
|
add_spawner({x=pos.x+11,y=pos.y+2, z=pos.z+17})
|
||||||
|
elseif r == 2 then
|
||||||
|
add_spawner({x=pos.x+17,y=pos.y+2, z=pos.z+11})
|
||||||
|
else
|
||||||
|
add_spawner({x=pos.x+5,y=pos.y+2, z=pos.z+11})
|
||||||
|
end
|
||||||
make_entrance({x=pos.x,y=pos.y, z=pos.z}, brick, sand, flood_sand)
|
make_entrance({x=pos.x,y=pos.y, z=pos.z}, brick, sand, flood_sand)
|
||||||
minetest.log("action", "Created pyramid at ("..pos.x..","..pos.y..","..pos.z..")")
|
minetest.log("action", "Created pyramid at ("..pos.x..","..pos.y..","..pos.z..")")
|
||||||
return ok, msg
|
return ok, msg
|
||||||
|
|
Loading…
Reference in New Issue
Block a user