mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 16:14:35 +00:00
Reworked
This commit is contained in:
parent
3dbce673c2
commit
66edec781d
1 changed files with 22 additions and 3 deletions
|
|
@ -1,8 +1,14 @@
|
||||||
// Amount of players on a team to enable turrets
|
// Amount of players on a team to enable turrets
|
||||||
// $Host::EnableTurretPlayerCount = 10;
|
// $Host::EnableTurretPlayerCount = 10;
|
||||||
//
|
//
|
||||||
|
// Disable MortarTurret
|
||||||
|
// $Host::EnableMortarTurret = 0;
|
||||||
|
//
|
||||||
|
// Disable = 0
|
||||||
|
// Enable = 1
|
||||||
|
//
|
||||||
|
|
||||||
package antiTurret
|
package AntiTurret
|
||||||
{
|
{
|
||||||
|
|
||||||
function TurretData::selectTarget(%this, %turret)
|
function TurretData::selectTarget(%this, %turret)
|
||||||
|
|
@ -13,7 +19,16 @@ function TurretData::selectTarget(%this, %turret)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parent::selectTarget(%this, %turret);
|
//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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,4 +36,8 @@ function TurretData::selectTarget(%this, %turret)
|
||||||
|
|
||||||
// Prevent package from being activated if it is already
|
// Prevent package from being activated if it is already
|
||||||
if (!isActivePackage(antiTurret))
|
if (!isActivePackage(antiTurret))
|
||||||
activatePackage(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