Skip to content

Commit

Permalink
Flexability
Browse files Browse the repository at this point in the history
  • Loading branch information
gdr1461 authored Jul 4, 2024
1 parent c0c7cf5 commit 4eb9321
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Source/MainModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type MainModule = {

__version: string,
__LoaderVersion: string,
__Configured: boolean,

__PlayerCalls: {() -> ()},
__Connections: {
Expand All @@ -38,6 +39,8 @@ export type MainModule = {
Configure: (self: MainModule) -> (),
GetAPI: (self: MainModule) -> API.APIModule,
GetSignals: (self: MainModule) -> Signals.SignalManager,
GetParser: (self: MainModule) -> Parser.ParserModule,
RunOnComplete: (self: MainModule, Function: (Variables: any) -> (), Variables: any) -> (),
SetNewSettings: (self: MainModule, NewSettings: {any}) -> (),

Listen: (self: MainModule, player: Player) -> Connections,
Expand Down Expand Up @@ -69,14 +72,15 @@ local GAdmin: MainModule = getmetatable(Proxy)
GAdmin.__metatable = "[GAdmin]: Metatable methods are restricted."
GAdmin.__type = "GAdmin Main"

GAdmin.__version = "v1.1.0"
GAdmin.__version = "v1.1.1"
GAdmin.__LoaderVersion = "v1.0.0"

GAdmin.__PlayerCalls = {}
GAdmin.__Connections = {
Listeners = {}
}

GAdmin.__Configured = false
GAdmin.GetDataActions = {
ClientCommands = function(player)
return Data.ClientCommandsList
Expand Down Expand Up @@ -512,6 +516,7 @@ function GAdmin:Configure(LoaderVersion)
self.__Topics[Data.Data.Topic](Data.Sent, unpack(Data.Data.Arguments))
end)

self.__Configured = true
print(`[GAdmin]: Game configured to run GAdmin.`)
print("--==")
end
Expand All @@ -525,6 +530,15 @@ function GAdmin:GetSignals()
return Signals
end

function GAdmin:GetParser()
return Parser
end

function GAdmin:RunOnComplete(Function, ...)
repeat task.wait() until self.__Configured
Function(...)
end

function GAdmin:SetNewSettings(NewSettings)
for Key, Value in pairs(Settings) do
if not NewSettings[Key] then
Expand Down

0 comments on commit 4eb9321

Please sign in to comment.