mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-03-09 06:30:29 +00:00
Update NoBaseRape.cs
Changed Invincible Inv mechanic
This commit is contained in:
parent
47203f526d
commit
6b53bd352f
1 changed files with 32 additions and 13 deletions
|
|
@ -10,24 +10,14 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
|
||||
%targetname = %targetObject.getDataBlock().getName();
|
||||
|
||||
//Used on some maps to make invs invincible
|
||||
if( $CurrentMission $= "SmallCrossing" || $CurrentMission $= "Bulwark")
|
||||
{
|
||||
if( %targetObject.invincible && %targetname $= "StationInventory" )
|
||||
{
|
||||
//NBRAssetSound( %game, %sourceObject );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(!$Host::TournamentMode && $Host::NoBaseRapeEnabled && $Host::NoBaseRapePlayerCount > $TotalTeamPlayerCount)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,8 +25,37 @@ 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);
|
||||
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…
Add table
Add a link
Reference in a new issue