Files
Roblox-Elevator-Game/src/server/main/init.server.lua

50 lines
1.7 KiB
Lua

--!optimize 2
--!native
--!strict
local ShowEditorEntities = game:GetService("RunService"):IsServer()
local Storage = game:GetService("ReplicatedStorage")
local Enums = require(Storage:WaitForChild("Enums"))
local Elevators = script:WaitForChild("Elevators")
local Maps = script:WaitForChild("Map")
local Interactions = Maps:WaitForChild("Interactions")
local LightSwitches = require(Interactions:WaitForChild("LightSwitches"))
local Otis1960_Module = require(Elevators:WaitForChild("Otis1960"))
local TagsModule = require(script:WaitForChild("Tags"))
local HideEditorEntities = require(script:WaitForChild("EditorEntities"))
local Lighting_Stuff = require(script:WaitForChild("Lighting"))
local Workspace_Stuff = require(script:WaitForChild("Workspace"))
local StarterPlayer_Stuff = require(script:WaitForChild("StarterPlayer"))
local TagsConstructor = TagsModule.constructor()
print("[DEBUG] Tags=", TagsConstructor.__export)
HideEditorEntities.indexAll(ShowEditorEntities)
TagsConstructor:Nuke()
StarterPlayer_Stuff()
Lighting_Stuff()
Workspace_Stuff()
--Map
local Interactables = TagsConstructor:__Interactables()
print("[DEBUG] Interactables=", Interactables)
--Interactables
local LightSwitchesConstructor = LightSwitches.constructor(Interactables.LightSwitches)
LightSwitchesConstructor:Init()
--Start the elevators
local Buttons = TagsConstructor:__ElevatorButtons()
print("[DEBUG] Buttons=", Buttons)
local Lanterns = TagsConstructor:__ElevatorLanterns()
print("[DEBUG] Lanterns=", Lanterns)
local Otis1960Lanterns = Lanterns[Enums.Elevator.Otis1960]
local Otis1960Buttons = Buttons[Enums.Elevator.Otis1960]
local Otis1960 = Otis1960_Module.constructor(TagsConstructor, Otis1960Buttons, Otis1960Lanterns)