Region
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_RegionObjects@
objects
— Member created from datafiles.
-
locked_int
SiegedMask
— Member created from datafiles.
-
locked_int
SiegingMask
— Member created from datafiles.
-
locked_int
ProtectedMask
— Member created from datafiles.
-
locked_int
FreeFTLMask
— Member created from datafiles.
-
locked_int
BlockFTLMask
— Member created from datafiles.
-
locked_int
GateMask
— Member created from datafiles.
-
int
EngagedMask
— Member created from datafiles.
-
int
CombatMask
— Member created from datafiles.
-
int
CoreSystemMask
— Member created from datafiles.
-
int
AngleOffset
— Member created from datafiles.
-
double
InnerRadius
— Member created from datafiles.
-
double
OuterRadius
— Member created from datafiles.
-
int
SystemId
— Member created from datafiles.
-
int
PrimaryEmpire
— Member created from datafiles.
-
uint
ContestedMask
— Member created from datafiles.
-
uint
TradeMask
— Member created from datafiles.
-
uint
PlanetsMask
— Member created from datafiles.
-
uint
VisionMask
— Member created from datafiles.
-
uint
BasicVisionMask
— Member created from datafiles.
-
uint
MemoryMask
— Member created from datafiles.
-
uint
ShipyardMask
— Member created from datafiles.
-
int
TargetCostMod
— Member created from datafiles.
-
uint
PlanetSupportMask
— Member created from datafiles.
-
uint
SeenMask
— 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
-
void
modTargetCostMod(
int
arg0
)
-
uint
get_planetCount(
) const
-
Planet@
get_planets(
uint
index
) const
-
uint
getPlanetCount(
const Empire@
emp
) const
-
uint
get_anomalyCount(
) const
-
Anomaly@
get_anomalies(
uint
index
) const
-
uint
get_asteroidCount(
) const
-
Asteroid@
get_asteroids(
uint
index
) const
-
uint
get_objectCount(
) const
-
Object@
get_objects(
uint
index
) const
-
Object@
getOrbitObject(
vec3d
point
) const
-
uint
get_starCount(
) const
-
Star@
get_stars(
uint
index
) const
-
Territory@
getTerritory(
const Empire@
forEmpire
) const
-
bool
sharesTerritory(
Empire&
forEmpire,
Region&
region
) const
-
bool
isTradableRegion(
Empire&
forEmpire
) const
-
Empire@
get_visiblePrimaryEmpire(
) const
-
uint
getContestedState(
const Empire@
forEmpire
) const
-
int
getStrength(
const Empire@
emp
) const
-
double
getNeighbourLoyalty(
const Empire@
emp
) const
-
void
modNeighbourLoyalty(
const Empire@
emp,
double
amount
)
-
double
getLocalLoyalty(
const Empire@
emp
) const
-
void
modLocalLoyalty(
const Empire@
emp,
double
amount
)
-
void
setTerritory(
const Empire@
forEmpire,
const Territory@
territory
)
-
void
clearTerritory(
const Empire@
forEmpire,
const Territory@
oldTerritory
)
-
void
spawnSupportAtRandomPlanet(
const Empire@
owner,
const Design@
design,
bool
free = true,
const Planet@
fallback = null
)
-
void
updateRegionPlane(
) const
-
void
setAsteroidResourceLimit(
const Empire@
forEmpire,
uint
limit
)
-
void
addRegionStatus(
const Empire@
emp,
uint
statusId,
double
timer = -1.0
)
-
void
removeRegionStatus(
const Empire@
emp,
uint
statusId
)
-
void
renameSystem(
string
name
)
-
void
addStrategicIcon(
int
level,
Object&
obj,
Node&
node
)
-
void
removeStrategicIcon(
int
level,
Node&
node
)
-
void
grantMemory(
const Empire@
emp
)
-
void
grantVision(
const Empire@
emp
)
-
void
revokeVision(
const Empire@
emp
)
-
void
grantTrade(
const Empire@
emp
)
-
void
revokeTrade(
const Empire@
emp
)
-
void
addTemporaryVision(
const Empire@
emp,
double
timer
)
-
void
initRegion(
)
-
void
tickRegion(
double
time
)
-
void
leaveRegion(
Object&
obj
)
-
void
enterRegion(
Object&
obj
)
-
void
regionObjectOwnerChange(
Object&
obj,
const Empire@
prevOwner,
const Empire@
newOwner
)
-
void
modMilitaryStrength(
const Empire@
emp,
int
amount
)
-
void
registerShipyard(
Object&
obj
)
-
void
unregisterShipyard(
Object&
obj
)
-
void
regionBuildSupport(
uint
id,
Object&
obj,
const Design@
dsg
)
-
void
addTradePathing(
int
toSystem,
const Object@
from,
const Object@
to,
int
resId,
uint
resource
)
-
void
removeTradePathing(
int
toSystem,
const Object@
origin,
int
resId
)
-
int
addRegionEffect(
const Empire@
forEmpire,
uint
type
)
-
void
removeRegionEffect(
int
id
)
-
void
changeRegionEffectOwner(
int
id,
const Empire@
newOwner
)
-
void
freeUpCivilian(
const Civilian@
civilian
)
-
bool
hasTradeStation(
const Empire@
emp
)
-
Civilian@
getTradeStation(
const Empire@
emp,
vec3d
position
)
-
Planet@
getTradePlanet(
const Empire@
emp
)
-
void
bumpTradeCounter(
const Empire@
emp
)
-
void
regionPostLoad(
)
-
Component_RegionObjects@
get_RegionObjects(
)
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.