Alarms

public class AlarmManager

Alarm manager. Obtained by calling getAlarmManager().

java.util.List<Alarm> getAlarms()

A list of all alarms.

static Alarm addAlarm(Connection connection, double time, String title, String description)

Create an alarm.

Parameters:
  • time (double) – Number of seconds from now that the alarm should trigger.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

static Alarm addVesselAlarm(Connection connection, double time, Vessel vessel, String title, String description)

Create an alarm linked to a vessel.

Parameters:
  • time (double) – Number of seconds from now that the alarm should trigger.

  • vessel (Vessel) – Vessel to link the alarm to.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

static Alarm addApoapsisAlarm(Connection connection, Vessel vessel, double offset, String title, String description)

Create an alarm for the given vessel’s next apoapsis.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (double) – Time in seconds to offset the alarm by.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

static Alarm addPeriapsisAlarm(Connection connection, Vessel vessel, double offset, String title, String description)

Create an alarm for the given vessel’s next periapsis.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (double) – Time in seconds to offset the alarm by.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

static Alarm addManeuverNodeAlarm(Connection connection, Vessel vessel, Node node, double offset, boolean addBurnTime, String title, String description)

Create an alarm for the given vessel and maneuver node.

Parameters:
  • vessel (Vessel) – The vessel.

  • node (Node) – The maneuver node.

  • offset (double) – Time in seconds to offset the alarm by.

  • addBurnTime (boolean) – Whether the node’s burn time should be included in the alarm.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

static Alarm addSOIAlarm(Connection connection, Vessel vessel, double offset, String title, String description)

Create an alarm for the given vessel’s next sphere of influence change.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (double) – Time in seconds to offset the alarm by.

  • title (String) – Title for the alarm.

  • description (String) – Description for the alarm.

public class Alarm

An alarm. Can be accessed using getAlarmManager().

int getID()

Unique identifier of the alarm. KSP destroys and recreates an alarm when it is edited. This id will remain constant between the old and new alarms.

String getType()

Type of alarm

String getTitle()

Title of the alarm

String getDescription()

Description of the alarm.

double getTime()

Time the alarm will trigger.

double getTimeUntil()

Time until the alarm triggers.

double getEventOffset()

Seconds between the alarm going off and the event it references.

Vessel getVessel()

Vessel the alarm references. null if it does not reference a vessel.