mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
Move types to Map directory and remove Doors Enums
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,35 +7,16 @@ local EnumsDir = ParentDir:WaitForChild("Enums")
|
||||
|
||||
local StorageService = game:GetService("ReplicatedStorage")
|
||||
|
||||
local DoorEnums = require(EnumsDir:WaitForChild("Doors"))
|
||||
local Enums = require(StorageService:WaitForChild("Enums"))
|
||||
local SoundEnums = require(EnumsDir:WaitForChild("Sounds"))
|
||||
|
||||
export type ButtonProperties = {
|
||||
Color: Color3,
|
||||
Material: Enum.Material
|
||||
}
|
||||
|
||||
export type ButtonColors = {
|
||||
ButtonActivated: ButtonProperties,
|
||||
ButtonDeactivated: ButtonProperties,
|
||||
}
|
||||
|
||||
export type LanternProperties = ButtonProperties & {Time: number}
|
||||
|
||||
export type Lanterns = {
|
||||
On: {
|
||||
Up: LanternProperties,
|
||||
Down: LanternProperties
|
||||
},
|
||||
Off: {
|
||||
Up: LanternProperties,
|
||||
Down: LanternProperties
|
||||
}
|
||||
}
|
||||
export type TravelTypes = "Traction" | "Hydraulic"
|
||||
export type DoorSpeeds = "SingleSpeed" | "DoubleSpeed" | "TripleSpeed"
|
||||
export type DoorLocations = "Cab" | "Landing"
|
||||
|
||||
export type ElevatorConfigurationTable = {
|
||||
Name: Enums.ElevatorValues,
|
||||
TravelType: TravelTypes,
|
||||
Responsiveness: number,
|
||||
MaxVelocity: number,
|
||||
MaxVelocitySmoothingTime: number,
|
||||
@@ -46,7 +27,6 @@ export type ElevatorConfigurationTable = {
|
||||
LevelingVelocity: number,
|
||||
LevelingVelocitySmoothingTime: number,
|
||||
Phase3LevelingVelocity: number,
|
||||
|
||||
Functions: {
|
||||
ManualTravelStart: boolean,
|
||||
},
|
||||
@@ -58,13 +38,30 @@ export type ElevatorConfigurationTable = {
|
||||
Lanterns: Lanterns,
|
||||
Doors: DoorsConfig
|
||||
}
|
||||
|
||||
export type LanternProperties = ButtonProperties & {Time: number}
|
||||
export type ButtonProperties = {
|
||||
Color: Color3,
|
||||
Material: Enum.Material
|
||||
}
|
||||
export type ButtonColors = {
|
||||
ButtonActivated: ButtonProperties,
|
||||
ButtonDeactivated: ButtonProperties,
|
||||
}
|
||||
export type Lanterns = {
|
||||
On: {
|
||||
Up: LanternProperties,
|
||||
Down: LanternProperties
|
||||
},
|
||||
Off: {
|
||||
Up: LanternProperties,
|
||||
Down: LanternProperties
|
||||
}
|
||||
}
|
||||
export type DoorsConfigProperties = {
|
||||
Type: DoorEnums.DoorEnumValues,
|
||||
Type: DoorSpeeds,
|
||||
Time: number,
|
||||
Goal: Vector3
|
||||
}
|
||||
|
||||
export type DoorsConfig = {
|
||||
Cab: DoorsConfigProperties,
|
||||
Landing: DoorsConfigProperties
|
||||
@@ -1,26 +0,0 @@
|
||||
--!optimize 2
|
||||
--!strict
|
||||
|
||||
local DoorEnums = {}
|
||||
|
||||
export type DoorEnums = typeof(DoorEnums.Door)
|
||||
export type SingleSpeed = "SingleSpeed"
|
||||
export type DoubleSpeed = "DoubleSpeed"
|
||||
export type TripleSpeed = "TripleSpeed"
|
||||
export type DoorEnumValues = SingleSpeed | DoubleSpeed | TripleSpeed
|
||||
DoorEnums.Door = {
|
||||
SingleSpeed = "SingleSpeed" :: SingleSpeed,
|
||||
DoubleSpeed = "DoubleSpeed" :: DoubleSpeed,
|
||||
TripleSpeed = "TripleSpeed" :: TripleSpeed
|
||||
}
|
||||
|
||||
export type DoorLocationEnums = typeof(DoorEnums.Door)
|
||||
export type Cab = "Cab"
|
||||
export type Landing = "Landing"
|
||||
export type DoorLocationValues = Cab | Landing
|
||||
DoorEnums.DoorLocation = {
|
||||
Cab = "Cab" :: Cab,
|
||||
Landing = "Landing" :: Landing
|
||||
}
|
||||
|
||||
return DoorEnums
|
||||
Reference in New Issue
Block a user