mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51: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 StorageService = game:GetService("ReplicatedStorage")
|
||||||
|
|
||||||
local DoorEnums = require(EnumsDir:WaitForChild("Doors"))
|
|
||||||
local Enums = require(StorageService:WaitForChild("Enums"))
|
local Enums = require(StorageService:WaitForChild("Enums"))
|
||||||
local SoundEnums = require(EnumsDir:WaitForChild("Sounds"))
|
local SoundEnums = require(EnumsDir:WaitForChild("Sounds"))
|
||||||
|
|
||||||
export type ButtonProperties = {
|
export type TravelTypes = "Traction" | "Hydraulic"
|
||||||
Color: Color3,
|
export type DoorSpeeds = "SingleSpeed" | "DoubleSpeed" | "TripleSpeed"
|
||||||
Material: Enum.Material
|
export type DoorLocations = "Cab" | "Landing"
|
||||||
}
|
|
||||||
|
|
||||||
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 ElevatorConfigurationTable = {
|
export type ElevatorConfigurationTable = {
|
||||||
Name: Enums.ElevatorValues,
|
Name: Enums.ElevatorValues,
|
||||||
|
TravelType: TravelTypes,
|
||||||
Responsiveness: number,
|
Responsiveness: number,
|
||||||
MaxVelocity: number,
|
MaxVelocity: number,
|
||||||
MaxVelocitySmoothingTime: number,
|
MaxVelocitySmoothingTime: number,
|
||||||
@@ -46,7 +27,6 @@ export type ElevatorConfigurationTable = {
|
|||||||
LevelingVelocity: number,
|
LevelingVelocity: number,
|
||||||
LevelingVelocitySmoothingTime: number,
|
LevelingVelocitySmoothingTime: number,
|
||||||
Phase3LevelingVelocity: number,
|
Phase3LevelingVelocity: number,
|
||||||
|
|
||||||
Functions: {
|
Functions: {
|
||||||
ManualTravelStart: boolean,
|
ManualTravelStart: boolean,
|
||||||
},
|
},
|
||||||
@@ -58,13 +38,30 @@ export type ElevatorConfigurationTable = {
|
|||||||
Lanterns: Lanterns,
|
Lanterns: Lanterns,
|
||||||
Doors: DoorsConfig
|
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 = {
|
export type DoorsConfigProperties = {
|
||||||
Type: DoorEnums.DoorEnumValues,
|
Type: DoorSpeeds,
|
||||||
Time: number,
|
Time: number,
|
||||||
Goal: Vector3
|
Goal: Vector3
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DoorsConfig = {
|
export type DoorsConfig = {
|
||||||
Cab: DoorsConfigProperties,
|
Cab: DoorsConfigProperties,
|
||||||
Landing: 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