mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-04-29 15:35:24 +00:00
Improved
Fixed situation where there is no progression number
This commit is contained in:
parent
4f5b21dc6c
commit
2b4a114b39
1 changed files with 11 additions and 9 deletions
|
|
@ -7,12 +7,14 @@ $EnableMultipleMapRotation = 0;
|
||||||
//Naming scheme mapRotation1.cs, mapRotation2.cs, mapRotation3.cs, etc
|
//Naming scheme mapRotation1.cs, mapRotation2.cs, mapRotation3.cs, etc
|
||||||
$mapRotationFilesCount = 3;
|
$mapRotationFilesCount = 3;
|
||||||
|
|
||||||
function multipleMapRotation()
|
function multipleMapRotation()
|
||||||
{
|
{
|
||||||
if($EnableMultipleMapRotation)
|
//Look for a progressing number
|
||||||
|
%var = stripChars($Host::ClassicRotationFile, "prefs/mapRotation.cs");
|
||||||
|
//echo("var: " @ %var);
|
||||||
|
|
||||||
|
if(%var) //If number exists proceed
|
||||||
{
|
{
|
||||||
%var = stripChars($Host::ClassicRotationFile, "prefs/mapRotation.cs");
|
|
||||||
//echo("var: " @ %var);
|
|
||||||
if(%var $= $mapRotationFilesCount)
|
if(%var $= $mapRotationFilesCount)
|
||||||
%var = 1;
|
%var = 1;
|
||||||
else
|
else
|
||||||
|
|
@ -20,17 +22,17 @@ function multipleMapRotation()
|
||||||
|
|
||||||
%mapRot = "prefs/mapRotation" @ %var @ ".cs";
|
%mapRot = "prefs/mapRotation" @ %var @ ".cs";
|
||||||
$Host::ClassicRotationFile = %mapRot;
|
$Host::ClassicRotationFile = %mapRot;
|
||||||
|
|
||||||
//Echo at start
|
|
||||||
schedule(10000,0,"multipleMapRotationEcho",0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
schedule(10000,0,"multipleMapRotationEcho",0); //Echo at start
|
||||||
}
|
}
|
||||||
|
|
||||||
//Echo at start
|
//Echo
|
||||||
function multipleMapRotationEcho()
|
function multipleMapRotationEcho()
|
||||||
{
|
{
|
||||||
echo("Current MapRotation: " @ $Host::ClassicRotationFile);
|
echo("Current MapRotation: " @ $Host::ClassicRotationFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Run
|
//Run
|
||||||
multipleMapRotation();
|
if($EnableMultipleMapRotation)
|
||||||
|
multipleMapRotation();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue