Vote changes, Map Rot changes

This commit is contained in:
ChocoTaco 2018-08-07 02:50:49 -04:00
parent a39d2c62bd
commit 78ec6fd063
9 changed files with 1339 additions and 55 deletions

94
autoexec/VoteOverTime.cs Normal file
View file

@ -0,0 +1,94 @@
//Changes were also made in the Evo Admin.ovl and DefaultGame.ovl
//DefaultGame::voteChangeMission, DefaultGame::voteChangeTimeLimit, serverCmdStartNewVote
package VoteOverTime {
//CTF
function CTFGame::timeLimitReached(%game)
{
if( !$VoteInProgress && !$TimeLimitChanged ) {
logEcho("game over (timelimit)");
%game.gameOver();
cycleMissions();
$VoteInProgress = false;
$TimeLimitChanged = false;
$VoteInProgressMessege = false;
$VoteSoundInProgress = false;
}
else if( $missionRunning && $VoteInProgress && !$TimeLimitChanged ) {
schedule(1000, 0, "CTFRestarttimeLimitReached", %game);
if( !$VoteInProgressMessege ) {
messageAll('', '\c2Vote Overtime Initiated.', %display);
$VoteInProgressMessege = true;
}
}
}
function CTFRestarttimeLimitReached(%game)
{
CTFGame::timeLimitReached(%game);
}
//LakRabbit
function LakRabbitGame::timeLimitReached(%game)
{
if( !$VoteInProgress && !$TimeLimitChanged ) {
logEcho("game over (timelimit)");
%game.gameOver();
cycleMissions();
$VoteInProgress = false;
$TimeLimitChanged = false;
$VoteInProgressMessege = false;
$VoteSoundInProgress = false;
}
else if( $missionRunning && $VoteInProgress && !$TimeLimitChanged ) {
schedule(1000, 0, "LakRabbitRestarttimeLimitReached", %game);
if( !$VoteInProgressMessege ) {
messageAll('', '\c2Vote Overtime Initiated.', %display);
$VoteInProgressMessege = true;
}
}
}
function LakRabbitRestarttimeLimitReached(%game)
{
LakRabbitGame::timeLimitReached(%game);
}
//SCtF
function SCtFGame::timeLimitReached(%game)
{
if( !$VoteInProgress && !$TimeLimitChanged ) {
logEcho("game over (timelimit)");
%game.gameOver();
cycleMissions();
$VoteInProgress = false;
$TimeLimitChanged = false;
$VoteInProgressMessege = false;
$VoteSoundInProgress = false;
}
else if( $missionRunning && $VoteInProgress && !$TimeLimitChanged ) {
schedule(1000, 0, "SCtFRestarttimeLimitReached", %game);
if( !$VoteInProgressMessege ) {
messageAll('', '\c2Vote Overtime Initiated.', %display);
$VoteInProgressMessege = true;
}
}
}
function SCtFRestarttimeLimitReached(%game)
{
SCtFGame::timeLimitReached(%game);
}
};
// Prevent package from being activated if it is already
if (!isActivePackage(VoteOverTime))
activatePackage(VoteOverTime);

13
autoexec/VoteSound.cs Normal file
View file

@ -0,0 +1,13 @@
//Make a sound every so seconds to make sure everyone votes
function VoteSound( %game ) {
if($VoteSoundInProgress) {
messageAll('', '\c1Vote in Progress: \c0Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %display);
//$VoteSoundSchedule = schedule(12000, "VoteSound", %game);
schedule(12000, 0, "VoteSound", %game);
}
else
return;
}