Asteroid

Derived Object created based on datafiles. Can be cast to and from an Object@.

Members

Methods

void set_name( string& Name )

Empire@ get_owner( ) const

Returns Empire@ : The empire that owns this object.

void set_owner( Empire@ emp )

Set a new owner for the object.

void finalizeCreation( )

Finalize the creation of this object. Should only be called on objects that were created with delayedCreation set to true.

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.

void wake( )

Tells the processing threads to tick the object next time (ignoring requested timeout)

void sleep( double seconds )

Adds a number of seconds to the object's requested timeout.

bool get_memorable( ) const

Returns bool : Whether the object should have past vision state tracked.

void set_noCollide( bool value )

Set whether the object should not be collided with (enforced by scripts).

bool get_noCollide( ) const

Returns bool : Whether the object should not be collided with.

void set_engaged( bool value )

Set whether the object is engaged.

void set_named( bool value )

Set whether the object is named.

void set_inCombat( bool value )

Set whether the object is considered in combat.

void wait( )

Waits for all asynchronous messages to finish on this object. This is considered a relocking operation.

void destroy( )

Flag the object for destruction and eventual disposal.

bool get_destroying( )

Whether the object is waiting to be destroyed.

void damage( DamageEvent& evt, double position, vec2d& direction )

Deal damage to the object from a particular direction.

void addTimedEffect( TimedEffect& eff )

Add an effect to the object that executes then finishes after a particular amount of time.

bool isVisibleTo( Empire& emp ) const

Returns true if the specified empire can see the object.

bool isKnownTo( Empire& emp ) const

Returns true if the specified empire has ever seen the object.

Object@ get_targets( uint index ) const

Retrieve one of the targeting system targets the object is holding. Returns Object@ : Held object by the targetting system.

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.

Component_Resources@ get_Resources( )

Returns the component handle for this type of component.

Component_Orbit@ get_Orbit( )

Returns the component handle for this type of component.

Object@ get_origin( ) const

Member created from datafiles.

void set_origin( Object@ value )

Member created from datafiles.