- removed SDE database requirement from Pathfinder, #628

- improved "shattered" wormholes (e.g. UI updates on map, fixed broken statics,..), closed #647
- improved "route search" algorithm, WHs are no longer supposed to be "insecure"
This commit is contained in:
Mark Friedrich
2018-06-30 13:19:12 +02:00
parent e65d2b8bc0
commit e7184b7312
32 changed files with 653 additions and 913 deletions

View File

@@ -470,25 +470,20 @@ class MapModel extends AbstractMapTrackingModel {
* @return SystemModel
* @throws \Exception
*/
public function getNewSystem($systemId){
public function getNewSystem(int $systemId) : SystemModel {
// check for "inactive" system
$system = $this->getSystemByCCPId($systemId);
if(is_null($system)){
// get blank system
$systemController = new System();
$systems = $systemController->getSystemModelByIds([$systemId]);
if(count($systems)){
$system = reset($systems);
$system->mapId = $this->_id;
}else{
// should NEVER happen -> systemId does NOT exist in New Eden!!
$this->getF3()->error(500, 'SystemId "' . $systemId . '"" does not exist in EVE!' );
}
/**
* @var $system SystemModel
*/
$system = $this->rel('systems');
$system->systemId = $systemId;
$system->mapId = $this;
$system->setType();
}
if($system){
$system->setActive(true);
}
$system->setActive(true);
return $system;
}
@@ -499,7 +494,7 @@ class MapModel extends AbstractMapTrackingModel {
* @param SystemModel $targetSystem
* @return ConnectionModel
*/
public function getNewConnection(SystemModel $sourceSystem, SystemModel $targetSystem){
public function getNewConnection(SystemModel $sourceSystem, SystemModel $targetSystem) : ConnectionModel {
/**
* @var $connection ConnectionModel
*/
@@ -562,7 +557,7 @@ class MapModel extends AbstractMapTrackingModel {
* get either all system models in this map
* @return SystemModel[]
*/
public function getSystems(){
protected function getSystems(){
$systems = [];
// orderBy x-Coordinate for smoother frontend animation (left to right)