Completed
Push — work-fleets ( 17c73c...5437e0 )
by SuperNova.WS
05:14
created
includes/vars.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -333,26 +333,26 @@  discard block
 block discarded – undo
333 333
     // Each mission will filter only necessary checks and do it in this order
334 334
     'mission_checks' => array(
335 335
       // Cheap checks - class Fleet already have all this info internally
336
-      'checkSenderNoVacation'        => FLIGHT_PLAYER_VACATION_OWN,                           //+
337
-      'checkTargetNoVacation'        => FLIGHT_PLAYER_VACATION,                                  //+
338
-      'checkFleetNotEmpty'           => FLIGHT_SHIPS_NO_SHIPS,                                //+
336
+      'checkSenderNoVacation'        => FLIGHT_PLAYER_VACATION_OWN, //+
337
+      'checkTargetNoVacation'        => FLIGHT_PLAYER_VACATION, //+
338
+      'checkFleetNotEmpty'           => FLIGHT_SHIPS_NO_SHIPS, //+
339 339
       // FLIGHT_MISSION_UNKNOWN
340 340
       // FLIGHT_RESOURCES_FORBIDDEN
341
-      'checkSpeedPercentOld'         => FLIGHT_FLEET_SPEED_WRONG,                             //+
342
-      'checkTargetNotSource'         => FLIGHT_VECTOR_SAME_SOURCE,                            //+
341
+      'checkSpeedPercentOld'         => FLIGHT_FLEET_SPEED_WRONG, //+
342
+      'checkTargetNotSource'         => FLIGHT_VECTOR_SAME_SOURCE, //+
343 343
       'checkTargetInUniverse'        => FLIGHT_VECTOR_BEYOND_UNIVERSE,
344
-      'checkUnitsPositive'           => FLIGHT_SHIPS_NEGATIVE,                                //+
344
+      'checkUnitsPositive'           => FLIGHT_SHIPS_NEGATIVE, //+
345 345
       'checkOnlyFleetUnits'          => FLIGHT_SHIPS_UNIT_WRONG,
346
-      'checkOnlyFlyingUnits'         => FLIGHT_SHIPS_UNMOVABLE,                               //+
347
-      'checkResourcesPositive'       => FLIGHT_RESOURCES_NEGATIVE,                            //+
348
-      'checkNotTooFar'               => FLIGHT_FLEET_TOO_FAR,                                //+
349
-      'checkEnoughCapacity'          => FLIGHT_FLEET_OVERLOAD,                                //+
346
+      'checkOnlyFlyingUnits'         => FLIGHT_SHIPS_UNMOVABLE, //+
347
+      'checkResourcesPositive'       => FLIGHT_RESOURCES_NEGATIVE, //+
348
+      'checkNotTooFar'               => FLIGHT_FLEET_TOO_FAR, //+
349
+      'checkEnoughCapacity'          => FLIGHT_FLEET_OVERLOAD, //+
350 350
       // Medium checks - currently requires access to DB but potentially doesn't
351
-      'checkSourceEnoughShips'       => FLIGHT_SHIPS_NOT_ENOUGH,                              //+
352
-      'checkSourceEnoughFuel'        => FLIGHT_RESOURCES_FUEL_NOT_ENOUGH,                     //+
353
-      'checkSourceEnoughResources'   => FLIGHT_RESOURCES_NOT_ENOUGH,                          //+
351
+      'checkSourceEnoughShips'       => FLIGHT_SHIPS_NOT_ENOUGH, //+
352
+      'checkSourceEnoughFuel'        => FLIGHT_RESOURCES_FUEL_NOT_ENOUGH, //+
353
+      'checkSourceEnoughResources'   => FLIGHT_RESOURCES_NOT_ENOUGH, //+
354 354
       // Heavy checks - will absolutely require DB access
355
-      'checkEnoughFleetSlots'        => FLIGHT_FLEET_NO_SLOTS,                                //+
355
+      'checkEnoughFleetSlots'        => FLIGHT_FLEET_NO_SLOTS, //+
356 356
 
357 357
       // Vector targeting space beyond MaxPlanet forces MT_EXPLORE mission
358 358
       'checkKnownSpace'              => array(
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
           'checkNotOnlySpies'   => FLIGHT_SHIPS_NOT_ONLY_SPIES,
363 363
           'checkNoMissiles'     => FLIGHT_SHIPS_NO_MISSILES,
364 364
           'forceMissionExplore' => array(
365
-            true  => FLIGHT_ALLOWED,                                                         //+
365
+            true  => FLIGHT_ALLOWED, //+
366 366
             false => FLIGHT_VECTOR_BEYOND_SYSTEM,
367 367
           ),
368 368
         ),
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
           'checkNoMissiles'      => FLIGHT_SHIPS_NO_MISSILES,
378 378
           'checkTargetIsPlanet'  => FLIGHT_MISSION_COLONIZE_NOT_PLANET,
379 379
           'forceMissionColonize' => array(
380
-            true  => FLIGHT_ALLOWED,                                                         //+
380
+            true  => FLIGHT_ALLOWED, //+
381 381
             false => FLIGHT_VECTOR_NO_TARGET,
382 382
           ),
383 383
         ),
@@ -388,11 +388,11 @@  discard block
 block discarded – undo
388 388
       'checkTargetIsDebris'          => array(
389 389
         true => array(
390 390
           // Recycle mission checks
391
-          'checkHaveRecyclers'  => FLIGHT_SHIPS_NO_RECYCLERS,             //+
391
+          'checkHaveRecyclers'  => FLIGHT_SHIPS_NO_RECYCLERS, //+
392 392
           'checkNoMissiles'     => FLIGHT_SHIPS_NO_MISSILES,
393
-          'checkDebrisExists'   => FLIGHT_MISSION_RECYCLE_NO_DEBRIS,    //+
393
+          'checkDebrisExists'   => FLIGHT_MISSION_RECYCLE_NO_DEBRIS, //+
394 394
           'forceMissionRecycle' => array(
395
-            true  => FLIGHT_ALLOWED,                                                                           //+
395
+            true  => FLIGHT_ALLOWED, //+
396 396
             false => FLIGHT_VECTOR_TARGET_DEBRIS,
397 397
           ),
398 398
         ),
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 
489 489
 
490 490
       // Check for multiaccount
491
-      'checkMultiAccount'            => FLIGHT_PLAYER_SAME_IP,                                  //+
491
+      'checkMultiAccount'            => FLIGHT_PLAYER_SAME_IP, //+
492 492
       // TODO - check for moratorium
493 493
 
494 494
 
Please login to merge, or discard this patch.
includes/classes/Fleet.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
   protected function renderFleetShortcuts(&$template_result) {
1657 1657
     // Building list of shortcuts
1658 1658
     $query = db_note_list_select_by_owner_and_planet($this->dbOwnerRow);
1659
-    while($row = db_fetch($query)) {
1659
+    while ($row = db_fetch($query)) {
1660 1660
       $template_result['.']['shortcut'][] = $this->renderFleet1TargetSelect($row);
1661 1661
     }
1662 1662
   }
@@ -1686,7 +1686,7 @@  discard block
 block discarded – undo
1686 1686
    */
1687 1687
   protected function renderACSList(&$template_result) {
1688 1688
     $query = db_acs_get_list();
1689
-    while($row = db_fetch($query)) {
1689
+    while ($row = db_fetch($query)) {
1690 1690
       $members = explode(',', $row['eingeladen']);
1691 1691
       foreach ($members as $a => $b) {
1692 1692
         if ($b == $this->dbOwnerRow['id']) {
@@ -1807,8 +1807,7 @@  discard block
 block discarded – undo
1807 1807
     $this->renderAllowedMissions($template_result);
1808 1808
     $this->renderFleet($template_result);
1809 1809
 
1810
-    $max_duration = $this->_mission_type == MT_EXPLORE ? get_player_max_expedition_duration($this->dbOwnerRow) :
1811
-      (isset($this->allowed_missions[MT_HOLD]) ? 12 : 0);
1810
+    $max_duration = $this->_mission_type == MT_EXPLORE ? get_player_max_expedition_duration($this->dbOwnerRow) : (isset($this->allowed_missions[MT_HOLD]) ? 12 : 0);
1812 1811
     $this->renderDuration($template_result, $max_duration);
1813 1812
 
1814 1813
     $travel_data = $this->flt_travel_data($this->oldSpeedInTens);
@@ -2576,8 +2575,8 @@  discard block
 block discarded – undo
2576 2575
    */
2577 2576
   protected function unsetMissionSpyComplex() {
2578 2577
     unset($this->allowed_missions[MT_SPY]);
2579
-    if($this->_mission_type == MT_SPY) {
2580
-      if($this->checkRealFlight()) {
2578
+    if ($this->_mission_type == MT_SPY) {
2579
+      if ($this->checkRealFlight()) {
2581 2580
         return false;
2582 2581
       }
2583 2582
       $this->_mission_type = MT_NONE;
Please login to merge, or discard this patch.