fixed number mismatch declerations

code cleanups
This commit is contained in:
kremsy
2020-04-21 17:57:36 +02:00
parent 06b3893a27
commit f31a1c1782
28 changed files with 121 additions and 146 deletions

View File

@ -9,14 +9,12 @@ use ManiaControl\Admin\AuthenticationManager;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\Callbacks;
use ManiaControl\Callbacks\Structures\Common\StatusCallbackStructure;
use ManiaControl\Callbacks\Structures\TrackMania\OnPointsRepartitionStructure;
use ManiaControl\Callbacks\TimerListener;
use ManiaControl\Commands\CommandListener;
use ManiaControl\Logger;
use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Players\Player;
use Maniaplanet\DedicatedServer\Xmlrpc\FaultException;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
/**
@ -30,17 +28,17 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
/*
* Constants
*/
const ACTION_SET_PAUSE = 'ServerCommands.SetPause';
const ACTION_EXTEND_WARMUP = 'ServerCommands.ExtendWarmup';
const ACTION_END_WARMUP = 'ServerCommands.EndWarmup';
const ACTION_CANCEL_VOTE = 'ServerCommands.CancelVote';
const CB_VOTE_CANCELLED = 'ServerCommands.VoteCancelled';
const SETTING_PERMISSION_CANCEL_VOTE = 'Cancel Vote';
const SETTING_PERMISSION_SET_PAUSE = 'Set Pause';
const SETTING_PERMISSION_HANDLE_WARMUP = 'Handle Warmup';
const SETTING_PERMISSION_SHOW_SYSTEMINFO = 'Show SystemInfo';
const SETTING_PERMISSION_SHUTDOWN_SERVER = 'Shutdown Server';
const SETTING_PERMISSION_CHANGE_SERVERSETTINGS = 'Change ServerSettings';
const ACTION_SET_PAUSE = 'ServerCommands.SetPause';
const ACTION_EXTEND_WARMUP = 'ServerCommands.ExtendWarmup';
const ACTION_END_WARMUP = 'ServerCommands.EndWarmup';
const ACTION_CANCEL_VOTE = 'ServerCommands.CancelVote';
const CB_VOTE_CANCELLED = 'ServerCommands.VoteCancelled';
const SETTING_PERMISSION_CANCEL_VOTE = 'Cancel Vote';
const SETTING_PERMISSION_SET_PAUSE = 'Set Pause';
const SETTING_PERMISSION_HANDLE_WARMUP = 'Handle Warmup';
const SETTING_PERMISSION_SHOW_SYSTEMINFO = 'Show SystemInfo';
const SETTING_PERMISSION_SHUTDOWN_SERVER = 'Shutdown Server';
const SETTING_PERMISSION_CHANGE_SERVERSETTINGS = 'Change ServerSettings';
/*
* Private properties

View File

@ -11,6 +11,7 @@ use ManiaControl\ManiaControl;
use ManiaControl\Maps\Map;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
//TODO delete this class
/**
* Class managing Rankings
*
@ -109,7 +110,7 @@ class RankingManager implements CallbackListener, UsageInformationAble {
array_multisort($this->rankings, SORT_DESC, SORT_NUMERIC);
//TODO if Local Records activated-> sort asc
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::RANKINGSUPDATED, $this->getRankings());
//$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::RANKINGSUPDATED, $this->getRankings());
}
/**
@ -134,7 +135,7 @@ class RankingManager implements CallbackListener, UsageInformationAble {
return $leaders;
}
// FIXME: $leader doesn't exist
array_push($leaders, $leader);
//array_push($leaders, $leader);
$prev = $score;
}
return null;

View File

@ -5,19 +5,19 @@ namespace ManiaControl\Server;
use FML\Components\CheckBox;
use FML\Controls\Entry;
use FML\Controls\Frame;
use FML\Controls\Label;
use FML\Controls\Labels\Label_Text;
use FML\Controls\Quad;
use FML\Controls\Quads\Quad_Icons64x64_1;
use FML\Script\Features\Paging;
use FML\Script\Script;
use FML\XmlRpc\UIProperties;
use ManiaControl\Admin\AuthenticationManager;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\Callbacks;
use ManiaControl\Callbacks\TimerListener;
use ManiaControl\Callbacks\Structures\Common\UIPropertiesBaseStructure;
use ManiaControl\Configurator\Configurator;
use ManiaControl\Configurator\ConfiguratorMenu;
use ManiaControl\Logger;
use ManiaControl\ManiaControl;