Interface CriticalSlotsView

All Known Implementing Classes:
ASCriticalView, BACriticalView, BMCriticalView, PMCriticalView

public interface CriticalSlotsView
Crit views implementing this interface can help the user by darkening those locations that cannot receive a mouse-dragged equipment. This is used by transfer handlers.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Darkens all other crit blocks (those that are not for the given location).
    void
    markUnavailableLocations(megamek.common.equipment.Mounted<?> equipment)
    Darkens all crit blocks that are unavailable to the given equipment, e.g.
    void
    Resets all crit blocks to not darkened.
  • Method Details

    • markUnavailableLocations

      void markUnavailableLocations(int location)
      Darkens all other crit blocks (those that are not for the given location).
    • markUnavailableLocations

      void markUnavailableLocations(@Nullable megamek.common.equipment.Mounted<?> equipment)
      Darkens all crit blocks that are unavailable to the given equipment, e.g. all but Torsos for CASE. It's a design decision if this should check only if the location is suitable at all, or also equipment space requirements or even equipment counts (e.g. only one sword per location). This can be handled differently vor different unit types.
    • unMarkAllLocations

      void unMarkAllLocations()
      Resets all crit blocks to not darkened.