mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-19 16:14:44 +00:00
Rewrite
Was a mess
This commit is contained in:
parent
cf28a6d2de
commit
90e191ddd9
|
|
@ -16,51 +16,53 @@
|
|||
// 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";
|
||||
|
||||
//exec("scripts/autoexec/missiontypeoptions.cs");
|
||||
package MissionTypeOptions
|
||||
{
|
||||
|
||||
function loadMissionStage2()
|
||||
{
|
||||
switch$($Host::PUGpasswordAlwaysOn)
|
||||
//Disable Tournament Mode for Lak
|
||||
if($CurrentMissionType $= "Lakrabbit" || $CurrentMissionType $= "DM" || $CurrentMissionType $= "PracticeCTF")
|
||||
{
|
||||
case 0:
|
||||
if($CurrentMissionType !$= "LakRabbit")
|
||||
{
|
||||
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
|
||||
if($Host::TournamentMode)
|
||||
$Host::TournamentMode = 0;
|
||||
}
|
||||
|
||||
//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)
|
||||
$Host::TimeLimit = 30; //TimeLimit Always 30 minutes in Tourney Mode
|
||||
else
|
||||
{
|
||||
//Disable everything
|
||||
if($Host::Password !$= "")
|
||||
$Host::Password = "";
|
||||
//Disable if active
|
||||
if($LockedTeams)
|
||||
$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)
|
||||
$RestrictedVoting = 0;
|
||||
if($Host::AllowAdmin2Admin)
|
||||
$Host::AllowAdmin2Admin = 0;
|
||||
}
|
||||
if(isActivePackage(LockedTeams) && !$LockedTeams)
|
||||
deactivatePackage(LockedTeams);
|
||||
|
||||
//Siege NoBaseRape Fix
|
||||
if($CurrentMissionType $= "Siege")
|
||||
|
|
@ -73,6 +75,9 @@ function loadMissionStage2()
|
|||
//Map Change Center Print. Used to advertise upcoming events
|
||||
if($Host::MapChangeMSG)
|
||||
centerPrintAll($Host::MapChangeMSGContent, 12, 3);
|
||||
|
||||
//Set random seed
|
||||
setRandomSeed(getrandom(1,1000));
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -198,10 +198,13 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
|||
//PUG Password
|
||||
if(%client.isAdmin && $Host::TournamentMode)
|
||||
{
|
||||
if($Host::Password !$= "")
|
||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password');
|
||||
else
|
||||
messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password');
|
||||
if(!$Host::PUGpasswordAlwaysOn) //Password is already set
|
||||
{
|
||||
if($Host::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
|
||||
if(%client.isAdmin && $Host::TournamentMode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue