@@ -814,6 +814,9 @@ discard block |
||
| 814 | 814 | return max(0, $this->shipsGetCapacity() - $this->resourcesGetTotal()); |
| 815 | 815 | } |
| 816 | 816 | |
| 817 | + /** |
|
| 818 | + * @param integer $ship_id |
|
| 819 | + */ |
|
| 817 | 820 | public function shipsGetTotalById($ship_id) { |
| 818 | 821 | return $this->unitList->unitsCountById($ship_id); |
| 819 | 822 | } |
@@ -928,7 +931,7 @@ discard block |
||
| 928 | 931 | /** |
| 929 | 932 | * Set current resource list from array of units |
| 930 | 933 | * |
| 931 | - * @param array $resource_list |
|
| 934 | + * @param integer[] $resource_list |
|
| 932 | 935 | */ |
| 933 | 936 | public function resourcesSet($resource_list) { |
| 934 | 937 | if(!empty($this->propertiesAdjusted['resource_list'])) { |
@@ -973,7 +976,7 @@ discard block |
||
| 973 | 976 | } |
| 974 | 977 | |
| 975 | 978 | /** |
| 976 | - * @param array $rate |
|
| 979 | + * @param integer[] $rate |
|
| 977 | 980 | * |
| 978 | 981 | * @return float |
| 979 | 982 | */ |
@@ -1004,7 +1007,6 @@ discard block |
||
| 1004 | 1007 | * Restores fleet or resources to planet |
| 1005 | 1008 | * |
| 1006 | 1009 | * @param bool $start |
| 1007 | - * @param bool $only_resources |
|
| 1008 | 1010 | * @param int $result |
| 1009 | 1011 | * |
| 1010 | 1012 | * @return int |
@@ -1055,7 +1057,7 @@ discard block |
||
| 1055 | 1057 | /** |
| 1056 | 1058 | * @param int $speed_percent |
| 1057 | 1059 | * |
| 1058 | - * @return array |
|
| 1060 | + * @return integer |
|
| 1059 | 1061 | */ |
| 1060 | 1062 | protected function flt_travel_data($speed_percent = 10) { |
| 1061 | 1063 | $distance = $this->targetVector->distanceFromCoordinates($this->dbSourcePlanetRow); |
@@ -1157,6 +1159,9 @@ discard block |
||
| 1157 | 1159 | } |
| 1158 | 1160 | } |
| 1159 | 1161 | |
| 1162 | + /** |
|
| 1163 | + * @param integer $errorCode |
|
| 1164 | + */ |
|
| 1160 | 1165 | public function restrictToTypePlanet($errorCode) { |
| 1161 | 1166 | if($this->targetVector->type != PT_PLANET) { |
| 1162 | 1167 | throw new Exception($errorCode, $errorCode); |
@@ -2558,6 +2563,9 @@ discard block |
||
| 2558 | 2563 | return $result; |
| 2559 | 2564 | } |
| 2560 | 2565 | |
| 2566 | + /** |
|
| 2567 | + * @param integer $missionType |
|
| 2568 | + */ |
|
| 2561 | 2569 | protected function checkMission($missionType) { |
| 2562 | 2570 | $result = !$this->_mission_type || $this->_mission_type == $missionType; |
| 2563 | 2571 | if($result) { |
@@ -2571,6 +2579,9 @@ discard block |
||
| 2571 | 2579 | return $result; |
| 2572 | 2580 | } |
| 2573 | 2581 | |
| 2582 | + /** |
|
| 2583 | + * @param integer $missionType |
|
| 2584 | + */ |
|
| 2574 | 2585 | protected function checkMissionNonRestrict($missionType) { |
| 2575 | 2586 | return $this->_mission_type == $missionType; |
| 2576 | 2587 | } |