mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 08:34:43 +00:00
Formatting
This commit is contained in:
parent
0393f2522b
commit
54621f1b68
1 changed files with 27 additions and 30 deletions
|
|
@ -23,29 +23,6 @@ $Host::AllowPlayerVoteNextMission = 1;
|
||||||
package ExtraVoteMenu
|
package ExtraVoteMenu
|
||||||
{
|
{
|
||||||
|
|
||||||
function serverCmdGetVoteMenu( %client, %key )
|
|
||||||
{
|
|
||||||
if (isObject( Game ) && !%client.lockVMenu)
|
|
||||||
Game.sendGameVoteMenu( %client, %key );
|
|
||||||
%client.lockVMenu = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function CycleMissions()
|
|
||||||
{
|
|
||||||
if($voteNext)
|
|
||||||
{
|
|
||||||
%nextMission = $HostMissionFile[$voteNextMap];
|
|
||||||
%type = $HostTypeName[$voteNextType];
|
|
||||||
messageAll( 'MsgClient', 'Loading %1 (%2)...', %nextMission, $HostTypeDisplayName[$voteNextType] );
|
|
||||||
loadMission( %nextMission, %type );
|
|
||||||
$voteNextType = 0;
|
|
||||||
$voteNextMap = 0;
|
|
||||||
$voteNext = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
parent::CycleMissions();
|
|
||||||
}
|
|
||||||
|
|
||||||
function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||||
{
|
{
|
||||||
switch$ (%typeName)
|
switch$ (%typeName)
|
||||||
|
|
@ -554,18 +531,15 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
case "stopRunningVote":
|
case "stopRunningVote":
|
||||||
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
|
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
|
||||||
{
|
{
|
||||||
if($VOStatus !$="InProgress") //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
if($VOStatus $="InProgress") //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
||||||
{
|
|
||||||
stopCurrentVote(%client);
|
|
||||||
adminLog(%client, " stopped the vote in progress.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
messageClient(%client, "", "\c2Can't stop time vote after time has expired.");
|
messageClient(%client, "", "\c2Can't stop time vote after time has expired.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stopCurrentVote(%client);
|
||||||
|
adminLog(%client, " stopped the vote in progress.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "TogglePUGpassword":
|
case "TogglePUGpassword":
|
||||||
|
|
@ -1503,6 +1477,29 @@ function adminStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4)
|
||||||
Game.evalVote(%typeName, %client, %arg1, %arg2, %arg3, %arg4);
|
Game.evalVote(%typeName, %client, %arg1, %arg2, %arg3, %arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function serverCmdGetVoteMenu( %client, %key )
|
||||||
|
{
|
||||||
|
if (isObject( Game ) && !%client.lockVMenu)
|
||||||
|
Game.sendGameVoteMenu( %client, %key );
|
||||||
|
%client.lockVMenu = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function CycleMissions()
|
||||||
|
{
|
||||||
|
if($voteNext)
|
||||||
|
{
|
||||||
|
%nextMission = $HostMissionFile[$voteNextMap];
|
||||||
|
%type = $HostTypeName[$voteNextType];
|
||||||
|
messageAll( 'MsgClient', 'Loading %1 (%2)...', %nextMission, $HostTypeDisplayName[$voteNextType] );
|
||||||
|
loadMission( %nextMission, %type );
|
||||||
|
$voteNextType = 0;
|
||||||
|
$voteNextMap = 0;
|
||||||
|
$voteNext = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
parent::CycleMissions();
|
||||||
|
}
|
||||||
|
|
||||||
//Reset Set next mission if everyone leaves
|
//Reset Set next mission if everyone leaves
|
||||||
function GameConnection::onDrop(%client, %reason)
|
function GameConnection::onDrop(%client, %reason)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue