Object

Abstract class for all game objects, implemented by various subclasses using different states and components. Note that not all methods listed here are accessible on all objects, so before using a component call, check whether the object has the right component for that call using the has[Component] accessors.

Members

Methods

Empire@ get_owner( ) const

Returns Empire@ : The empire that owns this object.

string get_name( ) const

Returns string : Name of the object.

bool get_valid( ) const

Returns bool : Whether the object is valid and not a zombie. Zombies are objects that have already been destroyed but are awaiting disposal.

bool get_engaged( ) const

Returns bool : Whether the object is engaged.

bool get_named( ) const

Returns bool : Whether the object has been named..

bool get_inCombat( ) const

Returns bool : Whether the object is considered in combat.

bool isFocus( ) const

Returns bool : Whether the object is a focus object. Focus objects have higher priority for interpolation and syncing.

void focus( )

Mark the object as a focus object. Focus decays and should be set periodically on accessed objects.

bool get_initialized( ) const

Returns bool : Whether the object has been fully initialized in its creation step.

ObjectType get_type( ) const

Returns ObjectType : The type of this object.

bool get_selected( ) const

Returns bool : Whether the object is currently selected.

void set_selected( bool value )

bool get_isPhysical( ) const

Returns bool : Whether the object is a physical object.

bool get_visible( ) const

Returns true if the player empire can see this object.

bool get_known( ) const

Returns true if the player empire has ever seen this object.

ObjectGroup@ get_group( )

Returns ObjectGroup@ : The object group associated with the object.

const ObjectGroup@ get_group( ) const

Returns const ObjectGroup@ : The object group associated with the object.

Node@ getNode( ) const

Returns the node associated with the object. Asynchronous.

vec3d get_node_position( )

Returns vec3d : The absolute physical position of the object's graphics node this frame. Can be different from the object position due to graphics interpolation.

quaterniond get_node_rotation( )

Returns quaterniond : The absolute physical rotation of the object's graphics node this frame. Can be different from the object rotation due to graphics interpolation.

bool get_hasAbilities( ) const

Returns true if the object has the associated component.

Component_Abilities@ get_Abilities( )

Returns the component handle for this type of component. Returns Component_Abilities@ : Can be null if no component of this type exists for this object.

bool get_hasConstruction( ) const

Returns true if the object has the associated component.

Component_Construction@ get_Construction( )

Returns the component handle for this type of component. Returns Component_Construction@ : Can be null if no component of this type exists for this object.

bool get_hasLeaderAI( ) const

Returns true if the object has the associated component.

Component_LeaderAI@ get_LeaderAI( )

Returns the component handle for this type of component. Returns Component_LeaderAI@ : Can be null if no component of this type exists for this object.

bool get_hasMover( ) const

Returns true if the object has the associated component.

Component_Mover@ get_Mover( )

Returns the component handle for this type of component. Returns Component_Mover@ : Can be null if no component of this type exists for this object.

bool get_hasResources( ) const

Returns true if the object has the associated component.

Component_Resources@ get_Resources( )

Returns the component handle for this type of component. Returns Component_Resources@ : Can be null if no component of this type exists for this object.

bool get_hasOrbit( ) const

Returns true if the object has the associated component.

Component_Orbit@ get_Orbit( )

Returns the component handle for this type of component. Returns Component_Orbit@ : Can be null if no component of this type exists for this object.

bool get_hasPickupControl( ) const

Returns true if the object has the associated component.

Component_PickupControl@ get_PickupControl( )

Returns the component handle for this type of component. Returns Component_PickupControl@ : Can be null if no component of this type exists for this object.

bool get_hasRegionObjects( ) const

Returns true if the object has the associated component.

Component_RegionObjects@ get_RegionObjects( )

Returns the component handle for this type of component. Returns Component_RegionObjects@ : Can be null if no component of this type exists for this object.

bool get_hasStatuses( ) const

Returns true if the object has the associated component.

Component_Statuses@ get_Statuses( )

Returns the component handle for this type of component. Returns Component_Statuses@ : Can be null if no component of this type exists for this object.

bool get_hasSupportAI( ) const

Returns true if the object has the associated component.

Component_SupportAI@ get_SupportAI( )

Returns the component handle for this type of component. Returns Component_SupportAI@ : Can be null if no component of this type exists for this object.

bool get_hasSurfaceComponent( ) const

Returns true if the object has the associated component.

Component_SurfaceComponent@ get_SurfaceComponent( )

Returns the component handle for this type of component. Returns Component_SurfaceComponent@ : Can be null if no component of this type exists for this object.