2019-08-20 00:27:25 +02:00
|
|
|
-- ROOM LAYOUTS
|
|
|
|
|
|
|
|
local room_types = {
|
|
|
|
--[[
|
|
|
|
-- Empty room
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," "
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]]
|
|
|
|
-- Pillar room
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","c"," ","c"," ","c"," ","c"," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" ","c"," ","c"," ","c"," ","c"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," "
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- Hieroglyph walls
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"s","s","s","s","s","s","s","s","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
" "," "," "," ","c"," "," "," ","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s","s","s","s","s","s","s","s","s"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- 4 large pillars
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," "
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- hidden room
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","s","S","s","S","s"," "," ",
|
|
|
|
" "," ","S"," "," "," ","S"," "," ",
|
|
|
|
" "," ","s"," ","c"," ","s"," ","c",
|
|
|
|
" "," ","S"," "," "," ","S"," "," ",
|
|
|
|
" "," ","s","S","s","S","s"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," "
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- spiral 1
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","S","S","S","S","S","S","S"," ",
|
|
|
|
" ","S"," "," "," "," "," ","S"," ",
|
|
|
|
" ","S"," ","s","s","s"," ","S"," ",
|
|
|
|
" ","S"," ","s","c","s"," ","S"," ",
|
|
|
|
"S","S"," ","s"," ","s"," ","S"," ",
|
|
|
|
"S","S"," ","s"," "," "," ","S"," ",
|
|
|
|
"c","S"," ","S","S","S","S","S"," ",
|
|
|
|
" ","S"," "," "," "," "," "," "," "
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- spiral 2
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","S","S","S","S","S","S","S"," ",
|
|
|
|
" "," "," ","s"," "," "," ","S"," ",
|
|
|
|
"S","S"," ","s"," ","s"," ","S"," ",
|
|
|
|
" ","S"," ","s","c","s"," ","S"," ",
|
|
|
|
" ","S"," ","s","s","s"," ","S"," ",
|
|
|
|
" ","S"," "," "," "," "," ","S"," ",
|
|
|
|
" ","S","S","S","S","S","S","S"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," "
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- pillar mania
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," ","c"," ","c"," ","c"," ","c",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," ","c"," ","c"," ","c"," ","c",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- plusses
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
" "," ","s","c"," ","c","s"," "," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" "," ","s"," "," "," ","s"," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," ","s"," "," "," ","s"," "," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" "," ","s","c"," ","c","s"," "," ",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- diamond
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"c","s","s","s","s","s","s","s","s",
|
|
|
|
"s","s","s"," "," "," ","s","s","s",
|
|
|
|
"s","s"," "," "," "," "," ","s","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
" "," "," "," "," "," "," ","c","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s","s"," "," "," "," "," ","s","s",
|
|
|
|
"s","s","s"," "," "," ","s","s","s",
|
|
|
|
"c","s","s","s","s","s","s","s","s",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- hallway
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S"," "," "," "," ","S","S","S"," ",
|
|
|
|
"S","c","c","S"," ","S","S","c"," ",
|
|
|
|
"S","S","S","S"," ","S","S","c"," ",
|
|
|
|
"S","S","S","S"," ","S","S","S"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","S","S","S"," ","S","S","S","S",
|
|
|
|
" ","c","S","S"," ","S","S","S","S",
|
|
|
|
" ","c","S","S"," ","S","c","c","S",
|
|
|
|
" ","S","S","S"," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- hallway 2
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","c"," "," "," "," ",
|
|
|
|
"S","S","S","S","S","c","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","c","S","S"," ",
|
|
|
|
"S","S","S","S","c"," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- hallway 3
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S"," "," "," "," ",
|
|
|
|
"S","S","S","S","s","c"," "," "," ",
|
|
|
|
"S","s","S","s","S","s","S"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
"S","s","S","s","S","s","S"," "," ",
|
|
|
|
"S","S","S","S","s","c"," "," "," ",
|
|
|
|
"S","S","S","S","S"," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- hallway 4
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S","c","S","S","S",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"s","S","s","S","s","S","s","S","s",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
"s","S","s","S","s","S","s","S","s",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"S","S","S","S","S","c","S","S","S",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- tiny
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S","S","S","S","c",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S"," "," "," ","S","S"," ",
|
|
|
|
" "," "," "," ","c"," ","S","S"," ",
|
|
|
|
"S","S","S"," "," "," ","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S"," ",
|
|
|
|
"S","S","S","S","S","S","S","S","c",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- small
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"S","S"," ","c"," ","c"," ","S","S",
|
|
|
|
"S","S","c"," "," "," ","c","S"," ",
|
|
|
|
" "," "," "," ","s"," "," ","S"," ",
|
|
|
|
"S","S","c"," "," "," ","c","S"," ",
|
|
|
|
"S","S"," ","c"," ","c"," ","S","S",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- small 2
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","S","S","S","S","S","S","S"," ",
|
|
|
|
" ","S"," "," ","c"," "," ","S"," ",
|
|
|
|
"S","S"," "," "," "," "," ","S"," ",
|
|
|
|
" "," "," "," "," "," ","c","S"," ",
|
|
|
|
"S","S"," "," "," "," "," ","S"," ",
|
|
|
|
" ","S"," "," ","c"," "," ","S"," ",
|
|
|
|
" ","S","S","S","S","S","S","S"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- simple
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- big pillar
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," "," ","s","s","s"," "," "," ",
|
|
|
|
" "," ","c","s","S","s","c"," "," ",
|
|
|
|
" "," "," ","s","s","s"," "," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- pacman
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," ","s","s","s"," "," "," ",
|
|
|
|
" "," ","s","s","c","s","s"," "," ",
|
|
|
|
" "," ","s","c"," "," "," "," "," ",
|
|
|
|
" "," ","s","s","c","s","s"," "," ",
|
|
|
|
" "," "," ","s","s","s"," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- the wall
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S","S","S"," ","c",
|
|
|
|
"s","s","s","s","s","S","S"," ","s",
|
|
|
|
"s"," "," "," "," ","s","S"," ","c",
|
|
|
|
"s"," "," "," "," ","s","S"," ","s",
|
|
|
|
" "," "," "," ","c","s","S"," ","c",
|
|
|
|
"s"," "," "," "," ","s","S"," ","s",
|
|
|
|
"s"," "," "," "," ","s","S"," ","c",
|
|
|
|
"s","s","s","s","s","s","S"," ","s",
|
|
|
|
"S","S","S","S","S","S","S"," ","c",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- split
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," ","c"," ","c"," "," "," ",
|
|
|
|
" "," "," ","s"," ","s"," "," "," ",
|
|
|
|
" "," "," ","c"," ","c"," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- 4 small pillars
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," "," "," ","s"," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","c","s"," "," "," ","s","c"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," ","s"," "," "," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- 6 pillars
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
" "," ","s"," ","s"," ","s"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","s"," ","s"," ","s"," "," ",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- stripes
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" ","S","c","S","c","S","c","S","c",
|
|
|
|
" ","S"," ","S"," ","S"," ","S"," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" ","S"," ","S"," ","S"," ","S"," ",
|
|
|
|
" ","S","c","S","c","S","c","S","c",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- inside
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," "," "," "," "," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," ","s","S","s"," "," "," ",
|
|
|
|
" "," "," ","S","c"," "," "," "," ",
|
|
|
|
" "," "," ","s","S","s"," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s"," "," "," "," "," ","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- 1 chest
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," ","c"," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- 2 chests
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","c",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- X
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
"s","s","c"," "," "," ","c","s","s",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
" "," ","s","s"," ","s","s"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","s","s"," ","s","s"," "," ",
|
|
|
|
" ","s","s"," "," "," ","s","s"," ",
|
|
|
|
"s","s","c"," "," "," ","c","s","s",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- split 2
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"S","S","S"," "," "," "," "," "," ",
|
|
|
|
"S","S","S"," "," "," "," "," "," ",
|
|
|
|
"S","S","S"," "," ","c","c","c","c",
|
|
|
|
" "," "," "," "," ","s","s","s","s",
|
|
|
|
"S","S","S"," "," ","c","c","c","c",
|
|
|
|
"S","S","S"," "," "," "," "," "," ",
|
|
|
|
"S","S","S"," "," "," "," "," "," ",
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- split 3
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","c"," ","c"," ","c"," ","c"," ",
|
|
|
|
" ","s"," ","s"," ","s"," ","s"," ",
|
|
|
|
" ","c"," ","c"," ","c"," ","c"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- diamond 2
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S","S"," "," "," "," "," ","S","S",
|
|
|
|
"S"," "," "," ","s"," "," "," ","S",
|
|
|
|
" "," ","c","S","S","S","c"," "," ",
|
|
|
|
" "," ","S","S","S","S","S"," "," ",
|
|
|
|
" ","s","S","S","S","S","S","s"," ",
|
|
|
|
" "," ","S","S","S","S","S"," "," ",
|
|
|
|
" "," ","c","S","S","S","c"," "," ",
|
|
|
|
"S"," "," "," ","s"," "," "," ","S",
|
|
|
|
"S","S"," "," "," "," "," ","S","S",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- ultra pillars
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s","c","s"," ","s","c","s"," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" ","s","s","s"," ","s","s","s"," ",
|
|
|
|
" ","s","c","s"," ","s","c","s"," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- vstripes
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"S"," "," "," "," "," "," "," "," ",
|
|
|
|
"S"," "," ","c"," "," ","c"," "," ",
|
|
|
|
"S"," "," ","s"," "," ","s"," "," ",
|
|
|
|
"S"," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," ","s"," "," ","s"," "," ",
|
|
|
|
"S"," "," "," "," "," "," "," "," ",
|
|
|
|
"S"," "," ","s"," "," ","s"," "," ",
|
|
|
|
"S"," "," ","c"," "," ","c"," "," ",
|
|
|
|
"S"," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- sides
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
"s"," ","s"," ","s"," ","s"," ","s",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," "," "," "," "," "," "," ","s",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
"s"," "," "," "," "," "," "," ","s",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
"s"," ","s"," ","s"," ","s"," ","s",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
-- 9 pillars
|
|
|
|
{
|
|
|
|
style = "yrepeat",
|
|
|
|
layout = {
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
" "," ","s"," ","s"," ","s"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","s"," ","s"," ","s"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
" "," ","s"," ","s"," ","s"," "," ",
|
|
|
|
" "," ","c"," ","c"," ","c"," "," ",
|
|
|
|
" "," "," "," "," "," "," "," "," ",
|
|
|
|
},
|
|
|
|
traps = true,
|
|
|
|
},
|
|
|
|
|
|
|
|
|
2013-09-26 01:37:24 +02:00
|
|
|
|
2019-08-19 18:38:48 +02:00
|
|
|
}
|
2013-10-01 14:37:40 +02:00
|
|
|
|
2019-08-20 00:27:25 +02:00
|
|
|
local layout_traps
|
2019-08-19 19:41:20 +02:00
|
|
|
local layout_traps_template = {
|
|
|
|
"S","S","S","S","S","S","S","S","S",
|
|
|
|
"?","S","?","S","?","S","?","S","S",
|
|
|
|
"?","S","?","S","?","S","?","S","S",
|
|
|
|
"?","?","?","?","?","?","?","?","S",
|
|
|
|
"?","?","?","?","?","?","?","?","S", -- << entrance on left side
|
|
|
|
"?","?","?","?","?","?","?","?","S",
|
|
|
|
"?","S","?","S","?","S","?","S","S",
|
|
|
|
"?","S","?","S","?","S","?","S","S",
|
|
|
|
"S","S","S","S","S","S","S","S","S"
|
|
|
|
}
|
|
|
|
|
2018-05-25 00:23:05 +02:00
|
|
|
local code_sandstone = {
|
2019-08-19 18:38:48 +02:00
|
|
|
[" "] = "air",
|
2018-05-25 00:23:05 +02:00
|
|
|
["s"] = "sandstone",
|
2019-08-19 18:38:48 +02:00
|
|
|
["S"] = "sandstonebrick",
|
2018-05-25 00:23:05 +02:00
|
|
|
["1"] = "deco_stone1",
|
|
|
|
["2"] = "deco_stone2",
|
|
|
|
["3"] = "deco_stone3",
|
|
|
|
["c"] = "chest",
|
2019-08-19 18:38:48 +02:00
|
|
|
["~"] = "lava_source",
|
2018-05-25 00:23:05 +02:00
|
|
|
["t"] = "trap",
|
|
|
|
}
|
|
|
|
local code_desert = table.copy(code_sandstone)
|
|
|
|
code_desert["s"] = "desert_sandstone"
|
|
|
|
code_desert["1"] = "deco_stone4"
|
|
|
|
code_desert["2"] = "deco_stone5"
|
|
|
|
code_desert["3"] = "deco_stone6"
|
2019-08-19 18:38:48 +02:00
|
|
|
code_desert["S"] = "desert_sandstone_brick"
|
2019-08-19 17:26:05 +02:00
|
|
|
code_desert["t"] = "desert_trap"
|
2013-09-26 01:37:24 +02:00
|
|
|
|
2018-05-25 00:34:33 +02:00
|
|
|
local function replace(str, iy, code_table, deco)
|
2013-09-26 01:37:24 +02:00
|
|
|
local out = "default:"
|
2019-08-19 18:38:48 +02:00
|
|
|
if iy < 4 and str == "c" then str = " " end
|
2018-05-25 00:34:33 +02:00
|
|
|
if iy == 0 and str == "s" then out = "tsm_pyramids:" str = deco[1] end
|
|
|
|
if iy == 3 and str == "s" then out = "tsm_pyramids:" str = deco[2] end
|
2019-08-19 18:38:48 +02:00
|
|
|
if str == " " then out = "" end
|
2018-05-25 00:23:05 +02:00
|
|
|
return out..code_table[str]
|
2013-09-26 01:37:24 +02:00
|
|
|
end
|
|
|
|
|
2018-05-25 00:23:05 +02:00
|
|
|
local function replace2(str, iy, code_table)
|
2013-10-01 14:37:40 +02:00
|
|
|
local out = "default:"
|
2019-08-19 18:38:48 +02:00
|
|
|
if iy == 0 and str == "~" then out = "tsm_pyramids:" str = "t"
|
|
|
|
elseif iy < 3 and str == "~" then str = " " end
|
2013-10-01 14:37:40 +02:00
|
|
|
|
2019-08-19 18:38:48 +02:00
|
|
|
if str == " " then out = "" end
|
2018-05-25 00:23:05 +02:00
|
|
|
return out..code_table[str]
|
2013-10-01 14:37:40 +02:00
|
|
|
end
|
|
|
|
|
2019-08-19 18:06:55 +02:00
|
|
|
function tsm_pyramids.make_room(pos, stype)
|
2018-05-25 00:23:05 +02:00
|
|
|
local code_table = code_sandstone
|
|
|
|
if stype == "desert" then
|
|
|
|
code_table = code_desert
|
|
|
|
end
|
2018-05-25 00:34:33 +02:00
|
|
|
-- Select random deco block
|
|
|
|
local deco_ids = {"1", "2", "3"}
|
|
|
|
local deco = {}
|
|
|
|
for i=1, 2 do
|
|
|
|
local r = math.random(1, #deco_ids)
|
|
|
|
table.insert(deco, deco_ids[r])
|
|
|
|
table.remove(deco_ids, r)
|
|
|
|
end
|
2018-05-25 00:23:05 +02:00
|
|
|
local hole = {x=pos.x+7,y=pos.y+5, z=pos.z+7}
|
2019-08-20 00:27:25 +02:00
|
|
|
local r = math.random(1, #room_types)
|
|
|
|
local room = room_types[r]
|
|
|
|
if room.style == "yrepeat" then
|
|
|
|
for iy=0,4,1 do
|
|
|
|
for ix=0,8,1 do
|
|
|
|
for iz=0,8,1 do
|
|
|
|
local n_str = room.layout[tonumber(ix*9+iz+1)]
|
|
|
|
local p2 = 0
|
|
|
|
if n_str == "c" then
|
|
|
|
if ix < 4 then p2 = 1
|
|
|
|
elseif ix == 4 and iz == 0 then
|
|
|
|
p2 = 2
|
|
|
|
elseif ix == 4 and iz > 0 then
|
|
|
|
p2 = 0
|
|
|
|
else
|
|
|
|
p2 = 3
|
|
|
|
end
|
|
|
|
tsm_pyramids.fill_chest({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz})
|
|
|
|
end
|
|
|
|
minetest.set_node({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz}, {name=replace(n_str, iy, code_table, deco), param2=p2})
|
2016-12-30 14:22:38 +01:00
|
|
|
end
|
2013-09-26 01:37:24 +02:00
|
|
|
end
|
|
|
|
end
|
2019-08-20 00:27:25 +02:00
|
|
|
else
|
|
|
|
minetest.log("error", "Invalid pyramid room style! room_types index="..r)
|
|
|
|
end
|
|
|
|
if room.traps then
|
|
|
|
tsm_pyramids.make_traps(pos, stype)
|
2013-09-26 01:37:24 +02:00
|
|
|
end
|
|
|
|
end
|
2013-10-01 14:37:40 +02:00
|
|
|
|
2019-08-19 19:41:20 +02:00
|
|
|
local shuffle_traps = function(chance)
|
|
|
|
layout_traps = table.copy(layout_traps_template)
|
|
|
|
for a=1, #layout_traps do
|
|
|
|
if layout_traps[a] == "?" then
|
|
|
|
if math.random(1,100) <= chance then
|
|
|
|
layout_traps[a] = "~"
|
|
|
|
else
|
|
|
|
layout_traps[a] = "S"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-08-19 18:06:55 +02:00
|
|
|
function tsm_pyramids.make_traps(pos, stype)
|
2018-05-25 00:23:05 +02:00
|
|
|
local code_table = code_sandstone
|
|
|
|
if stype == "desert" then
|
|
|
|
code_table = code_desert
|
|
|
|
end
|
2019-08-19 19:41:20 +02:00
|
|
|
shuffle_traps(math.random(10,100))
|
2018-05-25 00:23:05 +02:00
|
|
|
local hole = {x=pos.x+7,y=pos.y, z=pos.z+7}
|
2016-12-30 14:22:38 +01:00
|
|
|
for iy=0,4,1 do
|
|
|
|
for ix=0,8,1 do
|
|
|
|
for iz=0,8,1 do
|
2019-08-19 19:41:20 +02:00
|
|
|
local n_str = layout_traps[tonumber(ix*9+iz+1)]
|
2016-12-30 14:22:38 +01:00
|
|
|
local p2 = 0
|
2018-05-25 00:23:05 +02:00
|
|
|
minetest.set_node({x=hole.x+ix,y=hole.y-iy,z=hole.z+iz}, {name=replace2(n_str, iy, code_table), param2=p2})
|
2016-12-30 14:22:38 +01:00
|
|
|
end
|
2013-10-01 14:37:40 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|