mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-19 16:14:44 +00:00
Time Changes
View Time Limit in Vote Menu Admin can change the Time Limit to 30 in Tourney Mode from the Vote Menu More Practical Vote Times Always Autoset Time to 30 in TourneyMode
This commit is contained in:
parent
d9ee54045b
commit
9841b1e98a
|
|
@ -56,6 +56,10 @@ function loadMissionStage2()
|
|||
$Host::HiVisibility = "0"; //always SPEED
|
||||
}
|
||||
|
||||
//TimeLimit Always 30 minutes in Tourney Mode
|
||||
if($Host::TournamentMode)
|
||||
$Host::TimeLimit = "30";
|
||||
|
||||
//Siege NoBaseRape Fix
|
||||
if($CurrentMissionType $= "Siege")
|
||||
$Host::NoBaseRapeEnabled = 0;
|
||||
|
|
|
|||
|
|
@ -79,8 +79,10 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
|
|||
switch$($CurrentMissionType)
|
||||
{
|
||||
case CTF or SCtF:
|
||||
if($Host::TournamentMode)
|
||||
%showTL = " - Time Limit:" SPC $Host::TimeLimit;
|
||||
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win",
|
||||
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win");
|
||||
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL);
|
||||
case LakRabbit:
|
||||
%cap = "2000 Points to Win";
|
||||
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
|
||||
|
|
@ -417,13 +419,32 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
|
||||
//If proposed time is lower than server set or higher than unlimited
|
||||
if(%arg1 < $Host::TimeLimit || %arg1 > 999)
|
||||
{
|
||||
if(!%isAdmin)
|
||||
{
|
||||
messageClient(%client, "", "\c2Invalid time selection.");
|
||||
return;
|
||||
}
|
||||
else //is an admin
|
||||
{
|
||||
if($Host::TournamentMode) //Admins still have the option to set the time to 30 minutes in Tourney Mode
|
||||
{
|
||||
if(%arg1 !$= "30") //30 minutes only
|
||||
{
|
||||
messageClient(%client, "", "\c2Invalid time selection.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
messageClient(%client, "", "\c2Invalid time selection.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//If proposed time is something other than what is selectable
|
||||
if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999")
|
||||
if(%arg1 !$= "30" && %arg1 !$= "45" && %arg1 !$= "60" && %arg1 !$= "75" && %arg1 !$= "90" && %arg1 !$= "180" && %arg1 !$= "360" && %arg1 !$= "999")
|
||||
{
|
||||
messageClient(%client, "", "\c2Only selectable times allowed.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2973,13 +2973,13 @@ function DefaultGame::sendGameTeamList( %game, %client, %key )
|
|||
//------------------------------------------------------------------------------
|
||||
function DefaultGame::sendTimeLimitList( %game, %client, %key )
|
||||
{
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 30, "", '30 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 45, "", '45 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 60, "", '60 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 75, "", '75 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 90, "", '90 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 120, "", '120 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 150, "", '150 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 180, "", '180 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 240, "", '240 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 360, "", '360 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 480, "", '480 minutes' );
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 999, "", 'No time limit' );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue