mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-15 21:41:53 +00:00
directional based cab call placement, needs tweaked a bit
This commit is contained in:
@@ -161,14 +161,18 @@ function Lanterns:DirectionDown(Enabled)
|
||||
end
|
||||
|
||||
function Lanterns:Toggle(Enabled, Floor)
|
||||
local f = self.LanternsMap[Floor]
|
||||
local FloorLantern = self.LanternsMap[Floor]
|
||||
|
||||
if not Enabled then
|
||||
f.Played = false
|
||||
end
|
||||
if not f.Played then
|
||||
f.Played = true
|
||||
self:Activate(Enabled, false, f, true)
|
||||
if FloorLantern then
|
||||
if not Enabled then
|
||||
FloorLantern.Played = false
|
||||
end
|
||||
if not FloorLantern.Played then
|
||||
FloorLantern.Played = true
|
||||
self:Activate(Enabled, false, FloorLantern, true)
|
||||
end
|
||||
else
|
||||
warn(`Floor Lantern does not exist for floor: {Floor}`, debug.traceback())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user