2020-03-23 16:23:42 -04:00
|
|
|
package NoBaseRape
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//From Evolution MOD
|
|
|
|
|
//Modified for our needs
|
|
|
|
|
function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
|
|
|
|
{
|
|
|
|
|
//echo( %targetObject.getDataBlock().getClassName() );
|
|
|
|
|
//echo( %targetObject.getDataBlock().getName() );
|
|
|
|
|
|
|
|
|
|
%targetname = %targetObject.getDataBlock().getName();
|
|
|
|
|
|
2020-07-18 15:53:00 -04:00
|
|
|
//Used on some maps to make invs invincible
|
|
|
|
|
if( %targetObject.invincible && %targetname $= "StationInventory" )
|
|
|
|
|
return;
|
|
|
|
|
|
2020-03-30 13:51:12 -04:00
|
|
|
if(!$Host::TournamentMode && $Host::NoBaseRapeEnabled && $Host::NoBaseRapePlayerCount > $TotalTeamPlayerCount)
|
2020-03-23 16:23:42 -04:00
|
|
|
{
|
|
|
|
|
if( %targetname $= "GeneratorLarge" || %targetname $= "StationInventory" || %targetname $= "SolarPanel" )
|
|
|
|
|
{
|
|
|
|
|
//Notify only if asset is on other team
|
|
|
|
|
if( %targetObject.team !$= %sourceObject.team )
|
|
|
|
|
NBRAssetSound( %game, %sourceObject );
|
2020-03-30 13:51:12 -04:00
|
|
|
|
2020-03-23 16:23:42 -04:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-18 16:08:57 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Prevent package from being activated if it is already
|
|
|
|
|
if (!isActivePackage(NoBaseRape))
|
|
|
|
|
activatePackage(NoBaseRape);
|