mirror of
https://github.com/Ragora/T2-BoL.git
synced 2026-07-11 04:14:34 +00:00
Did stuff.
This commit is contained in:
parent
09f43122e6
commit
8c96cba3e1
132 changed files with 56515 additions and 1448 deletions
67
scripts/autoexec/debugLog.cs
Normal file
67
scripts/autoexec/debugLog.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
// #autoload
|
||||
// #name = Debug Log
|
||||
// #version = 1.0
|
||||
// #category = Utility
|
||||
// #warrior = DarkDragonDX
|
||||
// #description = Adds a debug log.
|
||||
|
||||
package debugLog
|
||||
{
|
||||
function echo(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10)
|
||||
{
|
||||
if (!IsObject(DebugLogger))
|
||||
{
|
||||
new FileObject(DebugLogger);
|
||||
DebugLogger.lineCount = 0;
|
||||
DebugLogger.openForWrite("debugLog.txt");
|
||||
}
|
||||
if (DebugLogger.lineCount >= 10)
|
||||
{
|
||||
DebugLogger.close();
|
||||
DebugLogger.openForAppend("debugLog.txt");
|
||||
}
|
||||
DebugLogger.writeLine(%arg1 @ %arg2 @ %arg3 @ %arg4 @ %arg5 @ %arg6 @ %arg7 @ %arg8 @ %arg9 @ %arg10);
|
||||
DebugLogger.lineCount++;
|
||||
parent::echo(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10);
|
||||
return true;
|
||||
}
|
||||
|
||||
function error(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10)
|
||||
{
|
||||
if (!IsObject(DebugLogger))
|
||||
{
|
||||
new FileObject(DebugLogger);
|
||||
DebugLogger.lineCount = 0;
|
||||
DebugLogger.openForWrite("debugLog.txt");
|
||||
}
|
||||
if (DebugLogger.lineCount >= 10)
|
||||
{
|
||||
DebugLogger.close();
|
||||
DebugLogger.openForAppend("debugLog.txt");
|
||||
}
|
||||
DebugLogger.writeLine("Error: " @ %arg1 @ %arg2 @ %arg3 @ %arg4 @ %arg5 @ %arg6 @ %arg7 @ %arg8 @ %arg9 @ %arg10);
|
||||
DebugLogger.lineCount++;
|
||||
parent::error(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10);
|
||||
return true;
|
||||
}
|
||||
|
||||
function warning(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10)
|
||||
{
|
||||
if (!IsObject(DebugLogger))
|
||||
{
|
||||
new FileObject(DebugLogger);
|
||||
DebugLogger.lineCount = 0;
|
||||
DebugLogger.openForWrite("debugLog.txt");
|
||||
}
|
||||
if (DebugLogger.lineCount >= 10)
|
||||
{
|
||||
DebugLogger.close();
|
||||
DebugLogger.openForAppend("debugLog.txt");
|
||||
}
|
||||
DebugLogger.writeLine("Warning: " @ %arg1 @ %arg2 @ %arg3 @ %arg4 @ %arg5 @ %arg6 @ %arg7 @ %arg8 @ %arg9 @ %arg10);
|
||||
DebugLogger.lineCount++;
|
||||
parent::warning(%arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
activatePackage(debugLog);
|
||||
Loading…
Add table
Add a link
Reference in a new issue