doc update
This commit is contained in:
@ -4,11 +4,12 @@ namespace ManiaControl\Callbacks\Structures\TrackMania\Models;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore;
|
||||
|
||||
use ManiaControl\Players\Player;
|
||||
//TODO proper return descriptions on getter methods -> use autogenerate for setter/getter + docs
|
||||
|
||||
/**
|
||||
* PlayerScore Model
|
||||
*
|
||||
* @api
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
@ -26,6 +27,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
/**
|
||||
* Returns the Rank
|
||||
*
|
||||
* @api
|
||||
* @return int
|
||||
*/
|
||||
public function getRank() {
|
||||
@ -35,6 +37,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
/**
|
||||
* Sets the Rank
|
||||
*
|
||||
* @api
|
||||
* @param int $rank
|
||||
*/
|
||||
public function setRank($rank) {
|
||||
@ -42,35 +45,38 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the bestRaceTime
|
||||
*
|
||||
* @param int $bestraceTime
|
||||
*/
|
||||
public function getBestraceTime(){
|
||||
* Gets the bestRaceTime
|
||||
*
|
||||
* @api
|
||||
* @param int $bestraceTime
|
||||
*/
|
||||
public function getBestraceTime() {
|
||||
return $this->bestRaceTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bestlapTime
|
||||
*
|
||||
* @param int $bestlapTime
|
||||
*/
|
||||
public function getBestlapTime(){
|
||||
* Gets the bestlapTime
|
||||
*
|
||||
* @api
|
||||
* @param int $bestlapTime
|
||||
*/
|
||||
public function getBestlapTime() {
|
||||
return $this->bestLapTime;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the StuntScore
|
||||
*
|
||||
* @param int $bestraceTime
|
||||
*/
|
||||
public function getStuntScore(){
|
||||
* Gets the StuntScore
|
||||
*
|
||||
* @api
|
||||
* @param int $bestraceTime
|
||||
*/
|
||||
public function getStuntScore() {
|
||||
return $this->stuntScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestRaceTime
|
||||
*/
|
||||
public function setBestRaceTime($bestRaceTime) {
|
||||
@ -78,6 +84,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestLapTime
|
||||
*/
|
||||
public function setBestLapTime($bestLapTime) {
|
||||
@ -85,6 +92,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $stuntScore
|
||||
*/
|
||||
public function setStuntScore($stuntScore) {
|
||||
@ -92,6 +100,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getBestRaceRespawns() {
|
||||
@ -99,6 +108,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestRaceRespawns
|
||||
*/
|
||||
public function setBestRaceRespawns($bestRaceRespawns) {
|
||||
@ -106,6 +116,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getBestRaceCheckpoints() {
|
||||
@ -113,6 +124,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestRaceCheckpoints
|
||||
*/
|
||||
public function setBestRaceCheckpoints($bestRaceCheckpoints) {
|
||||
@ -120,6 +132,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getBestLapRespawns() {
|
||||
@ -134,6 +147,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getBestLapCheckpoints() {
|
||||
@ -141,6 +155,7 @@ class PlayerScore extends CommonPlayerScore {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param mixed $bestLapCheckpoints
|
||||
*/
|
||||
public function setBestLapCheckpoints($bestLapCheckpoints) {
|
||||
|
@ -7,6 +7,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonTeamScore;
|
||||
/**
|
||||
* Shootmania TeamScore Model
|
||||
*
|
||||
* @api
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
|
@ -5,10 +5,11 @@ namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
//TODO make a common structure between shootmania and this and extend it
|
||||
/**
|
||||
* Structure Class for the OnCommand Structure Callback
|
||||
*
|
||||
* @api
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
@ -18,6 +19,12 @@ class OnCommandStructure extends BaseStructure {
|
||||
private $name;
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* OnCommandStructure constructor.
|
||||
*
|
||||
* @param \ManiaControl\ManiaControl $maniaControl
|
||||
* @param $data
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
@ -29,6 +36,7 @@ class OnCommandStructure extends BaseStructure {
|
||||
/**
|
||||
* < Server time when the event occured
|
||||
*
|
||||
* @api
|
||||
* @return int
|
||||
*/
|
||||
public function getTime() {
|
||||
@ -38,6 +46,7 @@ class OnCommandStructure extends BaseStructure {
|
||||
/**
|
||||
* < Name of the command
|
||||
*
|
||||
* @api
|
||||
* @return string
|
||||
*/
|
||||
public function getName() {
|
||||
@ -51,6 +60,7 @@ class OnCommandStructure extends BaseStructure {
|
||||
* "real": 123.456,
|
||||
* "text": "an example value"
|
||||
*
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue() {
|
||||
|
@ -17,6 +17,12 @@ class OnDefaultEventStructure extends BaseStructure {
|
||||
private $time;
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* OnDefaultEventStructure constructor.
|
||||
*
|
||||
* @param \ManiaControl\ManiaControl $maniaControl
|
||||
* @param $data
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
|
@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
|
||||
/**
|
||||
* Structure Class for the EventStartLine Structure Callback
|
||||
*
|
||||
* @api
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
@ -20,13 +21,14 @@ class OnEventStartLineStructure extends BaseStructure {
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->time = $this->getPlainJsonObject()->time;
|
||||
$this->time = $this->getPlainJsonObject()->time;
|
||||
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Server time when the event occured
|
||||
*
|
||||
* @api
|
||||
* @return int
|
||||
*/
|
||||
public function getTime() {
|
||||
@ -34,10 +36,11 @@ class OnEventStartLineStructure extends BaseStructure {
|
||||
}
|
||||
|
||||
/**
|
||||
* < player who triggered the action
|
||||
*
|
||||
* @return \ManiaControl\Players\Player
|
||||
*/
|
||||
* < player who triggered the action
|
||||
*
|
||||
* @api
|
||||
* @return \ManiaControl\Players\Player
|
||||
*/
|
||||
public function getPlayer() {
|
||||
return $this->player;
|
||||
}
|
||||
|
@ -3,14 +3,15 @@
|
||||
namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\Callbacks\Models\RecordCallback;
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
|
||||
/**
|
||||
* Structure Class for the Default Event Structure Callback
|
||||
*
|
||||
* @api
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
@ -29,22 +30,28 @@ class OnEventWayPointStructure extends BaseStructure {
|
||||
private $speed;
|
||||
private $distance;
|
||||
|
||||
/**
|
||||
* OnEventWayPointStructure constructor.
|
||||
*
|
||||
* @param \ManiaControl\ManiaControl $maniaControl
|
||||
* @param $data
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->time = $this->getPlainJsonObject()->time;
|
||||
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
|
||||
$this->racetime = (int) $this->getPlainJsonObject()->racetime;
|
||||
$this->laptime = (int) $this->getPlainJsonObject()->laptime;
|
||||
$this->stuntsscore = $this->getPlainJsonObject()->stuntsscore;
|
||||
$this->time = $this->getPlainJsonObject()->time;
|
||||
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
|
||||
$this->racetime = (int) $this->getPlainJsonObject()->racetime;
|
||||
$this->laptime = (int) $this->getPlainJsonObject()->laptime;
|
||||
$this->stuntsscore = $this->getPlainJsonObject()->stuntsscore;
|
||||
$this->checkpointinrace = (int) $this->getPlainJsonObject()->checkpointinrace;
|
||||
$this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap;
|
||||
$this->isendrace = $this->getPlainJsonObject()->isendrace;
|
||||
$this->isendlap = $this->getPlainJsonObject()->isendlap;
|
||||
$this->blockid = $this->getPlainJsonObject()->blockid;
|
||||
$this->speed = $this->getPlainJsonObject()->speed;
|
||||
$this->distance = $this->getPlainJsonObject()->distance;
|
||||
|
||||
$this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap;
|
||||
$this->isendrace = $this->getPlainJsonObject()->isendrace;
|
||||
$this->isendlap = $this->getPlainJsonObject()->isendlap;
|
||||
$this->blockid = $this->getPlainJsonObject()->blockid;
|
||||
$this->speed = $this->getPlainJsonObject()->speed;
|
||||
$this->distance = $this->getPlainJsonObject()->distance;
|
||||
|
||||
// Build callback
|
||||
$wayPointCallback = new RecordCallback();
|
||||
$wayPointCallback->rawCallback = $data;
|
||||
@ -74,6 +81,7 @@ class OnEventWayPointStructure extends BaseStructure {
|
||||
/**
|
||||
* Returns Server time when the event occured
|
||||
*
|
||||
* @api
|
||||
* @return int
|
||||
*/
|
||||
public function getTime() {
|
||||
@ -81,12 +89,13 @@ class OnEventWayPointStructure extends BaseStructure {
|
||||
}
|
||||
|
||||
/**
|
||||
* < player who triggered the action
|
||||
*
|
||||
* @return \ManiaControl\Players\Player
|
||||
*/
|
||||
* < player who triggered the action
|
||||
*
|
||||
* @api
|
||||
* @return \ManiaControl\Players\Player
|
||||
*/
|
||||
public function getPlayer() {
|
||||
return $this->player;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -16,6 +16,12 @@ use ManiaControl\ManiaControl;
|
||||
*/
|
||||
class OnScoresStructure extends CommonScoresStructure {
|
||||
|
||||
/**
|
||||
* OnScoresStructure constructor.
|
||||
*
|
||||
* @param \ManiaControl\ManiaControl $maniaControl
|
||||
* @param $data
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
|
Reference in New Issue
Block a user