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

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

View File

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

View File

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