Artifact
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.
-
Component_Abilities@
abilities
— Member created from datafiles.
-
Component_Orbit@
orbit
— Member created from datafiles.
-
int
ArtifactType
— 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
-
uint
get_abilityCount(
) const
-
DataList@
getAbilities(
) const
-
uint
get_abilityTypes(
int
id
) const
-
void
activateAbility(
int
id
)
-
void
activateAbility(
int
id,
vec3d
point
)
-
void
activateAbility(
int
id,
const Object@
target
)
-
void
activateAbilityFor(
Empire&
emp,
int
id,
const Object@
target
)
-
void
activateAbilityFor(
Empire&
emp,
int
id,
vec3d
point
)
-
void
initAbilities(
const Design@
fromDesign
)
-
void
abilityTick(
double
time
)
-
void
abilityOwnerChange(
const Empire@
prevOwner,
const Empire@
newOwner
)
-
void
setNeutralAbilities(
bool
value
)
-
void
setAbilityDestroy(
bool
value
)
-
int
addAbility(
uint
id
)
-
void
createAbility(
uint
id
)
-
void
removeAbility(
int
id
)
-
void
disableAbility(
int
id
)
-
void
enableAbility(
int
id
)
-
void
writeAbilities(
Message&
msg
) const
-
bool
writeAbilityDelta(
Message&
msg
) const
-
void
readAbilities(
Message&
msg
)
-
void
readAbilityDelta(
Message&
msg
)
-
Component_Abilities@
get_Abilities(
)
-
void
orbitTick(
double
time
)
-
void
orbitAround(
vec3d
point
)
-
void
orbitAround(
double
minRadius,
vec3d
point
)
-
void
orbitAround(
vec3d
point,
double
radius
)
-
void
orbitAround(
Object&
around
)
-
void
orbitAround(
Object&
around,
double
radius
)
-
void
orbitAround(
Object&
around,
double
radius,
double
angle
)
-
void
orbitAround(
vec3d
position,
vec3d
origin
)
-
void
orbitSpin(
double
dayLength
)
-
void
setOrbitPct(
double
pct
)
-
void
writeOrbit(
Message&
msg
) const
-
bool
writeOrbitDelta(
Message&
msg
) const
-
Object@
getOrbitingAround(
)
-
void
readOrbit(
Message&
msg
)
-
void
readOrbitDelta(
Message&
msg
)
-
Component_Orbit@
get_Orbit(
)
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_Orbit@
get_Orbit(
)
Returns the component handle for this type of component.