lib structure overhaul
restructured lib portion to match modules also edited community bridges onplayerunload fire to accept the passed src as it was otherwise nil
This commit is contained in:
1 parent
0b67e4b029
commit
8fd5de2d4e
36 files changed
+459
-210
No files matched your search
@@ -0,0 +1,25 @@
|
||||
Prints = Prints or {}
|
||||
local function printMessage(level, color, message)
|
||||
if type(message) == 'table' then
|
||||
message = json.encode(message)
|
||||
end
|
||||
print(color .. '[' .. level .. ']:', message)
|
||||
end
|
||||
|
||||
Prints.Info = function(message)
|
||||
printMessage('INFO', '^5', message)
|
||||
end
|
||||
|
||||
Prints.Warn = function(message)
|
||||
printMessage('WARN', '^3', message)
|
||||
end
|
||||
|
||||
Prints.Error = function(message)
|
||||
printMessage('ERROR', '^1', message)
|
||||
end
|
||||
|
||||
Prints.Debug = function(message)
|
||||
printMessage('DEBUG', '^2', message)
|
||||
end
|
||||
|
||||
return Prints
|
||||
Reference in new issue
Block a user