Object
Abstract class for all game objects, implemented by various subclasses using different states and components. Note that not all methods listed here are accessible on all objects, so before using a component call, check whether the object has the right component for that call using the has[Component] accessors.
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.
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
)
-
bool
get_hasAbilities(
) const
-
Component_Abilities@
get_Abilities(
)
-
bool
get_canBuildShips(
)
-
bool
get_canBuildOrbitals(
)
-
bool
get_canBuildAsteroids(
)
-
bool
get_canTerraform(
)
-
uint
get_constructionCount(
) const
-
bool
get_constructingSupport(
) const
-
bool
get_canExportLabor(
) const
-
bool
get_canImportLabor(
) const
-
double
get_laborIncome(
) const
-
double
get_constructionCostMod(
) const
-
int
get_shipBuildCost(
) const
-
int
get_orbitalBuildCost(
) const
-
int
get_supportBuildSpeed(
) const
-
double
get_orbitalMaintenanceMod(
) const
-
double
get_terraformCostMod(
) const
-
bool
get_isRallying(
) const
-
vec3d
get_rallyPosition(
) const
-
float
get_constructionProgress(
) const
-
string
get_constructionName(
uint
num
) const
-
const Design@
get_constructionDesign(
) const
-
DataList@
getConstructionQueue(
)
-
DataList@
getConstructionQueue(
uint
limit
)
-
Object@
get_rallyObject(
) const
-
void
cancelConstruction(
int
id
)
-
void
buildFlagship(
const Design@
design
)
-
void
buildOrbital(
int
OrbitalType,
vec3d
position
)
-
void
buildStation(
const Design@
design,
vec3d
position
)
-
void
buildDryDock(
const Design@
forDesign,
float
pct
)
-
void
workDryDock(
const Orbital@
dryDock
)
-
void
buildAsteroid(
const Asteroid@
asteroid,
uint
resourceId
)
-
void
startTerraform(
const Planet@
planet,
uint
resourceId
)
-
void
addSupportShipConstruction(
int
id,
const Design@
dsg,
uint
amount
)
-
void
removeSupportShipConstruction(
int
id,
const Design@
dsg,
uint
amount
)
-
void
exportLaborTo(
const Object@
other
)
-
void
clearRally(
)
-
void
rallyTo(
const Object@
dest
)
-
void
rallyTo(
vec3d
position
)
-
int
get_constructionID(
uint
num
) const
-
bool
get_isUsingLabor(
) const
-
void
destroyConstruction(
)
-
void
modLaborIncome(
double
mod
)
-
void
modLaborFactor(
double
mod
)
-
void
setDistributedLabor(
double
val
)
-
void
modSupportBuildSpeed(
int
amt
)
-
void
modShipBuildCost(
int
amt
)
-
void
modOrbitalBuildCost(
int
amt
)
-
void
modOrbitalMaintenanceMod(
double
amt
)
-
void
modTerraformCostMod(
double
amt
)
-
void
multConstructionCostMod(
double
multFactor
)
-
void
startBuildingConstruction(
uint
type,
vec2i
position
)
-
void
cancelBuildingConstruction(
uint
type,
vec2i
position
)
-
void
startRetrofitConstruction(
const Object@
fleet,
int
buildCost,
double
laborCost,
int
extraMaint
)
-
void
buildSupport(
uint
id,
const Design@
design,
const Object@
buildFor
)
-
void
transferBuildSupport(
uint
id,
const Object@
buildFor
)
-
void
cancelBuildSupport(
uint
id
)
-
void
doRally(
const Object@
orderObj
)
-
void
set_canBuildShips(
bool
value
)
-
void
set_canBuildOrbitals(
bool
value
)
-
void
set_canBuildAsteroids(
bool
value
)
-
void
set_canTerraform(
bool
value
)
-
void
set_canExportLabor(
bool
value
)
-
void
set_canImportLabor(
bool
value
)
-
void
constructionTick(
double
time
)
-
bool
hasConstructionUnder(
double
eta
)
-
bool
writeConstructionDelta(
Message&
msg
) const
-
void
writeConstruction(
Message&
msg
) const
-
void
readConstructionDelta(
Message&
msg
)
-
void
readConstruction(
Message&
msg
)
-
bool
get_hasConstruction(
) const
-
Component_Construction@
get_Construction(
)
-
double
getFormationRadius(
)
-
DataList@
getSupportGroups(
) const
-
uint
get_supportCount(
)
-
Object@
get_supportShip(
uint
index
)
-
double
getFleetHP(
) const
-
double
getFleetDPS(
) const
-
double
getFleetStrength(
) const
-
double
getFleetMaxStrength(
) const
-
float
getFleetEffectiveness(
) const
-
double
get_GhostHP(
) const
-
double
get_GhostDPS(
) const
-
uint
get_SupplyUsed(
) const
-
uint
get_SupplyCapacity(
) const
-
uint
get_SupplyAvailable(
) const
-
bool
get_hasOrders(
)
-
bool
hasOrder(
uint
type,
bool
checkQueued = false
)
-
uint
get_orderCount(
)
-
string
get_orderName(
uint
num
)
-
uint
get_orderType(
uint
num
) const
-
bool
get_orderHasMovement(
uint
num
) const
-
vec3d
get_orderMoveDestination(
uint
num
) const
-
vec3d
get_finalMoveDestination(
) const
-
int
getRetrofitCost(
) const
-
double
getRetrofitLabor(
) const
-
uint
getGhostCount(
const Design@
design
) const
-
uint
getAutoMode(
)
-
uint
getEngageType(
)
-
uint
getEngageBehave(
)
-
bool
get_autoBuySupports(
) const
-
bool
get_autoFillSupports(
) const
-
void
addGotoOrder(
Object&
target,
bool
append = false
)
-
void
addAttackOrder(
Object&
target,
bool
append = false
)
-
void
addAbilityOrder(
int
abilityId,
vec3d
target,
bool
append = false
)
-
void
addCaptureOrder(
Planet&
target,
bool
append = false
)
-
void
addPickupOrder(
Pickup&
target,
bool
append = false
)
-
void
addMoveOrder(
vec3d
target,
bool
append = false
)
-
void
addMoveOrder(
vec3d
target,
quaterniond
facing,
bool
append = false
)
-
void
addHyperdriveOrder(
vec3d
target,
bool
append = false
)
-
void
addFlingOrder(
Orbital&
beacon,
vec3d
target,
bool
append = false
)
-
void
addScanOrder(
Anomaly&
target,
bool
append = false
)
-
void
addRefreshOrder(
Object&
target,
bool
append = false
)
-
void
addOddityGateOrder(
Oddity&
target,
bool
append = false
)
-
void
addSlipstreamOrder(
vec3d
target,
bool
append = false
)
-
void
addAutoExploreOrder(
bool
useFTL,
bool
append = false
)
-
void
addSecondaryToSlipstream(
Object&
other
)
-
void
addWaitOrder(
const Object@
waitingFor = null,
bool
append = false,
bool
moveTo = false
)
-
void
moveAfterWait(
vec3d
position,
const Object@
waitingFor = null
)
-
void
clearOrders(
)
-
void
insertMoveOrder(
vec3d
target,
uint
index
)
-
void
insertHyperdriveOrder(
vec3d
target,
uint
index
)
-
void
insertFlingOrder(
Orbital&
beacon,
vec3d
target,
uint
index
)
-
void
transferSupports(
const Design@
ofDesign,
uint
amount,
const Object@
transferTo
)
-
void
orderSupports(
const Design@
ofDesign,
uint
amount
)
-
void
scuttleSupports(
const Design@
ofDesign,
uint
amount
)
-
void
rebuildAllGhosts(
)
-
void
clearAllGhosts(
)
-
void
retrofitFleetAt(
const Object@
obj
)
-
void
setAutoMode(
uint
type
)
-
void
setEngageType(
uint
type
)
-
void
setEngageBehave(
uint
type
)
-
void
setHoldPosition(
bool
hold
)
-
void
refreshSupportsFrom(
const Object@
obj,
bool
keepGhosts = false
)
-
void
set_autoBuySupports(
bool
value
)
-
void
set_autoFillSupports(
bool
value
)
-
void
orderTick(
double
time
)
-
void
registerSupport(
const Object@
obj,
bool
pickup = false,
bool
force = false
)
-
void
unregisterSupport(
const Object@
obj,
bool
destroyed = false
)
-
void
set_canGainSupports(
bool
value
)
-
bool
get_canGainSupports(
) const
-
bool
canTakeSupport(
int
size,
bool
pickup = true
) const
-
void
takeoverFleet(
const Empire@
newOwner,
double
supportRatio = 1.0,
bool
moveToTerritory = false
)
-
void
leaderInit(
)
-
void
leaderDestroy(
)
-
void
leaderPostLoad(
)
-
void
leaderTick(
double
time
)
-
void
leaderChangeOwner(
const Empire@
oldOwner,
const Empire@
newOwner
)
-
void
leaderRegionChanged(
)
-
void
modSupplyCapacity(
int
amt
)
-
void
repairFleet(
double
amount,
bool
spread = true
)
-
void
finishFleetRetrofit(
const Object@
at
)
-
void
stopFleetRetrofit(
const Object@
at
)
-
void
postSupportRetrofit(
const Ship@
support,
const Design@
prevDesign,
const Design@
newDesign
)
-
void
updateFleetStrength(
)
-
void
modBonusDPS(
double
amount
)
-
void
idleAllSupports(
)
-
void
teleportTo(
vec3d
position,
bool
movementPart = false
)
-
void
addSupportGhosts(
const Design@
ofDesign,
uint
amount
)
-
void
addSupportOrdered(
const Design@
ofDesign,
uint
amount
)
-
void
supportBuildStarted(
uint
id,
const Design@
dsg,
const Object@
shipyard
)
-
void
supportBuildFinished(
uint
id,
const Design@
dsg,
const Object@
shipyard,
const Ship@
ship
)
-
uint
getSupportCount(
const Design@
design
) const
-
bool
get_hasOrderedSupports(
) const
-
void
setFleetEffectiveness(
float
value
)
-
void
modFleetEffectiveness(
float
value
)
-
double
get_slowestSupportAccel(
) const
-
void
set_engageRange(
double
radius
)
-
void
writeLeaderAI(
Message&
msg
) const
-
bool
writeLeaderAIDelta(
Message&
msg
) const
-
void
readLeaderAI(
Message&
msg
)
-
void
readLeaderAIDelta(
Message&
msg
)
-
bool
get_hasLeaderAI(
) const
-
Component_LeaderAI@
get_LeaderAI(
)
-
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
)
-
bool
get_hasMover(
) const
-
Component_Mover@
get_Mover(
)
-
DataList@
getNativeResources(
) const
-
DataList@
getAllResources(
) const
-
uint
get_nativeResourceCount(
) const
-
uint
get_nativeResourceType(
uint
index
) const
-
int
get_nativeResourceId(
uint
index
) const
-
uint
get_nativeResourceTotalLevel(
) const
-
bool
get_nativeResourceUsable(
uint
index
) const
-
bool
get_nativeResourceLocked(
uint
index
)
-
uint
getTradedResourceCount(
) const
-
Object@
get_nativeResourceDestination(
uint
index
) const
-
bool
get_exportEnabled(
) const
-
bool
get_importEnabled(
) const
-
uint
get_resourceModID(
) const
-
bool
isTerraforming(
) const
-
bool
get_hasAutoImports(
) const
-
uint
get_queuedImportCount(
)
-
uint
get_queuedImportType(
uint
i
)
-
Object@
get_queuedImportOrigin(
uint
i
)
-
uint
getImportsOfClass(
uint
cls
) const
-
float
get_resourceVanishRate(
) const
-
uint
get_primaryResourceType(
) const
-
uint
get_primaryResourceLevel(
) const
-
int
get_primaryResourceId(
) const
-
bool
get_primaryResourceUsable(
) const
-
bool
get_primaryResourceLocked(
) const
-
DataList@
getAvailableResources(
) const
-
DataList@
getImportedResources(
) const
-
DataList@
getResourceAmounts(
) const
-
bool
hasImportedResources(
) const
-
uint
get_availableResourceCount(
) const
-
uint
get_availableResourceType(
uint
index
) const
-
bool
get_availableResourceUsable(
uint
index
) const
-
uint
get_usableResourceCount(
) const
-
bool
isResourceAvailable(
uint
id
) const
-
uint
getAvailableResourceAmount(
uint
id
) const
-
Object@
get_availableResourceOrigin(
uint
index
) const
-
void
exportResource(
uint
index,
const Object@
to
)
-
void
exportResourceByID(
int
id,
const Object@
to
)
-
DataList@
getResourcesFor(
const Empire@
emp
) const
-
void
changeResourceOwner(
const Empire@
prevOwner
)
-
void
changeResourceRegion(
const Region@
prevRegion,
const Region@
newRegion
)
-
void
changeResourceTerritory(
const Territory@
prev,
const Territory@
terr
)
-
void
resourceTick(
double
time
)
-
int
addResource(
uint
resourceId
)
-
void
createResource(
uint
resourceId
)
-
uint
getNativeIndex(
int
id
)
-
void
removeResource(
int
id,
bool
wasManual = false
)
-
Object@
getNativeResourceDestination(
const Empire@
forEmpire,
uint
index
) const
-
Object@
getNativeResourceDestinationByID(
const Empire@
forEmpire,
int
id
) const
-
uint
get_nativeResourceByID(
int
id
) const
-
void
addAvailableResource(
const Object@
from,
int
id,
uint
resource,
bool
usable
)
-
void
removeAvailableResource(
const Object@
from,
int
id,
bool
wasManual = false
)
-
void
enableAvailableResource(
const Object@
from,
int
id
)
-
void
disableAvailableResource(
const Object@
from,
int
id,
bool
wasManual = false
)
-
void
setAvailableResourceVanish(
const Object@
from,
int
id,
double
vanishTime
)
-
void
setResourceDisabled(
int
nativeId,
bool
disabled,
bool
wasManual = false
)
-
void
setResourceLocked(
int
nativeId,
bool
locked
)
-
void
addQueuedImport(
const Empire@
forEmpire,
const Object@
from,
int
id,
uint
resource
)
-
void
removeQueuedImport(
const Empire@
forEmpire,
const Object@
from,
int
id
)
-
void
setExportEnabled(
bool
value
)
-
void
setImportEnabled(
bool
value
)
-
void
exportResource(
const Empire@
forEmpire,
uint
index,
const Object@
to
)
-
void
clearExportResource(
int
id
)
-
uint
getResourceTargetLevel(
)
-
void
modPressure(
uint
resource,
int
amount
)
-
void
modDummyResource(
uint
resource,
int
amount,
bool
manual = false
)
-
void
destroyObjResources(
)
-
uint
getUniqueFoodCount(
int
modBy = 0
)
-
void
startTerraform(
)
-
void
stopTerraform(
)
-
void
terraformTo(
uint
resId
)
-
void
modResourceEfficiencyBonus(
double
amt
)
-
void
modResourceVanishBonus(
double
amt
)
-
float
get_resourceEfficiency(
) const
-
void
set_resourceEfficiency(
float
val
)
-
void
enableResources(
)
-
void
disableResources(
)
-
bool
get_areResourcesEnabled(
) const
-
void
setResourceLevel(
uint
level,
bool
wasManual = false
)
-
int
get_resourcePressure(
uint
resource
) const
-
uint
get_resourcesProducing(
uint
resource
) const
-
int
get_totalResourcePressure(
) const
-
bool
writeResourceDelta(
Message&
msg
) const
-
void
writeResources(
Message&
msg
) const
-
void
resourcesPostLoad(
)
-
Civilian@
getAssignedCivilian(
)
-
void
setAssignedCivilian(
const Civilian@
civ
)
-
double
getCivilianTimer(
)
-
void
setCivilianTimer(
double
time
)
-
void
readResourceDelta(
Message&
msg
)
-
void
readResources(
Message&
msg
)
-
bool
get_hasResources(
) const
-
Component_Resources@
get_Resources(
)
-
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
)
-
bool
get_hasOrbit(
) const
-
Component_Orbit@
get_Orbit(
)
-
bool
get_isPickupProtected(
)
-
Object@
getProtector(
)
-
bool
claimPickupDelta(
) const
-
void
addPickupProtector(
Object&
obj
)
-
void
initPickup(
)
-
void
tickPickup(
double
time
)
-
void
pickupPickup(
Object&
obj
)
-
void
writePickup(
Message&
msg
) const
-
void
readPickup(
Message&
msg
) const
-
bool
get_hasPickupControl(
) const
-
Component_PickupControl@
get_PickupControl(
)
-
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(
)
-
bool
get_hasRegionObjects(
) const
-
Component_RegionObjects@
get_RegionObjects(
)
-
uint
get_statusEffectCount(
)
-
DataList@
getStatusEffects(
)
-
bool
hasStatusEffect(
uint
typeId
)
-
int
addStatus(
double
timer,
uint
typeId,
const Empire@
boundEmpire = null,
const Region@
boundRegion = null
)
-
void
addStatus(
uint
typeId,
double
timer = -1.0,
const Empire@
boundEmpire = null,
const Region@
boundRegion = null
)
-
void
removeStatus(
int
id
)
-
void
removeStatusType(
uint
typeId
)
-
void
removeRegionBoundStatus(
const Region@
region,
uint
typeId,
double
timer = -1.0
)
-
void
addRandomCondition(
)
-
void
changeStatusOwner(
const Empire@
prevOwner,
const Empire@
newOwner
)
-
void
changeStatusRegion(
const Region@
prevRegion,
const Region@
newRegion
)
-
void
statusTick(
double
time
)
-
void
destroyStatus(
)
-
void
writeStatuses(
Message&
msg
) const
-
bool
writeStatusDelta(
Message&
msg
) const
-
void
readStatuses(
Message&
msg
)
-
void
readStatusDelta(
Message&
msg
)
-
bool
get_hasStatuses(
) const
-
Component_Statuses@
get_Statuses(
)
-
void
transferTo(
const Object@
leader
)
-
void
transferTo(
const Object@
leader,
vec3d
newOffset
)
-
void
setFleetOffset(
vec3d
offset
)
-
void
completeRegisterLeader(
const Object@
leader
)
-
void
supportDestroy(
)
-
void
supportTick(
double
time
)
-
void
supportScuttle(
)
-
void
clearLeader(
const Object@
prevLeader
)
-
void
preventExpire(
)
-
void
writeSupportAI(
Message&
msg
) const
-
bool
writeSupportAIDelta(
Message&
msg
) const
-
void
supportAttack(
const Object@
target
)
-
void
supportInterfere(
const Object@
target,
const Object@
protect
)
-
void
supportRetreat(
)
-
void
supportIdle(
)
-
void
set_supportEngageRange(
double
range
)
-
void
readSupportAI(
Message&
msg
)
-
void
readSupportAIDelta(
Message&
msg
)
-
bool
get_hasSupportAI(
) const
-
Component_SupportAI@
get_SupportAI(
)
-
uint
get_maxPopulation(
) const
-
double
get_population(
) const
-
uint
get_level(
) const
-
uint
get_resourceLevel(
) const
-
int
get_income(
) const
-
double
get_decayTime(
) const
-
bool
get_quarantined(
) const
-
double
get_undevelopedMaintenance(
) const
-
double
get_buildingConstructRate(
) const
-
double
get_tileDevelopmentRate(
) const
-
uint
get_pressureCap(
) const
-
float
get_totalPressure(
) const
-
bool
isProtected(
) const
-
int
get_baseLoyalty(
) const
-
int
get_currentLoyalty(
) const
-
int
getLoyaltyFacing(
const Empire@
emp
) const
-
bool
get_isContested(
) const
-
bool
get_isBeingColonized(
) const
-
int
get_buildingMaintenance(
) const
-
Empire@
get_captureEmpire(
) const
-
float
get_capturePct(
) const
-
uint
get_availableDesignations(
) const
-
int
get_designation(
) const
-
bool
get_designationDisabled(
) const
-
bool
get_autoDesignate(
) const
-
Region@
get_projectedDefenseRegion(
) const
-
double
getResourceProduction(
uint
resource
)
-
double
getResourcePressure(
uint
resource
)
-
Empire@
get_visibleOwner(
) const
-
uint
get_visibleLevel(
) const
-
vec3d
get_planetIconPosition(
) const
-
uint
get_totalSurfaceTiles(
) const
-
uint
get_usedSurfaceTiles(
) const
-
DataList@
getPlanetSurface(
)
-
double
get_colonyShipAccel(
) const
-
bool
get_isColonizing(
) const
-
bool
get_canSafelyColonize(
) const
-
uint
get_colonyOrderCount(
) const
-
bool
hasColonyTarget(
Object&
other
) const
-
Object@
get_colonyTarget(
uint
index
) const
-
int
get_lowestLoyalty(
) const
-
DataList@
getAffinities(
) const
-
void
annex(
const Empire@
forEmpire = null
)
-
void
colonize(
Object&
other,
double
toPopulation = 1.0
)
-
void
stopColonizing(
Object&
other
)
-
void
abandon(
)
-
void
buildBuilding(
uint
tid,
vec2i
pos
)
-
void
destroyBuilding(
vec2i
pos
)
-
void
setDesignation(
int
id
)
-
void
setProjectedDefenseRegion(
const Region@
reg
)
-
bool
get_isSendingColonyShips(
) const
-
bool
isEmpireColonizing(
const Empire@
emp
) const
-
Empire@
visibleOwnerToEmp(
const Empire@
emp
) const
-
void
setBeingColonized(
const Empire@
emp,
bool
value
)
-
void
giveBasicIconVision(
const Empire@
emp
)
-
void
initSurface(
int
width,
int
height,
uint
baseBiome,
uint
biomeTwo,
uint
biomeThree,
uint
resourceId
)
-
void
destroySurface(
)
-
int
getBuildingAt(
uint
x,
uint
y
)
-
float
getBuildingProgressAt(
uint
x,
uint
y
)
-
void
changeSurfaceOwner(
const Empire@
prevOwner
)
-
void
changeSurfaceRegion(
const Region@
prevRegion,
const Region@
newRegion
)
-
void
changeSurfaceTerritory(
const Territory@
prev,
const Territory@
terr
)
-
void
reducePopInTransit(
Object&
target,
double
amount
)
-
void
modMaxPopulation(
int
amt
)
-
void
addPopulation(
double
population
)
-
void
removePopulation(
double
population
)
-
void
modIncomingPop(
double
population
)
-
double
get_IncomingPop(
)
-
void
surfaceTick(
double
time
)
-
void
colonyShipArrival(
const Empire@
owner,
double
population
)
-
void
takeoverPlanet(
const Empire@
newOwner,
double
supportRatio = 1.0
)
-
void
setQuarantined(
bool
value
)
-
void
restoreLoyalty(
double
mod
)
-
void
modLoyaltyFacing(
const Empire@
emp,
double
mod
)
-
void
setLoyaltyBonus(
int
bonus
)
-
void
spawnBuilding(
uint
tid,
vec2i
pos
)
-
void
setBuildingCompletion(
uint
x,
uint
y,
float
progress
)
-
void
modOverpopulation(
int
steps
)
-
void
modGrowthRate(
double
amt
)
-
void
modTileDevelopRate(
double
amt
)
-
void
developTiles(
uint
amount
)
-
void
modBuildingConstructRate(
double
amt
)
-
void
modUndevelopedMaintenance(
double
amt
)
-
void
modCivResourceMod(
uint
resource,
double
amount
)
-
float
getCivResourceMod(
uint
resource
)
-
void
modColonyShipAccel(
double
mod
)
-
void
modBaseLoyalty(
int
mod
)
-
void
destroyRandomTile(
bool
civilOnly
)
-
void
modBombardment(
int
amount
)
-
void
absoluteSiege(
const Empire@
fromEmpire,
double
loyAmount
)
-
void
enterIntoOrbit(
const Ship@
ship
)
-
void
leaveFromOrbit(
const Ship@
ship
)
-
bool
get_isUnderSiege(
) const
-
bool
get_isGettingRelief(
) const
-
void
flagColonizing(
)
-
void
setContestion(
bool
value
)
-
double
getCivilianProduction(
uint
resource
)
-
void
modResource(
uint
resource,
double
amount
)
-
void
addAffinity(
uint
aff
)
-
void
removeAffinity(
uint
aff
)
-
void
modPressureCapFactor(
float
amt
)
-
void
modPressureCapMod(
int
amt
)
-
void
setNeedsPopulationForLevel(
bool
value
)
-
void
onManualResourceRemoved(
)
-
void
modBuildingMaintenanceRefund(
int
amt
)
-
void
setProtectionDisabled(
bool
val
)
-
void
spawnDefenseShips(
double
totalLaborValue
)
-
bool
writeSurfaceDelta(
Message&
msg
) const
-
void
writeSurface(
Message&
msg
) const
-
void
surfacePostLoad(
)
-
void
readSurfaceDelta(
Message&
msg
)
-
void
readSurface(
Message&
msg
)
-
bool
get_hasSurfaceComponent(
) const
-
Component_SurfaceComponent@
get_SurfaceComponent(
)
-
bool
get_isShip(
) const
-
bool
get_isStar(
) const
-
bool
get_isPlanet(
) const
-
bool
get_isColonyShip(
) const
-
bool
get_isOrbital(
) const
-
bool
get_isRegion(
) const
-
bool
get_isTerritory(
) const
-
bool
get_isPickup(
) const
-
bool
get_isAsteroid(
) const
-
bool
get_isAnomaly(
) const
-
bool
get_isOddity(
) const
-
bool
get_isFreighter(
) const
-
bool
get_isArtifact(
) const
-
bool
get_isCivilian(
) const
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.
Returns
Component_Mover@
: Can be null if no component of this type exists for this object.
Component_Orbit@
get_Orbit(
)
Returns the component handle for this type of component.
Returns
Component_Orbit@
: Can be null if no component of this type exists for this object.