mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-02-13 03:33:34 +00:00
Made universal Not map specific If an inventory has the "invincible" tag 1 Damage wont effect it
32 lines
No EOL
1,000 B
C#
32 lines
No EOL
1,000 B
C#
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();
|
|
|
|
//Used on some maps to make invs invincible
|
|
if( %targetObject.invincible && %targetname $= "StationInventory" )
|
|
return;
|
|
|
|
if(!$Host::TournamentMode && $Host::NoBaseRapeEnabled && $Host::NoBaseRapePlayerCount > $TotalTeamPlayerCount)
|
|
{
|
|
if( %targetname $= "GeneratorLarge" || %targetname $= "StationInventory" || %targetname $= "SolarPanel" )
|
|
{
|
|
//Notify only if asset is on other team
|
|
if( %targetObject.team !$= %sourceObject.team )
|
|
NBRAssetSound( %game, %sourceObject );
|
|
|
|
return;
|
|
}
|
|
}
|
|
|
|
parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
|
|
}
|
|
|
|
}; |