Class FameAndInfamyController

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

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

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    getFameName(String factionCode, boolean isInfamy)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    parseFromXML(NodeList nodeList, Campaign campaign)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    setFameForFaction(String factionCode, double fame)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    updateFameForFaction(Campaign campaign, String factionCode, double adjustment)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    writeToXml(PrintWriter printWriter, int indent)
    Deprecated, for removal: This API element is subject to removal in a future version.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      factionCode - The code representing the faction.
      campaign - The current campaign.
      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.
    • parseFromXML

      @Deprecated(since="0.50.07", forRemoval=true) public static void parseFromXML(NodeList nodeList, Campaign campaign)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parses the XML NodeList and updates the fame values for factions in a Campaign.
      Parameters:
      nodeList - The XML NodeList containing the faction fame values.
      campaign - The Campaign object to update with the parsed fame values.