@@ -819,6 +819,9 @@ discard block |
||
| 819 | 819 | return max(0, $this->shipsGetCapacity() - $this->resourcesGetTotal()); |
| 820 | 820 | } |
| 821 | 821 | |
| 822 | + /** |
|
| 823 | + * @param integer $ship_id |
|
| 824 | + */ |
|
| 822 | 825 | public function shipsGetTotalById($ship_id) { |
| 823 | 826 | return $this->unitList->unitsCountById($ship_id); |
| 824 | 827 | } |
@@ -933,7 +936,7 @@ discard block |
||
| 933 | 936 | /** |
| 934 | 937 | * Set current resource list from array of units |
| 935 | 938 | * |
| 936 | - * @param array $resource_list |
|
| 939 | + * @param integer[] $resource_list |
|
| 937 | 940 | */ |
| 938 | 941 | public function resourcesSet($resource_list) { |
| 939 | 942 | if(!empty($this->propertiesAdjusted['resource_list'])) { |
@@ -978,7 +981,7 @@ discard block |
||
| 978 | 981 | } |
| 979 | 982 | |
| 980 | 983 | /** |
| 981 | - * @param array $rate |
|
| 984 | + * @param integer[] $rate |
|
| 982 | 985 | * |
| 983 | 986 | * @return float |
| 984 | 987 | */ |
@@ -1009,7 +1012,6 @@ discard block |
||
| 1009 | 1012 | * Restores fleet or resources to planet |
| 1010 | 1013 | * |
| 1011 | 1014 | * @param bool $start |
| 1012 | - * @param bool $only_resources |
|
| 1013 | 1015 | * @param int $result |
| 1014 | 1016 | * |
| 1015 | 1017 | * @return int |
@@ -1060,7 +1062,7 @@ discard block |
||
| 1060 | 1062 | /** |
| 1061 | 1063 | * @param int $speed_percent |
| 1062 | 1064 | * |
| 1063 | - * @return array |
|
| 1065 | + * @return integer |
|
| 1064 | 1066 | */ |
| 1065 | 1067 | protected function flt_travel_data($speed_percent = 10) { |
| 1066 | 1068 | $distance = $this->targetVector->distanceFromCoordinates($this->dbSourcePlanetRow); |
@@ -1161,6 +1163,9 @@ discard block |
||
| 1161 | 1163 | } |
| 1162 | 1164 | } |
| 1163 | 1165 | |
| 1166 | + /** |
|
| 1167 | + * @param integer $errorCode |
|
| 1168 | + */ |
|
| 1164 | 1169 | public function restrictToTypePlanet($errorCode) { |
| 1165 | 1170 | if($this->targetVector->type != PT_PLANET) { |
| 1166 | 1171 | throw new Exception($errorCode, $errorCode); |
@@ -324,6 +324,10 @@ |
||
| 324 | 324 | * @return int|mixed |
| 325 | 325 | */ |
| 326 | 326 | // TODO - REDO!!!! |
| 327 | + |
|
| 328 | + /** |
|
| 329 | + * @return double |
|
| 330 | + */ |
|
| 327 | 331 | function flt_fleet_speed($user) { |
| 328 | 332 | $speeds = array(); |
| 329 | 333 | if(!empty($this->mapUnitIdToDb)) { |