Class FieldRepairsScript

java.lang.Object
com.fs.starfarer.api.impl.campaign.skills.FieldRepairsScript
All Implemented Interfaces:
EveryFrameScript

public class FieldRepairsScript extends Object implements EveryFrameScript
Used for the Hull Restoration skill, but keeping the name for save compatibility.
Author:
Alex Copyright 2021 Fractal Softworks, LLC
  • Field Details

    • MONTHS_PER_DMOD_REMOVAL

      public static int MONTHS_PER_DMOD_REMOVAL
    • RATE_DP_MAX

      public static float RATE_DP_MAX
    • RATE_DP_MIN

      public static float RATE_DP_MIN
    • MAX_RATE_MULT

      public static float MAX_RATE_MULT
    • REMOVE_DMOD_FROM_NEW_SHIPS

      public static boolean REMOVE_DMOD_FROM_NEW_SHIPS
    • MIN_NEW_REMOVE_PROB

      public static float MIN_NEW_REMOVE_PROB
    • NEW_REMOVE_PROB_PER_DMOD

      public static float NEW_REMOVE_PROB_PER_DMOD
    • tracker

      protected IntervalUtil tracker
    • tracker2

      protected IntervalUtil tracker2
    • pickedNew

      protected FleetMemberAPI pickedNew
    • dmodNew

      protected String dmodNew
    • newRandom

      protected Random newRandom
    • seen

      protected LinkedHashSet<String> seen
    • picked

      protected FleetMemberAPI picked
    • dmod

      protected String dmod
  • Constructor Details

    • FieldRepairsScript

      public FieldRepairsScript()
  • Method Details

    • advance

      public void advance(float amount)
      Description copied from interface: EveryFrameScript
      Use SectorAPI.getClock() to convert to campaign days.
      Specified by:
      advance in interface EveryFrameScript
      Parameters:
      amount - seconds elapsed during the last frame.
    • pickNext

      public void pickNext()
    • pickNextNew

      public void pickNextNew()
    • isDone

      public boolean isDone()
      Specified by:
      isDone in interface EveryFrameScript
      Returns:
      true when the script is finished and can be cleaned up by the engine.
    • runWhilePaused

      public boolean runWhilePaused()
      Specified by:
      runWhilePaused in interface EveryFrameScript
      Returns:
      whether advance() should be called while the campaign engine is paused.
    • getBaseNonDHullFor

      public static ShipHullSpecAPI getBaseNonDHullFor(ShipVariantAPI v)
    • restoreToNonDHull

      public static void restoreToNonDHull(ShipVariantAPI v)