Freighter
Derived Object created based on datafiles. Can be cast to and from an Object@.
Members
-
bool
alwaysVisible
— Whether the object can be seen from any distance.
-
uint
visibleMask
— Empire mask of which empires can see this object.
-
uint
memoryMask
— Empire mask of which empires have any memory of this object.
-
float
sightRange
— Radius around which the object can see other objects.
-
vec3d
position
— Current position in space.
-
vec3d
velocity
— Current momentary velocity.
-
vec3d
acceleration
— Current acceleration vector.
-
uint
donatedVision
— Mask of empires that this object will become visible to.
-
quaterniond
rotation
— Rotation/facing expressed as a quaternion.
-
double
radius
— Radius of the object's bounding sphere and size of its visuals.
-
double
lastTick
— Game time of the last time the object ticked.
-
int
id
— Unique identifier referring to this object.
-
Region@
region
— Member created from datafiles.
-
Object@
Origin
— Member created from datafiles.
-
Object@
Target
— Member created from datafiles.
-
Component_Mover@
mover
— Member created from datafiles.
-
double
Health
— Member created from datafiles.
Methods
-
void
set_name(
string&
Name
)
-
Empire@
get_owner(
) const
-
void
set_owner(
Empire@
emp
)
-
void
finalizeCreation(
)
-
string
get_name(
) const
-
bool
get_valid(
) const
-
bool
get_engaged(
) const
-
bool
get_named(
) const
-
bool
get_inCombat(
) const
-
bool
isFocus(
) const
-
void
focus(
)
-
bool
get_initialized(
) const
-
ObjectType
get_type(
) const
-
bool
get_selected(
) const
-
void
set_selected(
bool
value
)
-
bool
get_isPhysical(
) const
-
void
wake(
)
-
void
sleep(
double
seconds
)
-
bool
get_memorable(
) const
-
void
set_noCollide(
bool
value
)
-
bool
get_noCollide(
) const
-
void
set_engaged(
bool
value
)
-
void
set_named(
bool
value
)
-
void
set_inCombat(
bool
value
)
-
void
wait(
)
-
void
destroy(
)
-
bool
get_destroying(
)
-
void
damage(
DamageEvent&
evt,
double
position,
vec2d&
direction
)
-
void
repair(
double
amount
)
-
void
addTimedEffect(
TimedEffect&
eff
)
-
bool
isVisibleTo(
Empire&
emp
) const
-
bool
isKnownTo(
Empire&
emp
) const
-
Object@
get_targets(
uint
index
) const
-
ObjectGroup@
get_group(
)
-
const ObjectGroup@
get_group(
) const
-
Node@
getNode(
) const
-
bool
get_inFTL(
) const
-
bool
get_isMoving(
) const
-
vec3d
get_moveDestination(
) const
-
bool
get_hasMovePath(
) const
-
DataList@
getMovePath(
) const
-
double
get_ftlSpeed(
) const
-
bool
get_isColliding(
) const
-
vec3d
get_internalDestination(
) const
-
double
get_maxAcceleration(
) const
-
void
set_maxAcceleration(
double
accel
)
-
void
set_rotationSpeed(
float
speed
)
-
double
moverTick(
double
time
)
-
bool
moveTo(
vec3d
point,
int&
id,
bool
doPathing = true,
bool
enterOrbit = true
)
-
bool
moveTo(
Object&
target,
int&
id,
double
distance = 0,
bool
doPathing = true,
bool
enterOrbit = true
)
-
bool
rotateTo(
quaterniond
rotation,
int&
id
)
-
void
setRotation(
quaterniond
rotation
)
-
bool
FTLTo(
vec3d
point,
double
speed,
int&
id
)
-
void
FTLTo(
vec3d
point,
double
speed
)
-
void
FTLDrop(
)
-
void
stopMoving(
bool
doPathing = true,
bool
enterOrbit = true
)
-
void
clearMovement(
)
-
void
setCombatFacing(
quaterniond&
rotation
)
-
void
clearCombatFacing(
)
-
void
checkOrbitObject(
vec3d
destPoint
)
-
void
createPathTowards(
vec3d
destPoint
)
-
void
updatePath(
)
-
Object@
getLockedOrbit(
bool
requireLock = true
)
-
void
speedBoost(
double
amount
)
-
void
flagPositionUpdate(
)
-
void
impulse(
vec3d
ForceSeconds
)
-
void
rotate(
quaterniond
rot
)
-
bool
get_leaderLock(
) const
-
void
set_leaderLock(
bool
doLock
)
-
bool
writeMoverDelta(
Message&
msg
) const
-
void
writeMover(
Message&
msg
) const
-
void
readMoverDelta(
Message&
msg
)
-
void
readMover(
Message&
msg
)
-
Component_Mover@
get_Mover(
)
Empire@
get_owner(
) const
Returns
Empire@
: The empire that owns this 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
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.
void
wake(
)
Tells the processing threads to tick the object next time (ignoring requested timeout)
void
wait(
)
Waits for all asynchronous messages to finish on this object. This is considered a relocking operation.
void
damage(
DamageEvent&
evt,
double
position,
vec2d&
direction
)
Deal damage to the object from a particular direction.
-
DamageEvent&
evt — Event relating information about the damage dealt.
-
double
position — Position between 0 and 1 on the side that is hit.
-
vec2d&
direction — Direction vector towards the object of the damage.
Object@
get_targets(
uint
index
) const
Retrieve one of the targeting system targets the object is holding.
-
uint
index — Index of the object to retrieve (maximum TARGET_COUNT).
Returns
Object@
: Held object by the targetting system.
Node@
getNode(
) const
Returns the node associated with the object. Asynchronous.
Component_Mover@
get_Mover(
)
Returns the component handle for this type of component.