Did stuff.

This commit is contained in:
Robert MacGregor 2012-08-17 20:48:47 -04:00
parent 09f43122e6
commit 8c96cba3e1
132 changed files with 56515 additions and 1448 deletions

View file

@ -0,0 +1,30 @@
// #autoload
// #name = GUIML Workaround
// #version = 2.0
// #date = March 1st, 2010
// #category = Fix
// #author = Dark Dragon DX
// #warrior = DarkDragonDX
// #email = DarkDragonDX@Hotmail.com
// #description = Adds a failSafe for the <a:command> tag. Mainly for players that use mods with interactive GUIML elements.
package GUIMLPackage
{
function toggleEditor(%make)
{
parent::toggleEditor(%make); //Call parent function
if (!isActivePackage(GUIMLWorkaround))
activatePackage(GUIMLWorkaround);
}
};
activatePackage(GUIMLPackage);
//Seperate package to activate our new code
package GUIMLWorkaround
{
function GuiMLTextCtrl::onURL(%this, %url)
{
//parent::onURL(%this, %url);
commandToServer('ProcessGameLink',getField(%url,1));
}
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
// #autoload
// #name = Terrain UE Prevent
// #version = 1.0
// #date = Saturday, July 25, 2009
// #category = Fix
// #author = Dark Dragon DX
// #warrior = DarkDragonDX
// #email = DarkDragonDX@Hotmail.com
// #description = A "prevention" for when you open the command Circuit on a map without terrain and UE. (Like ANTS)
package TerrainFix
{
function toggleCommanderMap(%val)
{
%count = ServerConnection.getCount();
for (%i = 0; %i < %count; %i++) //Search for my terrain..
{
%obj = ServerConnection.getObject(%i); //Get the object
if (%obj != -1) //No console spam
if (%obj.getClassName() $= "TerrainBlock") //Is it terrain?
{
parent::toggleCommanderMap(%val); //Win
return true;
}
}
messageBoxOk("Error","Unable to open command circuit, no terrain exists."); //Tell me
return false;
}
};
activatePackage(TerrainFix);

View 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);

View file

@ -9,24 +9,45 @@
// #description = Adds a new command-line to Tribes 2 for shortcuts: -safeMode
// #status = Release
package SafeMode{
function DispatchLaunchMode()
package SafeModeOverrides
{
parent::DispatchLaunchMode();
function TCPObject::onLine(){ return true;}
function TCPObject::connect(){ return true; }
function TCPObject::disconnect(){ return true; }
function TCPObject::listen(){ return true; }
function TCPObject::send(){ return true; }
// check T2 command line arguments
for(%i = 1; %i < $Game::argc ; %i++)
{
%arg = $Game::argv[%i];
%nextArg = $Game::argv[%i+1];
%hasNextArg = $Game::argc - %i > 1;
function HTTPObject::onLine(){ return true; }
function HTTPObject::connect(){ return true; }
function HTTPObject::disconnect(){ return true; }
function HTTPObject::listen(){ return true; }
function HTTPObject::send(){ return true;}
function HTTPObject::post(){ return true; }
if( !stricmp(%arg, "-Safemode")) //If enabled, cuts off all TCP & HTTP object connections, preventing UE's when running T2 without internet
{
exec("scripts/Safemode.cs");
}
}
}
function SecureHTTPObject::onLine(){ return true; }
function SecureHTTPObject::connect(){ return true; }
function SecureHTTPObject::disconnect(){ return true; }
function SecureHTTPObject::listen(){ return true; }
function SecureHTTPObject::send(){ return true; }
function SecureHTTPObject::post(){ return true; }
};
activatePackage(SafeMode);
package SafeMode
{
function DispatchLaunchMode()
{
parent::DispatchLaunchMode();
// check T2 command line arguments
for(%i = 1; %i < $Game::argc ; %i++)
{
%arg = $Game::argv[%i];
%nextArg = $Game::argv[%i+1];
%hasNextArg = $Game::argc - %i > 1;
if( !stricmp(%arg, "-Safemode")) //If enabled, cuts off all TCP & HTTP object connections, preventing UE's when running T2 without internet
activatePackage(SafeModeOverrides);
}
}
};
activatePackage(SafeMode);