Class CollapseWarning
java.lang.Object
megamek.client.ui.clientGUI.boardview.CollapseWarning
Construction Factor Warning Logic. Handles events, help methods and logic related to CF Warning in a way that can be
unit tested and encapsulated from BoardView and ClientGUI and other actors.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateTotalTonnage
(Game g, Entity selected, Coords c) static boolean
entityTypeIsInWhiteList
(Entity entity) static List<BoardLocation>
findCFWarningsDeployment
(Game game, Entity entity) findCFWarningsDeployment
(Game game, Entity entity, Board board) Looks for all building locations in a legal deploy zone that would collapse if the currently selected entity would deploy there.static List<BoardLocation>
findCFWarningsMovement
(Game game, Entity entity) findCFWarningsMovement
(Game game, Entity entity, Board board) For the provided entity, find all hexes within movement range with buildings that would collapse if entered or landed upon.static void
static boolean
protected static boolean
isEntityPartOfWeight
(Entity selected, Entity inHex) static boolean
shouldShow
(GamePhase gp, boolean isEnabled)
-
Method Details
-
handleActionPerformed
public static void handleActionPerformed() -
isCFWarningPhase
-
shouldShow
-
findCFWarningsMovement
-
findCFWarningsMovement
For the provided entity, find all hexes within movement range with buildings that would collapse if entered or landed upon. This is used by theMovementDisplay
class. -
entityTypeIsInWhiteList
-
findCFWarningsDeployment
-
findCFWarningsDeployment
Looks for all building locations in a legal deploy zone that would collapse if the currently selected entity would deploy there. This is used byDeploymentDisplay
to render a warning sprite on danger hexes. -
calculateTotalTonnage
-
isEntityPartOfWeight
-