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:
ChocoTaco1 2022-05-08 15:01:35 -04:00
parent d9ee54045b
commit 9841b1e98a
3 changed files with 33 additions and 8 deletions

View file

@ -56,6 +56,10 @@ function loadMissionStage2()
$Host::HiVisibility = "0"; //always SPEED $Host::HiVisibility = "0"; //always SPEED
} }
//TimeLimit Always 30 minutes in Tourney Mode
if($Host::TournamentMode)
$Host::TimeLimit = "30";
//Siege NoBaseRape Fix //Siege NoBaseRape Fix
if($CurrentMissionType $= "Siege") if($CurrentMissionType $= "Siege")
$Host::NoBaseRapeEnabled = 0; $Host::NoBaseRapeEnabled = 0;

View file

@ -79,8 +79,10 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
switch$($CurrentMissionType) switch$($CurrentMissionType)
{ {
case CTF or SCtF: 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", 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: case LakRabbit:
%cap = "2000 Points to Win"; %cap = "2000 Points to Win";
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
@ -418,12 +420,31 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
//If proposed time is lower than server set or higher than unlimited //If proposed time is lower than server set or higher than unlimited
if(%arg1 < $Host::TimeLimit || %arg1 > 999) if(%arg1 < $Host::TimeLimit || %arg1 > 999)
{ {
messageClient(%client, "", "\c2Invalid time selection."); if(!%isAdmin)
return; {
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 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."); messageClient(%client, "", "\c2Only selectable times allowed.");
return; return;

View file

@ -2973,13 +2973,13 @@ function DefaultGame::sendGameTeamList( %game, %client, %key )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function DefaultGame::sendTimeLimitList( %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, 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, 180, "", '180 minutes' );
messageClient( %client, 'MsgVoteItem', "", %key, 240, "", '240 minutes' );
messageClient( %client, 'MsgVoteItem', "", %key, 360, "", '360 minutes' ); messageClient( %client, 'MsgVoteItem', "", %key, 360, "", '360 minutes' );
messageClient( %client, 'MsgVoteItem', "", %key, 480, "", '480 minutes' );
messageClient( %client, 'MsgVoteItem', "", %key, 999, "", 'No time limit' ); messageClient( %client, 'MsgVoteItem', "", %key, 999, "", 'No time limit' );
} }