mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
new elevator structure and working Haughton relays!
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user