Record Class EmployerData

java.lang.Object
java.lang.Record
mekhq.campaign.mission.contract.contractData.EmployerData
Record Components:
factionCode - the employer's flavor faction — who is paying the unit and whose theme matches the ChaosEmployerType. Used for display, negotiator/liaison, and camouflage. May be a landless faction (rebels, a mercenary command, a corporation).
anchorFactionCode - the employer's territorial anchor faction — a faction that actually holds ground near the player, used to situate the enemy and target system. Equal to factionCode when the flavor faction is itself a nearby territorial owner.
sponsorFactionCode - the covert patron bankrolling the employer, or null when the employer acts on its own account. Currently only rebels can be sponsored, by a ComStar/Word of Blake patron backing their uprising — the mirror of an enemy fielding sponsored mercenaries.

public record EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, @Nullable String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.enums.SkillLevel forceSkill, int equipmentRating, megamek.common.icons.Camouflage camouflage, megamek.client.ui.util.PlayerColour color) extends Record
  • Constructor Details

    • EmployerData

      public EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, @Nullable String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.icons.Camouflage camouflage)
    • EmployerData

      public EmployerData(EmployerData existingData, megamek.common.enums.SkillLevel forceSkill, int equipmentRating)
    • EmployerData

      public EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, @Nullable String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.enums.SkillLevel forceSkill, int equipmentRating, megamek.common.icons.Camouflage camouflage, megamek.client.ui.util.PlayerColour color)
      Creates an instance of a EmployerData record class.
      Parameters:
      type - the value for the type record component
      factionCode - the value for the factionCode record component
      anchorFactionCode - the value for the anchorFactionCode record component
      sponsorFactionCode - the value for the sponsorFactionCode record component
      displayName - the value for the displayName record component
      negotiator - the value for the negotiator record component
      liaison - the value for the liaison record component
      forceSkill - the value for the forceSkill record component
      equipmentRating - the value for the equipmentRating record component
      camouflage - the value for the camouflage record component
      color - the value for the color record component
  • Method Details

    • getFaction

      public Faction getFaction()
      Returns:
      the flavor faction — who is paying the unit (see factionCode())
    • getAnchorFaction

      public Faction getAnchorFaction()
      Returns:
      the territorial anchor faction used to situate the enemy and target system (see anchorFactionCode())
    • getSponsorFaction

      @Nullable public Faction getSponsorFaction()
      Returns:
      the covert patron bankrolling the employer, or null if the employer has none (see sponsorFactionCode())
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public ChaosEmployerType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • factionCode

      public String factionCode()
      Returns the value of the factionCode record component.
      Returns:
      the value of the factionCode record component
    • anchorFactionCode

      public String anchorFactionCode()
      Returns the value of the anchorFactionCode record component.
      Returns:
      the value of the anchorFactionCode record component
    • sponsorFactionCode

      @Nullable public String sponsorFactionCode()
      Returns the value of the sponsorFactionCode record component.
      Returns:
      the value of the sponsorFactionCode record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • negotiator

      public Person negotiator()
      Returns the value of the negotiator record component.
      Returns:
      the value of the negotiator record component
    • liaison

      public Person liaison()
      Returns the value of the liaison record component.
      Returns:
      the value of the liaison record component
    • forceSkill

      public megamek.common.enums.SkillLevel forceSkill()
      Returns the value of the forceSkill record component.
      Returns:
      the value of the forceSkill record component
    • equipmentRating

      public int equipmentRating()
      Returns the value of the equipmentRating record component.
      Returns:
      the value of the equipmentRating record component
    • camouflage

      public megamek.common.icons.Camouflage camouflage()
      Returns the value of the camouflage record component.
      Returns:
      the value of the camouflage record component
    • color

      public megamek.client.ui.util.PlayerColour color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component