mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-03-05 04:30:20 +00:00
ReAdded
This commit is contained in:
parent
fdaa2c5be4
commit
e5ef88b4ca
1 changed files with 43 additions and 0 deletions
43
Classic/scripts/autoexec/AntiTurret.cs
Normal file
43
Classic/scripts/autoexec/AntiTurret.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// Amount of players on a team to enable turrets
|
||||
// $Host::EnableTurretPlayerCount = 10;
|
||||
//
|
||||
// Disable MortarTurret
|
||||
// $Host::EnableMortarTurret = 0;
|
||||
//
|
||||
// Disable = 0
|
||||
// Enable = 1
|
||||
//
|
||||
|
||||
package AntiTurret
|
||||
{
|
||||
|
||||
function TurretData::selectTarget(%this, %turret)
|
||||
{
|
||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::EnableTurretPlayerCount )
|
||||
{
|
||||
%turret.clearTarget();
|
||||
}
|
||||
else
|
||||
{
|
||||
//All turret types can fire
|
||||
if( $Host::EnableMortarTurret )
|
||||
{
|
||||
parent::selectTarget(%this, %turret);
|
||||
}
|
||||
//Only non-MortarTurret types can fire
|
||||
else if( %turret.initialBarrel !$= "MortarBarrelLarge" )
|
||||
{
|
||||
parent::selectTarget(%this, %turret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(AntiTurret))
|
||||
activatePackage(AntiTurret);
|
||||
|
||||
$InvBanList[CTF, "MortarBarrelPack"] = !$Host::EnableMortarTurret;
|
||||
$InvBanList[CnH, "MortarBarrelPack"] = !$Host::EnableMortarTurret;
|
||||
$InvBanList[Siege, "MortarBarrelPack"] = !$Host::EnableMortarTurret;
|
||||
Loading…
Add table
Add a link
Reference in a new issue