- New connection overlays for wormholes, closed #334

This commit is contained in:
Exodus4D
2017-02-22 22:26:27 +01:00
parent 93e4b2b37f
commit 1e928eab1e
23 changed files with 1486 additions and 490 deletions

View File

@@ -1069,6 +1069,39 @@ class Map extends Controller\AccessController {
return $map;
}
/**
* get connectionData
* @param \Base $f3
*/
public function getConnectionData (\Base $f3){
$postData = (array)$f3->get('POST');
$connectionData = [];
if($mapId = (int)$postData['mapId']){
$activeCharacter = $this->getCharacter();
/**
* @var Model\MapModel $map
*/
$map = Model\BasicModel::getNew('MapModel');
$map->getById($mapId);
if($map->hasAccess($activeCharacter)){
$connections = $map->getConnections('wh');
foreach($connections as $connection){
$data = $connection->getData(true);
// skip connections whiteout signature data
if($data->signatures){
$connectionData[] = $data;
}
}
}
}
echo json_encode($connectionData);
}
}