mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-20 00:24:49 +00:00
Update NoBaseRape.cs
Made universal Not map specific If an inventory has the "invincible" tag 1 Damage wont effect it
This commit is contained in:
parent
d7269ce0ce
commit
65d06b5dc3
|
|
@ -10,6 +10,10 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
|
||||
%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" )
|
||||
|
|
@ -25,37 +29,4 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
|
||||
}
|
||||
|
||||
function loadMissionStage2()
|
||||
{
|
||||
parent::loadMissionStage2();
|
||||
|
||||
if( $CurrentMission $= "SmallCrossing" || $CurrentMission $= "Bulwark" )
|
||||
{
|
||||
if (!isActivePackage(InvincibleInvToggle))
|
||||
activatePackage(InvincibleInvToggle);
|
||||
}
|
||||
else if (isActivePackage(InvincibleInvToggle))
|
||||
deactivatePackage(InvincibleInvToggle);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(NoBaseRape))
|
||||
activatePackage(NoBaseRape);
|
||||
|
||||
package InvincibleInvToggle
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Reference in a new issue