Alarm#

class KerbalAlarmClock.Alarm#

Represents an alarm. Obtained by calling KerbalAlarmClock.alarms, KerbalAlarmClock.alarm_with_name() or KerbalAlarmClock.alarms_with_type().

action: KerbalAlarmClock.AlarmAction#

The action that the alarm triggers.

Attribute:

Can be read or written

Return type:

KerbalAlarmClock.AlarmAction

margin: number#

The number of seconds before the event that the alarm will fire.

Attribute:

Can be read or written

Return type:

number

time: number#

The time at which the alarm will fire.

Attribute:

Can be read or written

Return type:

number

type: KerbalAlarmClock.AlarmType#

The type of the alarm.

Attribute:

Read-only, cannot be set

Return type:

KerbalAlarmClock.AlarmType

id: string#

The unique identifier for the alarm.

Attribute:

Read-only, cannot be set

Return type:

string

name: string#

The short name of the alarm.

Attribute:

Can be read or written

Return type:

string

notes: string#

The long description of the alarm.

Attribute:

Can be read or written

Return type:

string

remaining: number#

The number of seconds until the alarm will fire.

Attribute:

Read-only, cannot be set

Return type:

number

enabled: boolean#

Whether the alarm is enabled. A disabled alarm does not fire.

Attribute:

Can be read or written

Return type:

boolean

play_sound: boolean#

Whether the alarm plays a sound when it fires.

Attribute:

Can be read or written

Return type:

boolean

triggered: boolean#

Whether the alarm has fired. Remains true once the alarm has fired; stream this or use it in an event expression to react to the alarm firing.

Attribute:

Read-only, cannot be set

Return type:

boolean

repeat: boolean#

Whether the alarm will be repeated after it has fired. Only has an effect for alarm types that support repeating (see KerbalAlarmClock.Alarm.supports_repeat).

Attribute:

Can be read or written

Return type:

boolean

supports_repeat: boolean#

Whether this alarm’s type supports repeating (see KerbalAlarmClock.Alarm.repeat).

Attribute:

Read-only, cannot be set

Return type:

boolean

repeat_period: number#

The time delay to automatically create an alarm after it has fired. Only has an effect for alarm types that support a repeat period (see KerbalAlarmClock.Alarm.supports_repeat_period).

Attribute:

Can be read or written

Return type:

number

supports_repeat_period: boolean#

Whether this alarm’s type supports a repeat period (see KerbalAlarmClock.Alarm.repeat_period).

Attribute:

Read-only, cannot be set

Return type:

boolean

vessel: SpaceCenter.Vessel#

The vessel that the alarm is attached to.

Attribute:

Can be read or written

Return type:

SpaceCenter.Vessel

xfer_origin_body: SpaceCenter.CelestialBody#

The celestial body the vessel is departing from.

Attribute:

Can be read or written

Return type:

SpaceCenter.CelestialBody

xfer_target_body: SpaceCenter.CelestialBody#

The celestial body the vessel is arriving at.

Attribute:

Can be read or written

Return type:

SpaceCenter.CelestialBody

remove()#

Removes the alarm. Any further use of this object throws an exception.