Class EntityFluff

java.lang.Object
megamek.common.units.EntityFluff
All Implemented Interfaces:
Serializable

public class EntityFluff extends Object implements Serializable
Tracks fluff details for entities.
See Also:
  • Constructor Details

    • EntityFluff

      public EntityFluff()
  • Method Details

    • getCapabilities

      public String getCapabilities()
    • setCapabilities

      public void setCapabilities(String newCapabilities)
    • getOverview

      public String getOverview()
    • setOverview

      public void setOverview(String newOverview)
    • getDeployment

      public String getDeployment()
    • setDeployment

      public void setDeployment(String newDeployment)
    • setHistory

      public void setHistory(String newHistory)
    • getHistory

      public String getHistory()
    • getManufacturer

      public String getManufacturer()
    • setManufacturer

      public void setManufacturer(String manufacturer)
    • getPrimaryFactory

      public String getPrimaryFactory()
    • setPrimaryFactory

      public void setPrimaryFactory(String primaryFactory)
    • getSystemManufacturer

      public String getSystemManufacturer(System system)
      Retrieves the manufacturer of particular system component
      Parameters:
      system - The system component
      Returns:
      The name of the manufacturer, or an empty string if it has not been set.
    • setSystemManufacturer

      public void setSystemManufacturer(System system, @Nullable String manufacturer)
      Sets the name of the manufacturer of a particular system component.
      Parameters:
      system - The system component
      manufacturer - The name of the manufacturer, or null or an empty string to remove the entry.
    • getSystemModel

      public String getSystemModel(System system)
      Retrieves the manufacturer of particular system component
      Parameters:
      system - The system component
      Returns:
      The name of the manufacturer, or an empty string if it has not been set.
    • setSystemModel

      public void setSystemModel(System system, @Nullable String model)
      Sets the model name of a particular system component.
      Parameters:
      system - The system component
      model - The model name, or null or an empty string to remove the entry.
    • getNotes

      public String getNotes()
    • setNotes

      public void setNotes(String notes)
    • getFluffDate

      public String getFluffDate()
      Returns:
      The fluff date string, never null. Handles null from deserialization of older objects.
    • setFluffDate

      public void setFluffDate(String fluffDate)
    • getUse

      public String getUse()
    • setUse

      public void setUse(String use)
    • getLength

      public String getLength()
    • setLength

      public void setLength(String length)
    • getWidth

      public String getWidth()
    • setWidth

      public void setWidth(String width)
    • getHeight

      public String getHeight()
    • setHeight

      public void setHeight(String height)
    • createSystemManufacturersList

      public List<String> createSystemManufacturersList()
      Used for writing the system manufacturers to a unit file
      Returns:
      A list of all system manufacturers formatted as "system:manufacturer"
    • createSystemModelsList

      public List<String> createSystemModelsList()
      Used for writing the system models to a unit file
      Returns:
      A list of all system models formatted as "system:model"
    • setFluffImage

      public void setFluffImage(String fluffImage64)
      Sets the encoded form of the fluff image to the given String.
    • getFluffImage

      @Nullable public Image getFluffImage()
      Returns:
      The unit's fluff image, if a fluff image was stored in the unit file; null otherwise.
    • hasEmbeddedFluffImage

      public boolean hasEmbeddedFluffImage()
      Returns:
      True if a fluff image is part of the unit, i.e. stored in the unit file or set in MML.
    • getBase64FluffImage

      public Base64Image getBase64FluffImage()
      Returns:
      The Base64Image holding an embedded fluff image. Empty if no fluff image was stored in the unit file.