light switch work and new prompt system

This commit is contained in:
2024-04-14 21:40:04 -04:00
parent f670e19c3c
commit 0fa054f97d
8 changed files with 256 additions and 90 deletions

View File

@@ -0,0 +1,48 @@
--!optimize 2
--!native
--!strict
local MapDir = script.Parent
local MainDir = MapDir.Parent
local TagService = require(MainDir:WaitForChild("TagService"))
type LightCallback = (Player: Player) -> ()
type ClassConstructor = typeof(setmetatable({} :: Constructor_Return_Props, {} :: Impl_Constructor))
type Impl_Constructor = {
__index: Impl_Constructor,
constructor: Constructor_Fun,
--Class functions
AddHook: (self: ClassConstructor, Callback: LightCallback) -> (),
Enable: (self: ClassConstructor) -> (),
Disable: (self: ClassConstructor) -> ()
}
type Constructor_Fun = (LightSwitches: TagService.LightSwitchTree) -> ClassConstructor
type Constructor_Return_Props = {
LightSwitches: TagService.LightSwitchTree
}
local Lights = {} :: Impl_Constructor
Lights.__index = Lights
function Lights.constructor(LightSwitches)
return setmetatable({
LightSwitches = LightSwitches
}, Lights)
end
function Lights:AddHook(Callback)
end
function Lights:Enable()
end
function Lights:Disable()
end
return Lights