mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
rename everything to .luau extension
This commit is contained in:
73
src/server/main/init.server.luau
Normal file
73
src/server/main/init.server.luau
Normal file
@@ -0,0 +1,73 @@
|
||||
--!optimize 2
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local ShowEditorEntities = true
|
||||
|
||||
local Storage = game:GetService("ReplicatedStorage")
|
||||
|
||||
local _PlayerAdded = require(script:WaitForChild("PlayerAdded"))
|
||||
local Lighting_Stuff = require(script:WaitForChild("Lighting"))
|
||||
|
||||
local Load = script:WaitForChild("Load")
|
||||
local TagsModule = require(Load:WaitForChild("Tags"))
|
||||
local HideEditorEntities = require(Load:WaitForChild("EditorEntities"))
|
||||
local Workspace_Stuff = require(Load:WaitForChild("Workspace"))
|
||||
local StarterPlayer_Stuff = require(Load:WaitForChild("StarterPlayer"))
|
||||
|
||||
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 Enums = require(Storage:WaitForChild("Enums"))
|
||||
|
||||
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 LandingDoors = TagsConstructor:__ElevatorDoors()
|
||||
print("[DEBUG] Elevator Landing Doors=", LandingDoors)
|
||||
|
||||
local Otis1960Lanterns= Lanterns[Enums.Elevator.Otis1960]
|
||||
local Otis1960Buttons = Buttons[Enums.Elevator.Otis1960]
|
||||
local Otis1960LandingDoors = LandingDoors[Enums.Elevator.Otis1960]
|
||||
local Otis1960 = Otis1960_Module.constructor(TagsConstructor, Otis1960Buttons, Otis1960Lanterns, Otis1960LandingDoors)
|
||||
|
||||
task.wait(5)
|
||||
Otis1960:RequestLevel(3)
|
||||
|
||||
Otis1960_Module.Events.Parked.Event:Connect(function()
|
||||
print("Cab parked")
|
||||
task.wait(3)
|
||||
Otis1960:RequestLevel(1)
|
||||
end)
|
||||
|
||||
Otis1960_Module.Events.CabProgression.Event:Connect(function(previousFloor: number?, nextFloor: number)
|
||||
--print("previousFloor=",previousFloor, "nextFloor=",nextFloor)
|
||||
end)
|
||||
|
||||
Otis1960_Module.Events.CabTraveling.Event:Connect(function(Elevator_Position: Vector3, CurrentFloor: number)
|
||||
print("CurrentFloor=",CurrentFloor)
|
||||
end)
|
||||
Reference in New Issue
Block a user