Skip to content

Commit

Permalink
GH-139 Use helper function to get storage capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Dec 7, 2020
1 parent 9152e19 commit 9f89f41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion fleet1.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@

$Fleet['array'][$ShipID] = $ShipCount;
$Fleet['count'] += $ShipCount;
$ThisStorage = $_Vars_Prices[$ShipID]['capacity'] * $ShipCount;

$ThisStorage = getShipsStorageCapacity($ShipID) * $ShipCount;

if ($ShipID != 210) {
$Fleet['storage'] += $ThisStorage;
Expand Down
3 changes: 2 additions & 1 deletion fleet2.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@
$ShipCount = floor($ShipCount);
$FleetArray[$ShipID] = $ShipCount;
$Fleet['count'] += $ShipCount;
$ThisStorage = $_Vars_Prices[$ShipID]['capacity'] * $ShipCount;

$ThisStorage = getShipsStorageCapacity($ShipID) * $ShipCount;

if ($ShipID != 210) {
$Fleet['storage'] += $ThisStorage;
Expand Down
3 changes: 2 additions & 1 deletion fleet3.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ function messageRed($Text, $Title)
$ShipCount = floor($ShipCount);
$FleetArray[$ShipID] = $ShipCount;
$Fleet['count'] += $ShipCount;
$ThisStorage = $_Vars_Prices[$ShipID]['capacity'] * $ShipCount;

$ThisStorage = getShipsStorageCapacity($ShipID) * $ShipCount;

if ($ShipID != 210) {
$Fleet['storage'] += $ThisStorage;
Expand Down

0 comments on commit 9f89f41

Please sign in to comment.