mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-04-19 18:45:18 +00:00
Added some changeable variables
Cleaned up some stuff Added some host changeable variables
This commit is contained in:
parent
faa2c99ebc
commit
63984711b6
8 changed files with 273 additions and 81 deletions
|
|
@ -1,15 +1,26 @@
|
|||
$AntiCloakPlayerCount = 6; // amount of players needed on server for CloakPack to be selectable
|
||||
//Amount of players needed on server for CloakPack to be banned/unbanned
|
||||
//
|
||||
//$Host::AntiCloakEnable = 1;
|
||||
//$Host::AntiCloakPlayerCount = 6;
|
||||
//
|
||||
//TotalTeamCount based on how many on team, not how many on the server.
|
||||
|
||||
//Activates when default Inventory for player is set so player cant select it thru hotkeys or select it thru the gui.
|
||||
function ActivateAntiCloak ()
|
||||
//Called in GetCounts
|
||||
function ActivateAntiCloak()
|
||||
{
|
||||
//echo("TotalTeamPlayerCount " @ $TotalTeamPlayerCount);
|
||||
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
||||
if( $Host::AntiCloakEnable && $CurrentMissionType !$= "LakRabbit" )
|
||||
{
|
||||
//echo("TotalTeamPlayerCount " @ $TotalTeamPlayerCount);
|
||||
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
||||
|
||||
if(!$Host::TournamentMode && $TotalTeamPlayerCount < $AntiCloakPlayerCount)
|
||||
//If server is in Tourny mode or if the server population isnt higher than the AntiCloakPlayerCount the CloakPack is not selectable.
|
||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount )
|
||||
//If server is in Tourny mode or if the server population isnt higher than the AntiCloakPlayerCount the CloakPack is not selectable.
|
||||
$InvBanList[CTF, "CloakingPack"] = true;
|
||||
else
|
||||
//If AntiCloakPlayerCount is lower than server population, CloakPack is enabled and Selectable.
|
||||
else
|
||||
//If AntiCloakPlayerCount is lower than server population, CloakPack is enabled and Selectable.
|
||||
$InvBanList[CTF, "CloakingPack"] = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,22 +62,14 @@ function GetTeamCounts( %game, %client, %respawn )
|
|||
|
||||
|
||||
//Start Base Rape Notify
|
||||
//Make sure it's CTF Mode
|
||||
if($CurrentMissionType $= "CTF") {
|
||||
PlayerNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
PlayerNotify::AtSpawn( %game, %client, %respawn );
|
||||
|
||||
//Call Team Balance Notify
|
||||
//Make sure it's CTF Mode
|
||||
if($CurrentMissionType $= "CTF" && $TotalTeamPlayerCount !$= 0) {
|
||||
TeamBalanceNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
if($CurrentMissionType $= "sctf" && $TotalTeamPlayerCount !$= 0) {
|
||||
TeamBalanceNotify::AtSpawn( %game, %client, %respawn );
|
||||
}
|
||||
//AntiCloak Start
|
||||
//if($CurrentMissionType $= "CTF") {
|
||||
//ActivateAntiCloak ();
|
||||
//}
|
||||
TeamBalanceNotify::AtSpawn( %game, %client, %respawn );
|
||||
|
||||
//AntiCloak Start
|
||||
ActivateAntiCloak ();
|
||||
|
||||
|
||||
$GetCountsClientTeamChange = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,56 +1,30 @@
|
|||
//Start and Reset Notify
|
||||
//package NoRapeNotify {
|
||||
|
||||
//Start Notify
|
||||
//function DefaultGame::spawnPlayer( %game, %client, %respawn ) {
|
||||
//Call default function
|
||||
//parent::spawnPlayer( %game, %client, %respawn );
|
||||
//Start
|
||||
//Make sure it's CTF Mode
|
||||
//if( $CurrentMissionType $= "CTF" ) {
|
||||
//PlayerNotify::AtSpawn( %game, %client, %respawn );
|
||||
//}
|
||||
//}
|
||||
|
||||
//Moved the DefaultGame::gameOver in evo defaultgame.ovl
|
||||
|
||||
//Reset Notify
|
||||
//function DefaultGame::gameOver( %game ) {
|
||||
//Call default function
|
||||
//parent::gameOver( %game );
|
||||
//Reset NoBaseRape Notify
|
||||
//ResetNotify::MissionEnd( %game, %client );
|
||||
//}
|
||||
|
||||
//};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
//if (!isActivePackage(NoRapeNotify))
|
||||
//activatePackage(NoRapeNotify);
|
||||
|
||||
|
||||
|
||||
//Enable or Disable
|
||||
//$Host::EnableNoBaseRapeNotify = 1;
|
||||
//
|
||||
//This function is at DefaultGame::spawnPlayer( %game, %client, %respawn ) defaultGame.cs
|
||||
//Notifys the user if NoBase rape is on or off. Has a Counter so it is only run once and doesnt spam the client. It is triggered at spawn.
|
||||
function PlayerNotify::AtSpawn( %game, %client, %respawn )
|
||||
{
|
||||
//echo ("%client " @ %client);
|
||||
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
|
||||
if( $CurrentMissionType $= "CTF" && $Host::EnableNoBaseRapeNotify )
|
||||
{
|
||||
//echo ("%client " @ %client);
|
||||
//echo ("$TeamBalanceClient " @ $TeamBalanceClient);
|
||||
|
||||
//Is NoBaseRape On or off
|
||||
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount ) {
|
||||
//If on, has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 0) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
|
||||
$NoBaseRapeNotifyCount = 0;
|
||||
//Is NoBaseRape On or off
|
||||
if( !$Host::TournamentMode && $Host::EvoNoBaseRapeEnabled && $Host::EvoNoBaseRapeClassicPlayerCount > $TotalTeamPlayerCount ) {
|
||||
//If on, has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 0) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Enabled.~wfx/misc/nexus_cap.wav');
|
||||
$NoBaseRapeNotifyCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
//NoBaseRape is off
|
||||
//Has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 1) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
|
||||
$NoBaseRapeNotifyCount = 1;
|
||||
else
|
||||
//NoBaseRape is off
|
||||
//Has the client gotten the notification already
|
||||
if($NoBaseRapeNotifyCount !$= 1) {
|
||||
messageAll('MsgNoBaseRapeNotify', 'No Base Rape is \c1Disabled.~wfx/misc/diagnostic_on.wav');
|
||||
$NoBaseRapeNotifyCount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
//Enable or Disable
|
||||
//$Host::EnableTeamBalanceNotify = 1;
|
||||
//
|
||||
//Give the client a notification on the current state of balancing.
|
||||
//This function is in GetTeamCounts( %game, %client, %respawn ) GetTeamCounts.cs
|
||||
function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
|
||||
{
|
||||
if( $CurrentMissionType !$= "LakRabbit" && $TotalTeamPlayerCount !$= 0 && $Host::EnableTeamBalanceNotify )
|
||||
{
|
||||
//Call for a GetTeamCount update
|
||||
//GetTeamCounts( %game, %client, %respawn );
|
||||
|
||||
|
|
@ -57,6 +62,7 @@ function TeamBalanceNotify::AtSpawn( %game, %client, %respawn )
|
|||
$StatsBalanceCount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Called in CTFGame::flagCap in evo CTFGame.ovl
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
$TurretPlayerCount = 10; // amount of players needed on server for turrets
|
||||
//Amount of players on a team to enable turrets
|
||||
//$Host::EnableTurretPlayerCount = 10;
|
||||
|
||||
package antiTurret {
|
||||
|
||||
function TurretData::selectTarget(%this, %turret)
|
||||
{
|
||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $TurretPlayerCount) {
|
||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::EnableTurretPlayerCount ) {
|
||||
%turret.clearTarget();
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,30 @@
|
|||
//Disable MortarTurret
|
||||
//$Host::EnableMortarTurret = 0;
|
||||
//
|
||||
//Disable = 0
|
||||
//Enable = 1
|
||||
//
|
||||
// ban mortar turret from inventory in main gametypes
|
||||
$InvBanList[CTF, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[CnH, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[Siege, "MortarBarrelPack"] = 1;
|
||||
if( !$Host::EnableMortarTurret ) {
|
||||
|
||||
$InvBanList[CTF, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[CnH, "MortarBarrelPack"] = 1;
|
||||
$InvBanList[Siege, "MortarBarrelPack"] = 1;
|
||||
|
||||
}
|
||||
|
||||
package noMortarTurret {
|
||||
|
||||
// if a mortar turret somehow makes it into the game, keep it from working
|
||||
function TurretData::selectTarget(%this, %turret) {
|
||||
|
||||
if( %turret.initialBarrel !$= "MortarBarrelLarge" ) {
|
||||
Parent::selectTarget(%this, %turret);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage( noMortarTurret ))
|
||||
activatePackage( noMortarTurret );
|
||||
if (!isActivePackage(noMortarTurret))
|
||||
activatePackage(noMortarTurret);
|
||||
Loading…
Add table
Add a link
Reference in a new issue