new elevator structure and working Haughton relays!

This commit is contained in:
2024-08-15 01:34:57 -04:00
parent 9d081a2084
commit 7bae24c918
25 changed files with 348 additions and 171 deletions

View File

@@ -3,8 +3,7 @@
--!strict
local MapDir = script.Parent.Parent
local MainDir = MapDir.Parent
local LoadDir = MainDir:WaitForChild("Load")
local LoadDir = MapDir:WaitForChild("Load")
local Storage = game:GetService("ReplicatedStorage")
@@ -46,7 +45,7 @@ end
local EnumMaterials: {Enum.Material} = Enum.Material:GetEnumItems()
local EnumMaterialsNames: {string} = {}
--Convert it all to string values, couldnt figure out any hacks to make it a true one liner
for k: number, v: Enum.Material in EnumMaterials do
EnumMaterialsNames[k] = v.Name
end
@@ -96,7 +95,7 @@ end
local function ToggleSwitch(EnabledState: boolean, LightProperties: LightProperties, Sounds: boolean)
SwitchAnimation(EnabledState, LightProperties)
if Sounds and LightProperties.ClickSound then
LightProperties.ClickSound:Play()
end
@@ -125,7 +124,7 @@ function Lights:Init()
LightProperties.Lights and
LightProperties.LightSources and
LightProperties.ActivatedMaterial and
LightProperties.DeactivatedMaterial
LightProperties.DeactivatedMaterial
then
if LightProperties.Enabled then
EnabledState = true
@@ -136,7 +135,7 @@ function Lights:Init()
local ActivatedMaterial = table.find(EnumMaterialsNames, LightProperties.ActivatedMaterial)
local DeactivatedMaterial = table.find(EnumMaterialsNames, LightProperties.DeactivatedMaterial)
if not ActivatedMaterial then
ActivatedMaterial = 1
warn()
@@ -162,4 +161,4 @@ function Lights:Init()
end
end
return Lights
return Lights