Elevator doors can now open while the elevator is moving

This commit is contained in:
2024-09-10 22:51:14 -04:00
parent 25226cf32b
commit f7366e831a
4 changed files with 151 additions and 79 deletions

View File

@@ -29,10 +29,11 @@ return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsMod
ButtonsConstructor:InitForElevator(2, ButtonPromptsDistance)
local TractionRopesConstructor = TractionRopes.constructor(CabRopesObject, PulleyRopesObject)
local DoorsConstructor = Doors.constructor(Config.Doors, ElevatorBoxModel, LandingDoorTags)
local DoorsConstructor = Doors.constructor(Leveling, ElevatorBoxModel, Config.Doors, LandingDoorTags)
local EventsConstructor = Events.constructor(
Elevator,
Config.Elevator,
DoorsConstructor,
ButtonsConstructor,
ElevatorBoxModel,
Leveling,
@@ -40,9 +41,7 @@ return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsMod
TractionRopesConstructor
)
EventsConstructor:InitButtons()
task.wait(2)
DoorsConstructor:OpenCabAsync()
task.wait(5)
DoorsConstructor:CloseCabAsync()
if DoorsConstructor:OpenAtFloor(Elevator.Attributes.CurrentFloor.Value) then
DoorsConstructor:OpenCabAsync()
end
end