mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Working libs
This commit is contained in:
17
control.lua
17
control.lua
@@ -8,10 +8,25 @@ Discord: https://discord.gg/r6dC2uK
|
||||
]]
|
||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||
|
||||
-- replaces the base error function
|
||||
_error = error
|
||||
error = function(err)
|
||||
if _G.discord_emit then
|
||||
local color = _G.Color and Color.to_hex(defines.text_color.bg) or '0x0'
|
||||
discord_emit{title='SCRIPT ERROR',color=color,description=err}
|
||||
elseif _G.game then
|
||||
if Game.print_all(err) == 0 then
|
||||
_error(err)
|
||||
end
|
||||
else
|
||||
_error(err)
|
||||
end
|
||||
end
|
||||
|
||||
-- loads the stdlib and allows Core Game and Event
|
||||
local StdLib = require '/locale/StdLib/load'
|
||||
local Core, Game, Event = StdLib.Core, StdLib.Game, StdLib.Event
|
||||
|
||||
-- loads the ExpLib, functions are plased into the lua global
|
||||
local ExpLib = require 'ExpLib'
|
||||
ExpLib._load_to_G(ExpLib)
|
||||
ExpLib._load_to_G(ExpLib)
|
||||
|
||||
Reference in New Issue
Block a user