Implemented ability to split drone stacks by ship's available bandwidth #2237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented an additional option to 'Split Drone Stack to Fit Max Bandwidth' in the right click menu on drone stacks. This will match the size of the stack to the ship's bandwidth limits (or 5 if the limit allows for it) and create a new, inactive stack with the remaining drones. For example, an Algos has 35 mbit/s, so an active stack of 5 medium drones would be split into an active stack of 3 and an inactive stack of 2.
This is particularly useful when importing a fit from the game or the Eve University Wiki where drones might be stacked in higher amounts than the ship is capable of running, and you want to quickly view the DPS from a full flight of drones (or whatever the ship can support).
I've also accounted for situations where the user tries to split stacks of drones the ship can't support, e.g. 2 heavy drones in a Tormentor. Attempting to split a drone stack to fit bandwidth will show the user an error message informing them that this isn't possible.
Fits used to test my changes:
Tristan fit taken from Eve Uni Wiki:
Dominix fit taken from Eve Uni Wiki: