Alarm#
- class KerbalAlarmClock.Alarm#
Represents an alarm. Obtained by calling
KerbalAlarmClock.alarms,KerbalAlarmClock.alarm_with_name()orKerbalAlarmClock.alarms_with_type().-
action:
KerbalAlarmClock.AlarmAction# The action that the alarm triggers.
- Attribute:
Can be read or written
Note
An alarm that plays a sound has the action
KerbalAlarmClock.AlarmAction.custom. SeeKerbalAlarmClock.Alarm.play_sound.
-
margin:
number# The number of seconds before the event that the alarm will fire.
- Attribute:
Can be read or written
-
time:
number# The time at which the alarm will fire.
- Attribute:
Can be read or written
-
type:
KerbalAlarmClock.AlarmType# The type of the alarm.
- Attribute:
Read-only, cannot be set
-
id:
string# The unique identifier for the alarm.
- Attribute:
Read-only, cannot be set
-
name:
string# The short name of the alarm.
- Attribute:
Can be read or written
-
notes:
string# The long description of the alarm.
- Attribute:
Can be read or written
-
remaining:
number# The number of seconds until the alarm will fire.
- Attribute:
Read-only, cannot be set
-
enabled:
boolean# Whether the alarm is enabled. A disabled alarm does not fire.
- Attribute:
Can be read or written
-
play_sound:
boolean# Whether the alarm plays a sound when it fires.
- Attribute:
Can be read or written
Note
An alarm that plays a sound has the action
KerbalAlarmClock.AlarmAction.custom. SettingKerbalAlarmClock.Alarm.actionto any other value turns the sound off.
-
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
-
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
-
supports_repeat:
boolean# Whether this alarm’s type supports repeating (see
KerbalAlarmClock.Alarm.repeat).- Attribute:
Read-only, cannot be set
-
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
-
supports_repeat_period:
boolean# Whether this alarm’s type supports a repeat period (see
KerbalAlarmClock.Alarm.repeat_period).- Attribute:
Read-only, cannot be set
-
vessel:
SpaceCenter.Vessel# The vessel that the alarm is attached to.
- Attribute:
Can be read or written
-
xfer_origin_body:
SpaceCenter.CelestialBody# The celestial body the vessel is departing from.
- Attribute:
Can be read or written
-
xfer_target_body:
SpaceCenter.CelestialBody# The celestial body the vessel is arriving at.
- Attribute:
Can be read or written
- remove()#
Removes the alarm. Any further use of this object throws an exception.
Note
Any further use of this object throws an exception.
-
action: