Get RAPTOR

RaptorModuleStatus

A module's state and its status word (for example "On", "No masks", "Fog OK").

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorstructpreview, since 0.1.0
public readonly struct RaptorModuleStatus : IEquatable<RaptorModuleStatus>

Constructors

RaptorModuleStatus

public RaptorModuleStatus(RaptorModuleState state, string word = null)

Creates a status.

ParameterTypeDefaultDescription
stateRaptorModuleStateThe state.
wordstringnullThe status word; empty uses the state's default word.

Fields

State

public readonly RaptorModuleState State;

The module's state.

Word

public readonly string Word;

The status word shown beside the glyph.

Properties

IsPresent

public bool IsPresent { get; }

Whether the module is installed. True for On, Partial and Off; false for Missing.

Missing

public static RaptorModuleStatus Missing { get; }

Gets the Missing status (not installed) with its default word.

Off

public static RaptorModuleStatus Off { get; }

Gets the Off status (installed and switched off) with its default word.

On

public static RaptorModuleStatus On { get; }

Gets the On status (installed and working) with its default word.

Methods

DefaultWord

public static string DefaultWord(RaptorModuleState state)

Returns the default word for a state.

ParameterTypeDescription
stateRaptorModuleStateThe state.

Returns: On, Partial, Off or Missing.

Partial

public static RaptorModuleStatus Partial(string word = null)

Returns a Partial status, for a module that is installed but missing something it needs.

ParameterTypeDefaultDescription
wordstringnullThe status word; empty uses "Partial".

Returns: The status.