pie plate selector and all floor positions specified

This commit is contained in:
2024-03-28 00:51:14 -04:00
parent 4c3aaac0d1
commit dcfc68487a
4 changed files with 51 additions and 10 deletions

View File

@@ -9,8 +9,9 @@ local RS: RunService = game:GetService("RunService")
local TagsModule = require(Storage:WaitForChild("Tags"))
local Leveling = require(script:WaitForChild("Leveling"))
local Doors = require(script:WaitForChild("Doors"))
local Leveling = require(script:WaitForChild("Leveling"))
local Doors = require(script:WaitForChild("Doors"))
local PieplateModule = require(script:WaitForChild("PiePlateSelector"))
local Enums = require(Elevators:WaitForChild("Enums"))
local ElevatorMover = require(Elevators:WaitForChild("Mover"))
@@ -97,6 +98,11 @@ local function HookButtons(self: ClassConstructor, ButtonsConstructor: ButtonTag
self:GoToLevel(DecodedFloor)
end
end)
if DecodedFloor == 10 then
task.wait(5)
self:GoToLevel(DecodedFloor)
end
elseif ButtonNameType == Enums.ButtonTree.Special then
elseif ButtonNameType == Enums.ButtonTree.Landing then
@@ -127,6 +133,7 @@ function Otis1960.constructor(Tags)
self.ProximityButtons = Tags.ProximityElevatorButton :: {Instance}
self.Ropes = Tags["1960_ElevatorPulleyRope"] :: {Instance}
self.PiePlateSelector = Tags.Otis1960_PiePlateSelector :: UnionOperation
self.PiePlatePlates = Tags.Otis1960_PiePlatePlates :: UnionOperation
self.BoxAttachment,
self.BoxAlignPosition,
@@ -134,6 +141,7 @@ function Otis1960.constructor(Tags)
self.ElevatorDoors = Doors.constructor(self.ElevatorBox_1960, self.ElevatorDoor1, self.ElevatorDoor2, self.ElevatorDoorSensor)
self.TractionRopes = TractionRopes.constructor(self.Ropes, self.ElevatorBox_1960, Leveling)
self.PiePlate = PieplateModule.constructor(self.PiePlateSelector, self.PiePlatePlates, self.ElevatorBox_1960)
--Buttons
local ButtonsConstructor = ButtonTags.constructor(Tags, Enums.Elevator.Otis1960)
@@ -150,6 +158,7 @@ end
function Otis1960:__MoveFloors(Level)
local ElevatorBoxCurrentPos = self.ElevatorBox_1960.Position
self.TractionRopes:Moving(Level, 26)
self.PiePlate:test()
self.BoxAlignPosition.Position = Vector3.new(ElevatorBoxCurrentPos.X, Level, ElevatorBoxCurrentPos.Z)
end