This commit is contained in:
2024-07-26 00:17:34 -04:00
parent d6b1da04e1
commit f37510422f
7 changed files with 230 additions and 134 deletions

View File

@@ -4,33 +4,11 @@
local Enums = {}
--MACROSSSSSSSSSSS
export type EnumValue = EnumButton | EnumButtonTree | EnumElevator | EnumInteractables | EnumSpecialButton
export type EnumButton = typeof(Enums.Button)
export type EnumButtonTree = typeof(Enums.ButtonTree)
export type EnumElevator = typeof(Enums.Elevator)
export type EnumInteractables = typeof(Enums.InteractType)
export type EnumSpecialButton = typeof(Enums.SpecialButton)
export type ButtonValues = typeof(Enums.Button.Car) |
typeof(Enums.Button.Landing) |
typeof(Enums.Button.Special) |
typeof(Enums.Button.Relay)
export type ButtonTreeValues = typeof(Enums.ButtonTree.Car) |
typeof(Enums.ButtonTree.Landing) |
typeof(Enums.ButtonTree.Special) |
typeof(Enums.ButtonTree.Relays) |
typeof(Enums.ButtonTree.Unknown)
export type SpecialButtonValues = typeof(Enums.SpecialButton.Stop)
export type InteractablesValues = typeof(Enums.InteractType.LightSwitch) |
typeof(Enums.InteractType.Light) |
typeof(Enums.InteractType.LightSource)
export type ElevatorValues = typeof(Enums.Elevator.Otis1960) |
typeof(Enums.Elevator.Haughton)
export type EnumButton = typeof(Enums.Button)
export type ButtonValues = typeof(Enums.Button.Car) | typeof(Enums.Button.Landing) | typeof(Enums.Button.Special) | typeof(Enums.Button.Relay)
Enums.Button = {
Car = "CarButton" :: "CarButton",
Landing = "LandingButton" :: "LandingButton",
@@ -38,6 +16,8 @@ Enums.Button = {
Relay = "RelayButton" :: "RelayButton"
}
export type EnumButtonTree = typeof(Enums.ButtonTree)
export type ButtonTreeValues = typeof(Enums.ButtonTree.Car) | typeof(Enums.ButtonTree.Landing) | typeof(Enums.ButtonTree.Special) | typeof(Enums.ButtonTree.Relays) | typeof(Enums.ButtonTree.Unknown)
Enums.ButtonTree = {
Car = "Car" :: "Car",
Landing = "Landing" :: "Landing",
@@ -46,19 +26,32 @@ Enums.ButtonTree = {
Unknown = "Unknown" :: "Unknown"
}
export type EnumSpecialButton = typeof(Enums.SpecialButton)
export type SpecialButtonValues = typeof(Enums.SpecialButton.Stop)
Enums.SpecialButton = {
Stop = "Stop" :: "Stop"
}
export type EnumElevator = typeof(Enums.Elevator)
export type ElevatorValues = typeof(Enums.Elevator.Otis1960) | typeof(Enums.Elevator.Haughton)
Enums.Elevator = {
Otis1960 = "Otis1960" :: "Otis1960",
Haughton = "Haughton" :: "Haughton"
}
export type EnumInteractables = typeof(Enums.InteractType)
export type InteractablesValues = typeof(Enums.InteractType.LightSwitch) | typeof(Enums.InteractType.Light) | typeof(Enums.InteractType.LightSource)
Enums.InteractType = {
LightSwitch = "LightSwitch" :: "LightSwitch",
Light = "Light" :: "Light",
LightSource = "LightSource" :: "LightSource"
}
return Enums
export type EnumElevatorCallDirections = typeof(Enums.ElevatorCallDirection)
export type ElevatorCallDirectionValues = typeof(Enums.ElevatorCallDirection.Up) | typeof(Enums.ElevatorCallDirection.Down)
Enums.ElevatorCallDirection = {
Up = "Up" :: "Up",
Down = "Down" :: "Down"
}
return Enums

50
src/shared/Output.luau Normal file
View File

@@ -0,0 +1,50 @@
--!optimize 2
--!native
--!strict
local RunService = game:GetService("RunService")
local function printStudio<T...>(...: T...)
if RunService:IsStudio() then
print(...)
end
end
local function printServer<T...>(...: T...)
if RunService:IsServer() then
print(...)
end
end
local function printClient<T...>(...: T...)
if RunService:IsClient() then
print(...)
end
end
local function warnStudio<T...>(...: T...)
if RunService:IsStudio() then
warn(...)
end
end
local function warnServer<T...>(...: T...)
if RunService:IsServer() then
warn(...)
end
end
local function warnClient<T...>(...: T...)
if RunService:IsClient() then
warn(...)
end
end
return {
printStudio = printStudio,
printServer = printServer,
printClient = printClient,
warnStudio = warnStudio,
warnServer = warnServer,
warnClient = warnClient
}