Blueprint

A physical instance of a design. A blueprint belongs to one ship and holds all the information about the internals of that particular ship.

Members

Methods

float tick( Object& arg0, double arg1 )

Tick function to handle the blueprint, should be called from the object script handler's tick. Returns float : Suggestion for the amount of time to wait until the next tick.

void destroy( Object& arg0 )

Call when the object holding the blueprint is destroyed.

void ownerChange( Object& arg0, Empire@ arg1, Empire@ arg2 )

Call when the blueprint changes owners.

HexStatus@ getHexStatus( uint x, uint y )

Returns HexStatus@ : Current status of the hex on this blueprint.

SysStatus@ getSysStatus( uint index )

Returns SysStatus@ : Current status of the subsystem.

SysStatus@ getSysStatus( uint x, uint y )

Returns SysStatus@ : Current status of the subsystem the hex belongs to.

bool hasTagActive( SubsystemTag tag )

Returns bool : Whether any subsystems with this tag are present and active.

double getTagEfficiency( SubsystemTag tag, bool ignoreInactive = true )

Calculate the total efficiency of subsystems with a particular tag. Returns double : Total efficiency.

double getEfficiencySum( SubsystemVariable var, SubsystemTag tag = ST_NULL, bool ignoreInactive = true )

Calculate the total value of a subsystem variable as affected by subsystem efficiency. Returns double : Total value.

double getEfficiencyFactor( SubsystemVariable var, SubsystemTag tag = ST_NULL, bool ignoreInactive = true )

Calculate the total percentage efficiency with respect to a variable. Returns double : Efficiency factor..

vec3d getOptimalFacing( SubsystemVariable var, SubsystemTag tag = ST_NULL, bool ignoreInactive = true )

Calculate the optimal facing so that effectors in this blueprint can fire with optimal value for the passed variable. Returns vec3d : Optimal facing.

Object@ getCombatTarget( )

Find a target this ship is firing on.

const HexStatus@ getHexStatus( uint index ) const

Returns const HexStatus@ : Current status of the hex on this blueprint.

const HexStatus@ getHexStatus( uint x, uint y ) const

Returns const HexStatus@ : Current status of the hex on this blueprint.

const SysStatus@ getSysStatus( uint index ) const

Returns const SysStatus@ : Y coordinate of the hex.

const SysStatus@ getSysStatus( uint x, uint y ) const

Returns const SysStatus@ : Current status of the subsystem the hex belongs to.

bool canTarget( Object& obj, Object& target )

Check whether the effectors in this blueprint can target an object. Returns bool : Whether the object can be targeted.

bool doesAutoTarget( Object& obj, Object& target )

Check whether the effectors in this blueprint can auto-target an object. Returns bool : Whether the object can be auto-targeted.

void target( Object& obj, Object& target, uint flags = 0 )

Set all effectors in this blueprint to target a particular object.

void target( Object& obj, uint efftrIndex, Object& target, uint flags = 0 )

Set an effector in this blueprint to target a particular object.

void target( Object& obj, const Subsystem@ sys, Object& target, uint flags = 0 )

Set all effectors in a subsystem to target a particular object.

void clearTracking( Object& obj )

Clear the turret tracking for all effectors, letting them retrack fast.

void sendDetails( Object& obj, Message& msg ) const

For networking: sends the details of this blueprint through the message.

void recvDetails( Object& obj, Message& msg )

For networking: read the details of this blueprint from a message.

bool sendDelta( Object& obj, Message& msg ) const

For networking: sends a delta of this blueprint through the message. Returns bool : Whether a delta was needed/written.

void recvDelta( Object& obj, Message& msg )

For networking: read the delta of this blueprint from a message.

void create( Object& obj, const Design@ design )

Initialize this blueprint.

void start( Object& obj, bool fromRetrofit = false )

Start the blueprint's effects.

void retrofit( Object& obj, const Design@ toDesign )

Retrofit the blueprint to a new design.

any@ getHookData( uint index )

Get data storage for a hook index. Returns any@ : Data for that hook.

int integer( const Subsystem@ sys, uint num )

Returns int : Integer state value for the subsystem.

double decimal( const Subsystem@ sys, uint num )

Returns double : Decimal state value for the subsystem.

bool boolean( const Subsystem@ sys, uint num )

Returns bool : Boolean state value for the subsystem.

void damage( Object& obj, DamageEvent& evt, vec2d& direction )

Handle damage to the blueprint from a particular direction.

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

Handle damage to the blueprint from a particular direction.

void damage( Object& obj, DamageEvent& evt, vec2u& position )

Handle damage to a particular hex on the blueprint.

double repair( Object& obj, double amount )

Add generic repair to the blueprint. Returns double : Amount of repair that was left over after this call.

double repair( Object& obj, vec2u& position, double amount )

Add repair to a particular hex on the blueprint. Returns double : Amount of repair that was left over after this call.