Class TowLinkWarning
java.lang.Object
megamek.client.ui.panels.phaseDisplay.TowLinkWarning
When deploying units that are towing units, let's mark hexes that would break the tow linkage with warning. or
something
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<BoardLocation> findTowLinkIssues(Game game, Entity entity) findTowLinkIssues(Game game, Entity entity, Board board) This is used by theMovementDisplayclass.findValidDeployCoordsForTractorTrailer(Game game, Entity deployingEntity, Board board) For the provided entity, find its associated tractor and trailer and find what coords this unit is able to deploy to.
-
Constructor Details
-
TowLinkWarning
public TowLinkWarning()
-
-
Method Details
-
findTowLinkIssues
-
findTowLinkIssues
public static List<Coords> findTowLinkIssues(Game game, Entity entity, Board board) throws StackOverflowError This is used by theMovementDisplayclass.- Parameters:
game-Gameprovided by the phase display classentity-Entitycurrently selected in the deployment phase.board-Boardboard object with hex data.- Returns:
- returns a list of
Coordsthat where warning flags should be placed. - Throws:
StackOverflowError- if there is a loop in the towing configuration, or it is longer than MAX_SEARCH_DEPTH
-
findValidDeployCoordsForTractorTrailer
public static List<Coords> findValidDeployCoordsForTractorTrailer(Game game, Entity deployingEntity, Board board) throws StackOverflowError For the provided entity, find its associated tractor and trailer and find what coords this unit is able to deploy to. Will return an empty list for units that aren't tractors/trailers, so don't sue them for them!- Parameters:
game-Gameprovided by the phase display classdeployingEntity-Entitycurrently selected in the deployment phase.board-Boardboard object with hex data.- Returns:
- a list of
Coordsthat this unit could deploy into that would let it connect with its tow connections. Empty if there are no valid locations or if it's not towing. - Throws:
StackOverflowError- if there is a loop in the towing configuration, or it is longer than MAX_SEARCH_DEPTH
-