Skip to content

Commit

Permalink
GH-139 Simplify fleet remover entries creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Dec 7, 2020
1 parent 57f10f7 commit 9152e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fleet3.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ function messageRed($Text, $Title)
$Fleet['FuelStorage'] += $ThisStorage;
}

$FleetRemover[] = "`{$_Vars_GameElements[$ShipID]}` = `{$_Vars_GameElements[$ShipID]}` - {$ShipCount}";
$planetElementKey = _getElementPlanetKey($ShipID);
$FleetRemover[] = "`{$planetElementKey}` = `{$planetElementKey}` - {$ShipCount}";
}
} else {
messageRed($_Lang['fl2_FleetArrayPostEmpty'], $ErrorTitle);
Expand Down

0 comments on commit 9152e19

Please sign in to comment.