Initial 4.5 commit

This commit is contained in:
ChocoTaco1 2020-12-06 15:14:57 -05:00
commit 96f73b3aef
1166 changed files with 107707 additions and 0 deletions

View file

@ -0,0 +1,30 @@
// DefaultTurrets.cs
// Restore Default Turret count at the end of the match + MPB
// Some maps in this map use non-default turret numbers
$DMP::indoorMinDef = $TeamDeployableMin[TurretIndoorDeployable];
$DMP::outdoorMinDef = $TeamDeployableMin[TurretOutdoorDeployable];
$DMP::indoorMaxDef = $TeamDeployableMax[TurretIndoorDeployable];
$DMP::outdoorMaxDef = $TeamDeployableMax[TurretOutdoorDeployable];
$DMP::vehicleMPBMax = $VehicleMax[MobileBaseVehicle];
package turretDefaults
{
function DefaultGame::gameOver( %game )
{
parent::gameOver(%game);
$TeamDeployableMin[TurretIndoorDeployable] = $DMP::indoorMinDef;
$TeamDeployableMin[TurretOutdoorDeployable] = $DMP::outdoorMinDef;
$TeamDeployableMax[TurretIndoorDeployable] = $DMP::indoorMaxDef;
$TeamDeployableMax[TurretOutdoorDeployable] = $DMP::outdoorMaxDef;
$VehicleMax[MobileBaseVehicle] = $DMP::vehicleMPBMax;
}
};
if(!isActivePackage(turretDefaults))
activatePackage(turretDefaults);

View file

@ -0,0 +1,22 @@
// For Small Crossing Inventorys
// SimpleFlagArena also uses this
// Grants Invinciblity
package InvincibleInv
{
function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
{
%targetname = %targetObject.getDataBlock().getName();
//Used on some maps to make invs invincible
if( %targetObject.invincible && %targetname $= "StationInventory" )
return;
parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
}
};
//Prevent package from being activated if it is already
if (!isActivePackage(InvincibleInv))
activatePackage(InvincibleInv);

View file

@ -0,0 +1,32 @@
//Adds Custom Sjapesto the editor
package AddShapes
{
function Creator::init(%this){
parent::init(%this);
%staticBase = %this.addGroup(0, "Custom Objects");
for (%i = 1; %i <= $CSObjCount; %i++) {
echo("This: " SPC $CSObjects[%i]);
echo(getWord($CSObjects[%i], 2));
%grp = %this.addGroup(%staticBase, getWord($CSObjects[%i], 0));
echo("TSStatic::create(" @ getWord($CSObjects[%i], 2) @");");
%this.addItem(%grp, getWord($CSObjects[%i], 1), "TSStatic::create(\"" @ getWord($CSObjects[%i], 2) @"\");");
}
}
};
if (!isActivePackage(AddShapes))
activatePackage(AddShapes);
$CSObjects[$CSObjCount++] = "Organics BELgTree16Autumn borg16-autumn.dts 20 -3.0 0 0.8 1.5";
$CSObjects[$CSObjCount++] = "Organics BELgTree19Autumn borg19-autumn.dts 20 -3.0 0 0.8 1.5";
$CSObjects[$CSObjCount++] = "Organics PhoenixPlant1Dark porg1-dark.dts";
$CSObjects[$CSObjCount++] = "Misc VendingMachine vend.dts";
$CSObjects[$CSObjCount++] = "Misc GoonFlag rst-goonflag.dts";
$CSObjects[$CSObjCount++] = "Misc TaoBook rst-taobook.dts";
$CSObjects[$CSObjCount++] = "Misc TCMug rst-TCmug.dts";
$CSObjects[$CSObjCount++] = "Misc TNMug rst-TNmug.dts";
$CSObjects[$CSObjCount++] = "Misc Turtle rst-turtle.dts";

View file

@ -0,0 +1,39 @@
// Tells the server what version of the DMP pack the client is using
// This is used primarily for the server logo on the loading screen
// As the server will skip showing the server logo image if a
// Version isnt detected
// Alternatively, this can also be used to debug aspects as the Pack version
// will be known to the server
$DMP::Version = 4.5;
// Client Only
addMessageCallback('MsgDMPVer', DMPReturn);
function DMPReturn()
{
commandToServer('ClientDMPVersion',$DMP::Version);
}
// Server Only
function serverCmdClientDMPVersion(%client, %version)
{
if(!%client.dmpVersion)
%client.dmpVersion = %version;
}
package dmpVersionCheck
{
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch )
{
parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
messageClient(%client, 'MsgDMPVer');
}
};
// Prevent package from being activated if it is already
if (!isActivePackage(dmpVersionCheck))
activatePackage(dmpVersionCheck);