Working car button system, need to figure out some phantom data on the relay algorithm events for hall station buttons to recognize and pick up the heading direction

This commit is contained in:
2024-08-25 02:33:36 -04:00
parent 7a2169ea4a
commit f32cb30df8
20 changed files with 479 additions and 265 deletions

View File

@@ -12,21 +12,29 @@ local Config = require(script:WaitForChild("Config"))
local Buttons = require(script:WaitForChild("Buttons"))
local Leveling = require(script:WaitForChild("Leveling"))
local MovingObjects = require(script:WaitForChild("MovingObjects"))
local TractionRopes = require(script:WaitForChild("TractionRopes"))
local TagsModule = require(MainDir:WaitForChild("Map"):WaitForChild("Load"):WaitForChild("Tags"))
return function(TagsConstructor: TagsModule.TagsConstructor, ButtonTags: TagsModule.ElevatorButtons, LanternTags: TagsModule.Lanterns, LandingDoorTags: TagsModule.LandingTags)
local ElevatorModel = TagsConstructor:Request("Elevator_Haughton") :: Model
local CabRopesObject = TagsConstructor:Request("Haughton_Rope_Cab") :: BasePart
local PulleyRopesObject = TagsConstructor:Request("Haughton_Rope_Pulley") :: BasePart
local ElevatorBoxModel = ElevatorModel:WaitForChild("Mover") :: BasePart
local Elevator = InitElevator.constructor(ElevatorBoxModel, Config, Leveling)
local MovingObjectsConstructor = MovingObjects.constructor(TagsConstructor)
local ButtonsConstructor = Buttons.constructor(Config.Name, ButtonTags, Elevator.Attributes.CurrentFloor)
local EventsConstructor = Events.constructor(Elevator, Config, Elevator.Events, Elevator.Attributes, ButtonsConstructor.Events, ElevatorBoxModel, Leveling, MovingObjectsConstructor)
local TractionRopesConstructor = TractionRopes.constructor(CabRopesObject, PulleyRopesObject)
local EventsConstructor = Events.constructor(
Elevator,
Config,
ButtonsConstructor,
ElevatorBoxModel,
Leveling,
MovingObjectsConstructor,
TractionRopesConstructor
)
EventsConstructor:Elevator()
EventsConstructor:Buttons()
EventsConstructor:InitButtons()
ButtonsConstructor:InitForElevator(2, Vector3.new(-.05,0,0))
-- task.wait(3)
-- Elevator:RequestLevelAsync(7, "Down")
end