implemented all new shootmania callbacks + some refactors

This commit is contained in:
kremsy
2017-04-07 22:30:55 +02:00
parent 287e6316d6
commit 31054d7502
19 changed files with 601 additions and 32 deletions

View File

@ -25,5 +25,7 @@ class BaseResponseStructure extends BaseStructure {
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->responseId = $this->getPlainJsonObject()->responseid;
}
}

View File

@ -30,7 +30,6 @@ class CommonScoresStructure extends BaseResponseStructure {
$jsonObj = $this->getPlainJsonObject();
$this->responseId = $jsonObj->responseid;
$this->section = $jsonObj->section;
$this->useTeams = $jsonObj->useteams;
$this->winnerTeam = $jsonObj->winnerteam;

View File

@ -0,0 +1,40 @@
<?php
namespace ManiaControl\Callbacks\Structures\ShootMania;
use ManiaControl\Callbacks\Structures\Common\BaseResponseStructure;
use ManiaControl\ManiaControl;
/**
* Structure Class for the StatusCallback Structure Callback
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class StatusCallbackStructure extends BaseResponseStructure {
protected $active;
/**
* Construct a new On Hit Structure
*
* @param ManiaControl $maniaControl
* @param array $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->active = $this->getPlainJsonObject()->active;
}
/**
* True if the Status (Like Combo Pause or Warmup) is Ongoing
*
* @return boolean
*/
public function getActive() {
return $this->active;
}
}