Working landing doors, cab doors attempt

This commit is contained in:
2024-08-31 17:17:34 -04:00
parent 399f9a8799
commit ef05f10cef
5 changed files with 135 additions and 89 deletions

View File

@@ -17,7 +17,6 @@ local MovingObjects = require(script:WaitForChild("MovingObjects"))
local TractionRopes = require(script:WaitForChild("TractionRopes"))
local Doors = require(script:WaitForChild("Doors"))
local TagsModule = require(MainDir:WaitForChild("Map"):WaitForChild("Load"):WaitForChild("Tags"))
local DoorEnums = require(MainDir:WaitForChild("Types"):WaitForChild("Enums"):WaitForChild("Doors"))
return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsModule.ElevatorButtons, LanternTags: TagsModule.Lanterns, LandingDoorTags: TagsModule.LandingTags)
local ElevatorModel = TagsConstructor:Request("Elevator_Haughton") :: Model
@@ -25,16 +24,13 @@ return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsMod
local PulleyRopesObject = TagsConstructor:Request("Haughton_Rope_Pulley") :: BasePart
local ElevatorBoxModel = ElevatorModel:WaitForChild("Mover") :: BasePart
--TEMP
local CabDoorsTree = {} :: {BasePart}
local Elevator = InitElevator.constructor(ElevatorBoxModel, Config.Elevator, Leveling)
local MovingObjectsConstructor = MovingObjects.constructor(TagsConstructor)
local ButtonsConstructor = Buttons.constructor(Config.Elevator.Name, ButtonTags, Elevator.Attributes.CurrentFloor)
ButtonsConstructor:InitForElevator(2, ButtonPromptsDistance)
local TractionRopesConstructor = TractionRopes.constructor(CabRopesObject, PulleyRopesObject)
local DoorsConstructor = Doors.constructor(Config.Doors, ElevatorBoxModel, CabDoorsTree, LandingDoorTags)
local DoorsConstructor = Doors.constructor(Config.Doors, ElevatorBoxModel, LandingDoorTags)
local EventsConstructor = Events.constructor(
Elevator,
Config.Elevator,
@@ -47,5 +43,7 @@ return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsMod
EventsConstructor:InitButtons()
task.wait(2)
DoorsConstructor:CloseAtFloorAsync(1)
DoorsConstructor:OpenCabAsync()
task.wait(5)
DoorsConstructor:CloseCabAsync()
end