garden/room/sundial_alley.lua

34 lines
658 B
Lua

local room = require("room")
local edge = require("edge")
local sundial = require("obj/sundial")
local keypad = require("obj/keypad")
local door = require("obj/door")
local sign = require("obj/sign")
local m = room:new()
sundial:from{
numbers = {3, 5, 8, 2, 7},
}:install(m, 135, 155)
local d = door:from{
destination = 'Vivarium',
}
d.mousepressed = d.keypadMode
d:install(m, 80, 60)
keypad:from{
code = 35827,
oncorrect = function (self)
d.locked = false
end,
}:install(m, 165, 110)
sign:from{
text = "If you desire to enter, you should follow the shadow"
}:install(m, 160, 80)
edge.set(m, 'down', "Alley")
return m