Computer#
- class RasterPropMonitor.Computer()#
The Raster Prop Monitor computer of a part, which holds the variables its props show. Obtained by calling
RasterPropMonitor.computer()orRasterPropMonitor.computers().- Computer.getPart()#
The part the computer is on.
- Property:
Read-only, cannot be set
- Return type:
- Game Scenes:
Flight
- Computer.persistentVariable(name)#
The value of a persistent variable of the part, or else of the vessel, or
nullif neither is set. Props read it asPERSISTENT_name.- Arguments:
name (
string) – The name of the variable, without thePERSISTENT_prefix.
- Return type:
numberornull- Game Scenes:
Flight
- Computer.setPersistentVariable(name, value)#
Set a persistent variable of the part. The props that show it update.
- Arguments:
name (
string) – The name of the variable, without thePERSISTENT_prefix.value (
number) – The value.
- Game Scenes:
Flight
- Computer.removePersistentVariable(name)#
Remove a persistent variable of the part. The props that show it update.
- Arguments:
name (
string) – The name of the variable, without thePERSISTENT_prefix.
- Game Scenes:
Flight
- Computer.persistentVariableChanged(name)#
An event that fires when
RasterPropMonitor.Computer.persistentVariable()changes, such as when a switch in the IVA sets it. The event lasts until it is removed.- Arguments:
name (
string) – The name of the variable, without thePERSISTENT_prefix.
- Return type:
- Game Scenes:
Flight
- Computer.variableType(name)#
The type of a variable’s current value. Throws an exception if Raster Prop Monitor does not recognize the variable.
- Arguments:
name (
string) – The name of the variable, e.g.ALTITUDE.
- Return type:
- Game Scenes:
Flight
- Computer.numberVariable(name)#
The value of a number variable. Raster Prop Monitor gives a boolean as 0 or 1. Throws an exception if Raster Prop Monitor does not recognize the variable, or its value is a string.
- Arguments:
name (
string) – The name of the variable, e.g.ALTITUDE.
- Return type:
number- Game Scenes:
Flight
- Computer.stringVariable(name)#
The value of a variable as a string. A number gives its invariant culture string. Throws an exception if Raster Prop Monitor does not recognize the variable.
- Arguments:
name (
string) – The name of the variable, e.g.ALTITUDE.
- Return type:
string- Game Scenes:
Flight
- Computer.formatVariables(text)#
Text with its variables formatted as a monitor page formats them, e.g.
{0:SIP6.1}m $&$ ALTITUDE. Each line takes its own variables. Throws an exception if Raster Prop Monitor does not recognize a variable, or a format is invalid.- Arguments:
text (
string) – The text, in the format of a monitor page.
- Return type:
string- Game Scenes:
Flight
- class RasterPropMonitor.VariableType()#
The type of a Raster Prop Monitor variable. See
RasterPropMonitor.Computer.variableType().- VariableType.number#
A number. Access using
RasterPropMonitor.Computer.numberVariable().
- VariableType.string#
A string. Access using
RasterPropMonitor.Computer.stringVariable().