to have this mc version working you need to update the dedicated server scripts
This commit is contained in:
kremsy
2017-04-13 16:12:10 +02:00
parent 09b974e2cc
commit 7a7826b4b6
17 changed files with 273 additions and 64 deletions

View File

@ -0,0 +1,39 @@
<?php
namespace ManiaControl\Callbacks\Structures\Common;
use ManiaControl\ManiaControl;
/**
* Base Structure Class for all Callbacks using a Timestamp
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class BaseTimeStructure extends BaseStructure {
protected $time;
/**
* BaseResponseStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->time = $this->getPlainJsonObject()->time;
}
/**
* Gets the Server Time the Callback was sent
*
* @api
* @return int Time since Serverstart
*/
public function getTime() {
return $this->time;
}
}

View File

@ -24,6 +24,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
protected $rank;
protected $roundPoints;
protected $mapPoints;
protected $matchPoints;
/**
* Returns the Player
@ -105,4 +106,24 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
$this->mapPoints = $mapPoints;
}
/**
* Gets the Match Points
*
* @api
* @return mixed
*/
public function getMatchPoints() {
return $this->matchPoints;
}
/**
* Sets the Match Points
*
* @api
* @param mixed $matchPoints
*/
public function setMatchPoints($matchPoints) {
$this->matchPoints = $matchPoints;
}
}

View File

@ -3,7 +3,6 @@
namespace ManiaControl\Callbacks\Structures\Common;
use ManiaControl\Callbacks\Structures\Common\BaseResponseStructure;
use ManiaControl\ManiaControl;
/**
@ -16,6 +15,7 @@ use ManiaControl\ManiaControl;
*/
class StatusCallbackStructure extends BaseResponseStructure {
protected $active;
protected $available;
/**
* Construct a new On Hit Structure
@ -26,7 +26,8 @@ class StatusCallbackStructure extends BaseResponseStructure {
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->active = $this->getPlainJsonObject()->active;
$this->active = $this->getPlainJsonObject()->active;
$this->available = $this->getPlainJsonObject()->available;
}
/**
@ -39,4 +40,14 @@ class StatusCallbackStructure extends BaseResponseStructure {
return $this->active;
}
/**
* Checks if the Mode uses Warmup or not
*
* @api
* @return boolean
*/
public function isAvailable() {
return $this->available;
}
}