Move configs into a single file

This commit is contained in:
2024-09-14 16:37:09 -04:00
parent d6f8bc448f
commit 7bdb7ff28f
4 changed files with 23 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,8 +2,7 @@
--!strict --!strict
local ParentDir = script.Parent local ParentDir = script.Parent
local ElevatorDir = ParentDir.Parent local MainDir = ParentDir.Parent.Parent
local MainDir = ElevatorDir.Parent.Parent
local StorageService = game:GetService("ReplicatedStorage") local StorageService = game:GetService("ReplicatedStorage")
@@ -13,24 +12,22 @@ local ElevatorTypes = require(Types:WaitForChild("Elevator"))
local DoorEnums = require(Types:WaitForChild("Enums"):WaitForChild("Doors")) local DoorEnums = require(Types:WaitForChild("Enums"):WaitForChild("Doors"))
--local SoundEnums = require(Types:WaitForChild("Enums"):WaitForChild("Sounds")) --local SoundEnums = require(Types:WaitForChild("Enums"):WaitForChild("Sounds"))
local ElevatorConfig = {} :: ElevatorTypes.ElevatorConfigurationTable local HaughtonConfig = {} :: ElevatorTypes.ElevatorConfigurationTable
ElevatorConfig.Name = Enums.Elevator.Haughton HaughtonConfig.Name = Enums.Elevator.Haughton
ElevatorConfig.FloorLevelingDistance = 6 HaughtonConfig.FloorLevelingDistance = 6
ElevatorConfig.FloorLeveling3PhaseDistance = 1.5 HaughtonConfig.FloorLeveling3PhaseDistance = 1.5
ElevatorConfig.LevelingVelocity = .5 HaughtonConfig.LevelingVelocity = .5
ElevatorConfig.LevelingVelocitySmoothingTime = 1 HaughtonConfig.LevelingVelocitySmoothingTime = 1
ElevatorConfig.Phase3LevelingVelocity = .5 HaughtonConfig.Phase3LevelingVelocity = .5
ElevatorConfig.ParkedDistance = 0.2 HaughtonConfig.ParkedDistance = .2
ElevatorConfig.ParkedSmoothingTime = 1 HaughtonConfig.ParkedSmoothingTime = 1
ElevatorConfig.Responsiveness = 5 HaughtonConfig.Responsiveness = 5
ElevatorConfig.MaxVelocity = 7 HaughtonConfig.MaxVelocity = 7
ElevatorConfig.MaxVelocitySmoothingTime = 5 HaughtonConfig.MaxVelocitySmoothingTime = 5
HaughtonConfig.Functions = {
ElevatorConfig.Functions = {
ManualTravelStart = true ManualTravelStart = true
} }
HaughtonConfig.Colors = {
ElevatorConfig.Colors = {
ButtonActivated = { ButtonActivated = {
Color = Color3.fromRGB(162,106,76), Color = Color3.fromRGB(162,106,76),
Material = Enum.Material.Neon Material = Enum.Material.Neon
@@ -40,8 +37,7 @@ ElevatorConfig.Colors = {
Material = Enum.Material.SmoothPlastic Material = Enum.Material.SmoothPlastic
} }
} }
HaughtonConfig.Lanterns = {
ElevatorConfig.Lanterns = {
On = { On = {
Up = { Up = {
Color = Color3.fromRGB(44,255,157), Color = Color3.fromRGB(44,255,157),
@@ -67,8 +63,7 @@ ElevatorConfig.Lanterns = {
}, },
} }
} }
HaughtonConfig.Doors = {
local DoorsConfig: ElevatorTypes.DoorsConfig = {
Cab = { Cab = {
Type = DoorEnums.Door.DoubleSpeed, Type = DoorEnums.Door.DoubleSpeed,
Time = 5, Time = 5,
@@ -82,6 +77,5 @@ local DoorsConfig: ElevatorTypes.DoorsConfig = {
} }
return { return {
Elevator = ElevatorConfig, HaughtonConfig = HaughtonConfig
Doors = DoorsConfig
} }

View File

@@ -9,13 +9,13 @@ local MainDir = ElevatorsDir.Parent
local ElevatorSystem = ElevatorsDir:WaitForChild("System") local ElevatorSystem = ElevatorsDir:WaitForChild("System")
local Config = require(ParentDir:WaitForChild("Configs"))
local InitElevator = require(ElevatorSystem) local InitElevator = require(ElevatorSystem)
local ArrowLantern = require(ElevatorSystem:WaitForChild("Lanterns"):WaitForChild("Arrows")) local ArrowLantern = require(ElevatorSystem:WaitForChild("Lanterns"):WaitForChild("Arrows"))
local Buttons = require(ElevatorSystem:WaitForChild("Buttons")) local Buttons = require(ElevatorSystem:WaitForChild("Buttons"))
local TractionRopes = require(ElevatorSystem:WaitForChild("TractionRopes")) local TractionRopes = require(ElevatorSystem:WaitForChild("TractionRopes"))
local Doors = require(ElevatorSystem:WaitForChild("Doors")) local Doors = require(ElevatorSystem:WaitForChild("Doors"))
local Events = require(script:WaitForChild("Events")) local Events = require(script:WaitForChild("Events"))
local Config = require(script:WaitForChild("Config"))
local Leveling = require(script:WaitForChild("Leveling")) local Leveling = require(script:WaitForChild("Leveling"))
local MovingObjects = require(script:WaitForChild("MovingObjects")) local MovingObjects = require(script:WaitForChild("MovingObjects"))
local TagsModule = require(MainDir:WaitForChild("Map"):WaitForChild("Load"):WaitForChild("Tags")) local TagsModule = require(MainDir:WaitForChild("Map"):WaitForChild("Load"):WaitForChild("Tags"))

View File

@@ -55,7 +55,8 @@ export type ElevatorConfigurationTable = {
LanternChimeLanding: SoundEnums.ElevatorSoundValues, LanternChimeLanding: SoundEnums.ElevatorSoundValues,
}, },
Colors: ButtonColors, Colors: ButtonColors,
Lanterns: Lanterns Lanterns: Lanterns,
Doors: DoorsConfig
} }
export type DoorsConfigProperties = { export type DoorsConfigProperties = {