mirror of
https://github.com/Ragora/T2-ACCM.git
synced 2026-03-07 14:30:30 +00:00
Initial commit.
This commit is contained in:
commit
f5a6cfce9b
262 changed files with 128936 additions and 0 deletions
58
Scripts/mapGame.cs
Normal file
58
Scripts/mapGame.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// - MAP SUPPORT GAME PACKAGE - ///////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// - By Founder, ZOD and TseTse - /////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// - Version 2.0 - ////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package mapGame
|
||||
{
|
||||
function executeMapScripts()
|
||||
{
|
||||
echo("<>>>>> ACTIVATING MAP SUPPORT <<<<<>");
|
||||
echo("<>>>>> VERSION 2.0 <<<<<>");
|
||||
%path = "missions/mapscripts/*.cs";
|
||||
for(%file = findFirstFile( %path ); %file !$= ""; %file = findNextFile( %path ))
|
||||
exec(%file);
|
||||
|
||||
$MapScriptsLoaded = 1;
|
||||
}
|
||||
|
||||
function getRules()
|
||||
{
|
||||
// returns the currently executed folder names seperated by ;
|
||||
$ModPaths = getModPaths();
|
||||
echo($ModPaths);
|
||||
|
||||
// Example Usage (string, start, numChars)
|
||||
//if(getSubStr($ModPaths, 0, 6) $= "base++")
|
||||
// %doSomething = false;
|
||||
|
||||
// $arg is the server startup option of "-mod blah" so this will return "blah"
|
||||
echo($arg);
|
||||
return $arg;
|
||||
}
|
||||
|
||||
function killMapPackage(%package)
|
||||
{
|
||||
deactivatePackage(%package);
|
||||
}
|
||||
};
|
||||
|
||||
function loadMapSupport()
|
||||
{
|
||||
if($Host::AllowMapScript $= "" || $Host::AllowMapScript == 1)
|
||||
{
|
||||
$Host::AllowMapScript = 1;
|
||||
if(!isActivePackage(mapSupportGame))
|
||||
activatePackage(mapGame);
|
||||
|
||||
if(!$MapScriptsLoaded)
|
||||
executeMapScripts();
|
||||
}
|
||||
}
|
||||
|
||||
loadMapSupport();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Loading…
Add table
Add a link
Reference in a new issue