Class FameAndInfamyController

java.lang.Object
mekhq.campaign.universe.fameAndInfamy.FameAndInfamyController

@Deprecated(since="0.50.07") public class FameAndInfamyController extends Object
Deprecated.
  • Constructor Details

    • FameAndInfamyController

      @Deprecated(since="0.50.07", forRemoval=true) public FameAndInfamyController()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor for the FameAndInfamyController class. Initializes the trackingFactions map with the provided map of factions. If any factions are missing from the provided map, they will be added with a default fame value of 3.0 (or 0.0 if the provided faction uses Batchalls).
  • Method Details

    • getAllFactionShortnames

      @Deprecated(since="0.50.07", forRemoval=true) public List<String> getAllFactionShortnames()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the shortnames of all factions from the XML file.
      Returns:
      A list of faction shortnames.
    • getFameForFaction

      @Deprecated(since="0.50.07", forRemoval=true) public double getFameForFaction(String factionCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the precise fame value for a given faction. Normally we don't care what the exact value is, so getFameLevelForFaction should be used, instead.
      Parameters:
      factionCode - the code of the faction
      Returns:
      the fame value for the faction
    • getFameLevelForFaction

      @Deprecated(since="0.50.07", forRemoval=true) public int getFameLevelForFaction(String factionCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the fame level for a faction. This is determined by normally rounding raw fame to the nearest Integer
      Parameters:
      factionCode - The code of the faction.
      Returns:
      The fame level of the faction.
    • getFameName

      @Deprecated(since="0.50.07", forRemoval=true) public String getFameName(String factionCode, boolean isInfamy)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the name of the fame level for a faction.
      Parameters:
      factionCode - The code of the faction.
      isInfamy - Specifies whether to retrieve the fame name for infamy or fame.
      Returns:
      The name of the fame level for the faction.
    • setFameForFaction

      @Deprecated(since="0.50.07", forRemoval=true) public void setFameForFaction(String factionCode, double fame)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the fame value for a specific faction.
      Parameters:
      factionCode - The code representing the faction.
      fame - The fame value to be set for the faction.
    • updateFameForFaction

      @Deprecated(since="0.50.07", forRemoval=true) public void updateFameForFaction(Campaign campaign, String factionCode, double adjustment)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Updates the fame of a faction by a specified adjustment.
      Parameters:
      campaign - The current campaign.
      factionCode - The code representing the faction.
      adjustment - The adjustment to be made to the faction's fame.
    • writeToXml

      @Deprecated(since="0.50.07", forRemoval=true) public void writeToXml(PrintWriter printWriter, int indent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes the fame and infamy data to an XML file using the provided PrintWriter and indent level.
      Parameters:
      printWriter - The PrintWriter used to write to the XML file.
      indent - The indent level for formatting the XML file.