mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-14 15:44:34 +00:00
Rewrite
Was a mess
This commit is contained in:
parent
cf28a6d2de
commit
90e191ddd9
2 changed files with 38 additions and 30 deletions
|
|
@ -16,51 +16,53 @@
|
||||||
// Message Content
|
// Message Content
|
||||||
// $Host::MapChangeMSGContent = "<color:3cb4b4><font:Sui Generis:22>Pickup Night\n<color:3cb4b4><font:Univers:18>Saturday, March 5th\n<color:3cb4b4><font:Univers:16>Join discord for details";
|
// $Host::MapChangeMSGContent = "<color:3cb4b4><font:Sui Generis:22>Pickup Night\n<color:3cb4b4><font:Univers:18>Saturday, March 5th\n<color:3cb4b4><font:Univers:16>Join discord for details";
|
||||||
|
|
||||||
|
//exec("scripts/autoexec/missiontypeoptions.cs");
|
||||||
package MissionTypeOptions
|
package MissionTypeOptions
|
||||||
{
|
{
|
||||||
|
|
||||||
function loadMissionStage2()
|
function loadMissionStage2()
|
||||||
{
|
{
|
||||||
switch$($Host::PUGpasswordAlwaysOn)
|
//Disable Tournament Mode for Lak
|
||||||
|
if($CurrentMissionType $= "Lakrabbit" || $CurrentMissionType $= "DM" || $CurrentMissionType $= "PracticeCTF")
|
||||||
{
|
{
|
||||||
case 0:
|
if($Host::TournamentMode)
|
||||||
if($CurrentMissionType !$= "LakRabbit")
|
$Host::TournamentMode = 0;
|
||||||
{
|
|
||||||
if($Host::TournamentMode && $Host::PUGautoPassword)
|
|
||||||
$Host::Password = $Host::PUGPassword;
|
|
||||||
|
|
||||||
//Set server mode to SPEED
|
|
||||||
$Host::HiVisibility = 0;
|
|
||||||
}
|
|
||||||
else if($CurrentMissionType $= "LakRabbit")
|
|
||||||
{
|
|
||||||
if($Host::TournamentMode)
|
|
||||||
$Host::TournamentMode = 0;
|
|
||||||
|
|
||||||
//Set server mode to DISTANCE
|
|
||||||
$Host::HiVisibility = 1;
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
$Host::Password = $Host::PUGPassword;
|
|
||||||
$Host::HiVisibility = 0; //always SPEED
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//PUGpassword
|
||||||
|
if($Host::PUGpasswordAlwaysOn) //ON
|
||||||
|
$Host::Password = $Host::PUGPassword;
|
||||||
|
|
||||||
|
//Set Visibility
|
||||||
|
if($CurrentMissionType $= "Lakrabbit")
|
||||||
|
{
|
||||||
|
//Set server mode to DISTANCE
|
||||||
|
$Host::HiVisibility = 1; //Lakrabbit or Other
|
||||||
|
}
|
||||||
|
else //Set server mode to SPEED for CTF/SCTF/Anything Else
|
||||||
|
$Host::HiVisibility = 0;
|
||||||
|
|
||||||
|
//Tournament Mode specifics
|
||||||
if($Host::TournamentMode)
|
if($Host::TournamentMode)
|
||||||
$Host::TimeLimit = 30; //TimeLimit Always 30 minutes in Tourney Mode
|
$Host::TimeLimit = 30; //TimeLimit Always 30 minutes in Tourney Mode
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Disable everything
|
//Disable if active
|
||||||
if($Host::Password !$= "")
|
|
||||||
$Host::Password = "";
|
|
||||||
if($LockedTeams)
|
if($LockedTeams)
|
||||||
$LockedTeams = 0;
|
$LockedTeams = 0;
|
||||||
|
if(isActivePackage(LockedTeams) && !$LockedTeams)
|
||||||
|
deactivatePackage(LockedTeams);
|
||||||
|
|
||||||
|
//Disable if active
|
||||||
|
if($Host::Password !$= "" && !$Host::PUGpasswordAlwaysOn) //No Password
|
||||||
|
$Host::Password = "";
|
||||||
|
|
||||||
|
//Disable if active
|
||||||
if($RestrictedVoting)
|
if($RestrictedVoting)
|
||||||
$RestrictedVoting = 0;
|
$RestrictedVoting = 0;
|
||||||
if($Host::AllowAdmin2Admin)
|
if($Host::AllowAdmin2Admin)
|
||||||
$Host::AllowAdmin2Admin = 0;
|
$Host::AllowAdmin2Admin = 0;
|
||||||
}
|
}
|
||||||
if(isActivePackage(LockedTeams) && !$LockedTeams)
|
|
||||||
deactivatePackage(LockedTeams);
|
|
||||||
|
|
||||||
//Siege NoBaseRape Fix
|
//Siege NoBaseRape Fix
|
||||||
if($CurrentMissionType $= "Siege")
|
if($CurrentMissionType $= "Siege")
|
||||||
|
|
@ -73,6 +75,9 @@ function loadMissionStage2()
|
||||||
//Map Change Center Print. Used to advertise upcoming events
|
//Map Change Center Print. Used to advertise upcoming events
|
||||||
if($Host::MapChangeMSG)
|
if($Host::MapChangeMSG)
|
||||||
centerPrintAll($Host::MapChangeMSGContent, 12, 3);
|
centerPrintAll($Host::MapChangeMSGContent, 12, 3);
|
||||||
|
|
||||||
|
//Set random seed
|
||||||
|
setRandomSeed(getrandom(1,1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -198,10 +198,13 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
||||||
//PUG Password
|
//PUG Password
|
||||||
if(%client.isAdmin && $Host::TournamentMode)
|
if(%client.isAdmin && $Host::TournamentMode)
|
||||||
{
|
{
|
||||||
if($Host::Password !$= "")
|
if(!$Host::PUGpasswordAlwaysOn) //Password is already set
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
|
{
|
||||||
else
|
if($Host::Password !$= "")
|
||||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
|
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
|
||||||
|
else
|
||||||
|
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//Locked Teams
|
//Locked Teams
|
||||||
if(%client.isAdmin && $Host::TournamentMode)
|
if(%client.isAdmin && $Host::TournamentMode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue