mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2024-12-22 15:30:19 +01:00
Fix broken desert stone pyramid trap
This commit is contained in:
parent
461326ad32
commit
7b0c42954f
66
room.lua
66
room.lua
@ -542,58 +542,54 @@ local layout_traps_template = {
|
||||
|
||||
local code_sandstone = {
|
||||
[" "] = "air",
|
||||
["s"] = "sandstone",
|
||||
["S"] = "sandstonebrick",
|
||||
["1"] = "deco_stone1",
|
||||
["2"] = "deco_stone2",
|
||||
["3"] = "deco_stone3",
|
||||
["^"] = "chest",
|
||||
["<"] = "chest",
|
||||
[">"] = "chest",
|
||||
["v"] = "chest",
|
||||
["~"] = "lava_source",
|
||||
["t"] = "trap",
|
||||
["s"] = "default:sandstone",
|
||||
["S"] = "default:sandstonebrick",
|
||||
["1"] = "tsm_pyramids:deco_stone1",
|
||||
["2"] = "tsm_pyramids:deco_stone2",
|
||||
["3"] = "tsm_pyramids:deco_stone3",
|
||||
["^"] = "default:chest",
|
||||
["<"] = "default:chest",
|
||||
[">"] = "default:chest",
|
||||
["v"] = "default:chest",
|
||||
["~"] = "default:lava_source",
|
||||
["t"] = "tsm_pyramids:trap",
|
||||
}
|
||||
local code_desert_sandstone = table.copy(code_sandstone)
|
||||
code_desert_sandstone["s"] = "desert_sandstone"
|
||||
code_desert_sandstone["1"] = "deco_stone4"
|
||||
code_desert_sandstone["2"] = "deco_stone5"
|
||||
code_desert_sandstone["3"] = "deco_stone6"
|
||||
code_desert_sandstone["S"] = "desert_sandstone_brick"
|
||||
code_desert_sandstone["t"] = "desert_trap"
|
||||
code_desert_sandstone["s"] = "default:desert_sandstone"
|
||||
code_desert_sandstone["1"] = "tsm_pyramids:deco_stone4"
|
||||
code_desert_sandstone["2"] = "tsm_pyramids:deco_stone5"
|
||||
code_desert_sandstone["3"] = "tsm_pyramids:deco_stone6"
|
||||
code_desert_sandstone["S"] = "default:desert_sandstone_brick"
|
||||
code_desert_sandstone["t"] = "tsm_pyramids:desert_trap"
|
||||
|
||||
local code_desert_stone = table.copy(code_sandstone)
|
||||
code_desert_stone["s"] = "desert_stone_block"
|
||||
code_desert_stone["1"] = "desert_stone_block"
|
||||
code_desert_stone["2"] = "desert_stone_block"
|
||||
code_desert_stone["3"] = "desert_stone_block"
|
||||
code_desert_stone["S"] = "desert_stonebrick"
|
||||
-- TODO: test
|
||||
code_desert_stone["s"] = "default:desert_stone_block"
|
||||
code_desert_stone["1"] = "default:desert_stone_block"
|
||||
code_desert_stone["2"] = "default:desert_stone_block"
|
||||
code_desert_stone["3"] = "default:desert_stone_block"
|
||||
code_desert_stone["S"] = "default:desert_stonebrick"
|
||||
-- TODO: Add desert stone trap?
|
||||
code_desert_stone["t"] = "air"
|
||||
|
||||
local function replace(str, iy, code_table, deco, column_style)
|
||||
local out = "default:"
|
||||
if iy < 4 and (str == "<" or str == ">" or str == "^" or str == "v") then str = " " end
|
||||
if column_style == 1 or column_style == 2 then
|
||||
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
|
||||
if iy == 0 and str == "s" then str = deco[1] end
|
||||
if iy == 3 and str == "s" then str = deco[2] end
|
||||
elseif column_style == 3 then
|
||||
if iy == 0 and str == "s" then out = "tsm_pyramids:" str = deco[1] end
|
||||
if iy == 2 and str == "s" then out = "tsm_pyramids:" str = deco[2] end
|
||||
if iy == 0 and str == "s" then str = deco[1] end
|
||||
if iy == 2 and str == "s" then str = deco[2] end
|
||||
elseif column_style == 4 then
|
||||
if iy == 2 and str == "s" then out = "tsm_pyramids:" str = deco[1] end
|
||||
if iy == 2 and str == "s" then str = deco[1] end
|
||||
end
|
||||
if str == " " then out = "" end
|
||||
return out..code_table[str]
|
||||
return code_table[str]
|
||||
end
|
||||
|
||||
local function replace2(str, iy, code_table)
|
||||
local out = "default:"
|
||||
if iy == 0 and str == "~" then out = "tsm_pyramids:" str = "t"
|
||||
if iy == 0 and str == "~" then str = "t"
|
||||
elseif iy < 3 and str == "~" then str = " " end
|
||||
|
||||
if str == " " then out = "" end
|
||||
return out..code_table[str]
|
||||
return code_table[str]
|
||||
end
|
||||
|
||||
function tsm_pyramids.make_room(pos, stype, room_id)
|
||||
|
Loading…
Reference in New Issue
Block a user