Add new properties
This commit is contained in:
parent
9edb5de5c6
commit
7967779492
@ -21,6 +21,10 @@ class OnWayPointEventStructure extends BasePlayerTimeStructure {
|
|||||||
private $stuntsScore;
|
private $stuntsScore;
|
||||||
private $checkPointInRace;
|
private $checkPointInRace;
|
||||||
private $checkPointInLap;
|
private $checkPointInLap;
|
||||||
|
private $curRaceCheckpoints;
|
||||||
|
private $curLapCheckpoints;
|
||||||
|
private $isInfiniteLaps;
|
||||||
|
private $isIndependentLaps;
|
||||||
private $isEndRace;
|
private $isEndRace;
|
||||||
private $isEndLap;
|
private $isEndLap;
|
||||||
private $blockId;
|
private $blockId;
|
||||||
@ -37,16 +41,20 @@ class OnWayPointEventStructure extends BasePlayerTimeStructure {
|
|||||||
public function __construct(ManiaControl $maniaControl, $data) {
|
public function __construct(ManiaControl $maniaControl, $data) {
|
||||||
parent::__construct($maniaControl, $data);
|
parent::__construct($maniaControl, $data);
|
||||||
|
|
||||||
$this->raceTime = (int) $this->getPlainJsonObject()->racetime;
|
$this->raceTime = (int) $this->getPlainJsonObject()->racetime;
|
||||||
$this->lapTime = (int) $this->getPlainJsonObject()->laptime;
|
$this->lapTime = (int) $this->getPlainJsonObject()->laptime;
|
||||||
$this->stuntsScore = isset($this->getPlainJsonObject()->stuntsscore) ? $this->getPlainJsonObject()->stuntsscore : null;
|
$this->stuntsScore = isset($this->getPlainJsonObject()->stuntsscore) ? $this->getPlainJsonObject()->stuntsscore : null;
|
||||||
$this->checkPointInRace = (int) $this->getPlainJsonObject()->checkpointinrace;
|
$this->checkPointInRace = (int) $this->getPlainJsonObject()->checkpointinrace;
|
||||||
$this->checkPointInLap = (int) $this->getPlainJsonObject()->checkpointinlap;
|
$this->checkPointInLap = (int) $this->getPlainJsonObject()->checkpointinlap;
|
||||||
$this->isEndRace = Formatter::parseBoolean($this->getPlainJsonObject()->isendrace);
|
$this->curRaceCheckpoints = isset($this->getPlainJsonObject()->curracecheckpoints) ? $this->getPlainJsonObject()->curracecheckpoints : null;
|
||||||
$this->isEndLap = Formatter::parseBoolean($this->getPlainJsonObject()->isendlap);
|
$this->curLapCheckpoints = isset($this->getPlainJsonObject()->curlapcheckpoints) ? $this->getPlainJsonObject()->curlapcheckpoints : null;
|
||||||
$this->blockId = $this->getPlainJsonObject()->blockid;
|
$this->isInfiniteLaps = isset($this->getPlainJsonObject()->isinfinitelaps) ? Formatter::parseBoolean($this->getPlainJsonObject()->isinfinitelaps) : null;
|
||||||
$this->speed = $this->getPlainJsonObject()->speed;
|
$this->isIndependentLaps = isset($this->getPlainJsonObject()->isindependentlaps) ? Formatter::parseBoolean($this->getPlainJsonObject()->isindependentlaps) : null;
|
||||||
$this->distance = isset($this->getPlainJsonObject()->distance) ? $this->getPlainJsonObject()->distance : null;
|
$this->isEndRace = Formatter::parseBoolean($this->getPlainJsonObject()->isendrace);
|
||||||
|
$this->isEndLap = Formatter::parseBoolean($this->getPlainJsonObject()->isendlap);
|
||||||
|
$this->blockId = $this->getPlainJsonObject()->blockid;
|
||||||
|
$this->speed = $this->getPlainJsonObject()->speed;
|
||||||
|
$this->distance = isset($this->getPlainJsonObject()->distance) ? $this->getPlainJsonObject()->distance : null;
|
||||||
|
|
||||||
if ($this->checkPointInRace > 0) {
|
if ($this->checkPointInRace > 0) {
|
||||||
$currentMap = $this->maniaControl->getMapManager()->getCurrentMap();
|
$currentMap = $this->maniaControl->getMapManager()->getCurrentMap();
|
||||||
@ -94,6 +102,38 @@ class OnWayPointEventStructure extends BasePlayerTimeStructure {
|
|||||||
return $this->checkPointInLap;
|
return $this->checkPointInLap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public function getCurRaceCheckpoints() {
|
||||||
|
return $this->curRaceCheckpoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public function getCurLapCheckpoints() {
|
||||||
|
return $this->curLapCheckpoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return bool|null
|
||||||
|
*/
|
||||||
|
public function getIsInfiniteLaps() {
|
||||||
|
return $this->isInfiniteLaps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api
|
||||||
|
* @return bool|null
|
||||||
|
*/
|
||||||
|
public function getIsIndependentLaps() {
|
||||||
|
return $this->isIndependentLaps;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
Loading…
Reference in New Issue
Block a user