载入中...
搜索中...
未找到
eve::rts::RTS类 参考

Owns RTS root entities and coordinates the phase-one systems. 更多...

#include <RTS.h>

类 eve::rts::RTS 继承关系图:
eve::Module eve::IGameplayControlProvider eve::IGameplayInstanceCatalog

类

struct  GameplayRuntime
 
struct  ScriptRuntime
 

Public 成员函数

 Module_REG (RTS)
 
 RTS ()
 Construct an empty RTS composition profile.
 
 ~RTS () override
 Destroy only live entities created through this module.
 
std::string_view gameplayDomain () const noexcept override
 Stable provider domain used for discovery and routing.
 
std::vector< SubjectRef > gameplayInstances () const override
 Instances currently served, in publication order.
 
Result< GameplayObservation > observeGameplay (const GameplaySession &session, SubjectRef instance) const override
 Observe one provider-owned gameplay instance without mutation.
 
Result< std::vector< GameplayActionDescriptor > > availableGameplayActions (const GameplaySession &session, SubjectRef instance, SubjectRef subject) const override
 Discover currently legal player-semantic actions for one subject.
 
Result< GameplayCommandReceipt > submitGameplay (const GameplaySession &session, SubjectRef instance, const GameplayCommand &command) override
 Validate authority and atomically submit one domain command.
 
Result< GameplayObservation > advanceGameplay (const GameplaySession &session, SubjectRef instance, const SimulationStep &step) override
 Advance one provider-owned instance using injected deterministic time.
 
Result< std::vector< GameplayEvent > > gameplayEvents (const GameplaySession &session, SubjectRef instance, std::uint64_t afterSequence) const override
 Return events strictly newer than an instance-local sequence cursor.
 
Result< Unit * > newUnit (SubjectRef subject, LogicalId definition={})
 Create and own one Unit root.
 
Result< Building * > newBuilding (SubjectRef subject, LogicalId definition={})
 Create and own one Building root.
 
Result< ResourceNode * > newResourceNode (SubjectRef subject, std::string resourceType, float amount, WorldPosition position, std::size_t workerCapacity=1)
 Create and own one harvestable resource node.
 
Result< Player * > newPlayer (SubjectRef subject)
 Create and own one Player root with a valid subject identity.
 
Result< Faction * > newFaction (SubjectRef subject)
 Create and own one Faction root with a valid subject identity.
 
Result< Unit * > newFactionUnit (Faction &faction, SubjectRef subject, LogicalId definition={})
 Atomically create a Unit, bind its owning faction and register canonical membership.
 
Result< Building * > newFactionBuilding (Faction &faction, SubjectRef subject, LogicalId definition={})
 Atomically create a Building, bind its owning faction and register canonical membership.
 
Result< Match * > newMatch (SubjectRef subject)
 Create and own one independent RTS match composition root.
 
Result< void > configureMatch (Match &match, VictoryRule rule, std::string archetype={}, double targetValue=0.0) const
 Configure one owned setup-phase match victory rule.
 
Result< void > addMatchParticipant (Match &match, Faction &faction, int team) const
 Add one owned faction to one owned setup-phase match.
 
Result< void > startMatch (Match &match) const
 Start one owned match after participant/rule validation.
 
Result< void > surrenderMatch (Match &match, Faction &faction) const
 Surrender one owned faction from one owned running match.
 
Result< Value > inspectMatch (Match &match) const
 Return an owning deterministic projection of one match lifecycle.
 
Unit * findUnit (SubjectRef subject) const noexcept
 Resolve a module-owned unit by persistent subject identity.
 
Building * findBuilding (SubjectRef subject) const noexcept
 Resolve a module-owned building by persistent subject identity.
 
ResourceNode * findResourceNode (SubjectRef subject) const noexcept
 Resolve a module-owned resource node by persistent subject identity.
 
Faction * findFaction (SubjectRef subject) const noexcept
 Resolve a module-owned faction by persistent subject identity.
 
Match * findMatch (SubjectRef subject) const noexcept
 Resolve a module-owned match by persistent subject identity.
 
Result< RTSStateSnapshot > snapshotState () const
 Capture all module-owned RTS root state using stable subject relationships.
 
Result< void > restoreState (const RTSStateSnapshot &snapshot)
 Validate and atomically restore an exact-topology RTS root snapshot.
 
Result< void > rebuildState (const RTSStateSnapshot &snapshot)
 Materialize a complete snapshot into an empty RTS module.
 
Result< std::string > canonicalStateJson () const
 Encode the stable RTS synchronization projection as deterministic compact JSON.
 
Result< ContentId > stateHash (const SnapshotHashProvider &hashProvider) const
 Hash the deterministic synchronization projection through the engine snapshot boundary.
 
Result< FanOutReceipt > fanOut (Player::Selection &selection, const CommandSpec &command, const FormationSpec &formation) const
 Fan one common command out through a player's selected unit handles.
 
Result< FanOutReceipt > commandUnits (std::span< const SubjectRef > subjects, const CommandSpec &command, const FormationSpec &formation={}) const
 Resolve stable unit identities and fan out one generic command.
 
Result< FanOutReceipt > submitMovementGroup (const MovementGroupBatch &batch)
 Commit a caller-built immediate Move group with coordinated pacing.
 
Result< void > setUnitStance (std::span< const SubjectRef > subjects, CombatStance stance, float leashRange) const
 Set automatic combat stance and pursuit leash for module-owned units atomically.
 
Result< void > setUnitMovementPriority (std::span< const SubjectRef > subjects, int priority) const
 Set collision/traffic contention priority for module-owned units atomically.
 
Result< void > assignWorker (Unit &worker, ResourceNode &node, Building &dropoff) const
 Atomically bind one worker to a compatible resource node and friendly dropoff.
 
Result< void > setWorkerAutoAssignment (std::span< const SubjectRef > subjects, bool enabled) const
 Enable or disable deterministic idle-worker assignment for module-owned units atomically.
 
Result< void > configureWorkforce (Faction &faction, bool autoConstruction, int maxBuildersPerSite, bool autoRepair, int maxRepairersPerBuilding, int reserveWorkers) const
 Configure deterministic idle-worker construction and repair assignment for one faction.
 
Result< std::string > assignBuilder (Unit &worker, Building &building) const
 Replace one capable friendly worker's orders with construction of an unfinished building.
 
Result< int > addUnitReserveAmmo (Unit &unit, int rounds) const
 Add or remove reserve ammunition through the unit's canonical weapon ammunition owner.
 
Result< float > addUnitAmmoSupply (Unit &unit, float rounds) const
 Add or remove mobile ammunition supply, clamped to the unit's carrying capacity.
 
Result< float > addBuildingAmmoSupply (Building &building, float rounds) const
 Add or remove depot ammunition supply, clamped to the building's storage capacity.
 
Result< void > setUnitAutoResupply (Unit &unit, bool enabled) const
 Enable or disable automatic supply dispatch and cancel an active supply mission when disabled.
 
Result< FanOutReceipt > suppressArea (std::span< const SubjectRef > subjects, WorldPosition start, WorldPosition end, float width=1.0f, int shotsPerUnit=0) const
 Assign persistent distributed fire along a non-degenerate world-space corridor.
 
Result< FanOutReceipt > escortUnits (std::span< const SubjectRef > subjects, SubjectRef protectedSubject, float guardRadius=6.0f, float spacing=1.5f) const
 Assign stable circular guard slots around one live friendly unit or building.
 
Value inspectState () const
 Project live module roots into an owning script/debug value.
 
Value inspectFrameEvents () const
 Project damage transactions completed since the latest step boundary.
 
Result< double > readUnitAttribute (Unit &unit, std::string_view attribute) const
 Read a canonical selected combat attribute through the RTS facade.
 
Result< void > setUnitAttribute (Unit &unit, std::string_view attribute, double value) const
 Set a canonical selected combat attribute through the RTS facade.
 
Result< effects::EffectHandle > applyEffect (Unit &unit, const RTSEffectDefinition &definition) const
 Apply a typed effect to a module-owned Unit component.
 
Result< effects::EffectHandle > applyEffect (Building &building, const RTSEffectDefinition &definition) const
 Apply a typed effect to a module-owned Building component.
 
Result< double > heal (SubjectRef source, SubjectRef target, double amount) const
 Restore health on one live owned unit or building, capped by canonical maximum health.
 
Result< effects::EffectHandle > applyStatusEffect (SubjectRef source, SubjectRef target, std::string effect, double durationOverride=-1.0)
 Resolve and apply one canonical data-defined status effect to an owned combat root.
 
Result< RTSBuildReceipt > build (Building &building, action::ActionRuntime &action, resource::IResourceAccount &account, resource::CostSpec cost, std::string product, Duration duration, std::string productionKind="unit", int priority=0, std::string transactionId={}, definition::DefinitionHandle definition={})
 Submit a building production action through the canonical transaction facade.
 
Result< void > setProductionResourceReserve (Faction &faction, std::string resource, std::int64_t amount, int minimumPriority)
 Configure or clear a faction-wide production resource floor shared by all factories.
 
Result< RTSCancelProductionReceipt > cancelProduction (Building &building, resource::IResourceAccount &account, std::string productionTaskId, std::string orderId, resource::CostSpec refund, std::string reason="production cancelled")
 Atomically cancel one paid production task and refund its complete cost.
 
Result< ContentImportReceipt > loadContent (definitions::DefinitionRegistry &registry, std::string_view json)
 Atomically import an RTS content pack into the caller-owned canonical definition registry.
 
void setDefinitionRegistry (definitions::DefinitionRegistry *registry) noexcept
 Attach the canonical definition registry used to settle completed research.
 
void setResourceCredit (ResourceCredit credit)
 Install the game-owned economy credit boundary used by mining deliveries.
 
void setRepairDebit (RepairDebit debit)
 Install the game-owned economy debit boundary used by building repair.
 
void setCrowdProvider (crowd::Crowd *crowd) noexcept
 Attach the canonical Crowd provider used by Units with a bound Unit::Crowd link.
 
void setNavigationProvider (map::Pathfinder *pathfinder, NavigationGrid grid={}, NavigationEvent unreachable={}) noexcept
 Attach the canonical map pathfinder and world/grid conversion used by unit navigation.
 
void setFogProvider (FogProvider provider) noexcept
 Install the faction-to-canonical-FOV resolver used by fog-of-war projection.
 
void setCombatProviders (sensing::SensingWorld *sensing, combat::DamageRuntime *damage) noexcept
 Attach canonical sensing and damage coordinators used by automatic combat.
 
Result< void > configureSettlementRules (const settlement::SettlementRuleSet &rules)
 Replace declarative settlement rules on the active canonical damage provider.
 
void setFireLineQuery (FireLineQuery query)
 Install the map/game-owned line-of-fire query used by direct weapons.
 
void setCombatHeightQuery (CombatHeightQuery query)
 Install the map/game-owned absolute projectile launch-height query.
 
void setProjectileCollisionQuery (ProjectileCollisionQuery query)
 Install the map/physics-owned swept collision query for in-flight projectiles.
 
void setAIProductionRequest (AIProductionRequest request)
 Install the authoritative production boundary used by enabled faction AI policies.
 
void setMatchResourceQuery (MatchResourceQuery query)
 Install the authoritative economy query used by resource-target matches.
 
void setPassiveIncomeCredit (PassiveIncomeCredit credit)
 Install the authoritative economy credit boundary used by powered passive income.
 
void setAmmoProductionPurchase (AmmoProductionPurchase purchase)
 Install the authoritative economy purchase boundary used by building ammunition production.
 
void setProductionSpawn (ProductionSpawn spawn)
 Install the game-owned factory that materializes completed canonical unit production tasks.
 
void setProductionSpawnPosition (ProductionSpawnPosition position)
 Install the game/map-owned deterministic building-exit placement probe.
 
void setReinforcementCancel (ReinforcementCancel cancel)
 Install the game-owned atomic cancellation/refund boundary for capped reinforcements.
 
Result< std::size_t > step (const SimulationStep &step, IRTSActionExecutor &executor)
 Run phase-one simulation systems in deterministic order.
 
Result< std::size_t > stepScript (double seconds)
 Advance one script-owned fixed step through the canonical ActionRuntime adapter.
 
Result< void > configureScriptWorld (int width, int height, float cellSize, float originX=0.0f, float originY=0.0f)
 Configure canonical providers owned by the self-contained Squirrel composition profile.
 
Result< void > setScriptNavigationBlocked (int x, int y, bool blocked)
 Change one cell in the script profile's canonical pathfinder and crowd field.
 
Result< void > setScriptNavigationCost (int x, int y, float cost)
 Change one positive cell traversal cost in the script profile's canonical providers.
 
Result< void > setScriptTerrainElevation (int x, int y, float elevation)
 Set one finite authoritative terrain elevation shared by fog and combat queries.
 
Result< float > scriptTerrainElevation (int x, int y) const
 Read one authoritative script-profile terrain elevation.
 
Result< void > addScriptResource (Faction &faction, std::string resource, std::int64_t amount)
 Credit one faction's script-profile canonical economy account.
 
Result< std::int64_t > scriptResource (Faction &faction, std::string_view resource) const
 Read one faction balance from the script-profile canonical economy ledger.
 
Result< void > configureScriptAI (Faction &faction, LogicalId workerDefinition, LogicalId armyDefinition, LogicalId targetBuildingDefinition, int desiredWorkers, int attackThreshold, float thinkInterval=1.0f, float formationSpacing=1.2f, bool enabled=true)
 Configure a faction's deterministic worker replenishment, army production, and attack policy.
 
Result< ContentImportReceipt > loadScriptContent (std::string_view json)
 Atomically load a content pack into the script profile's canonical definition registry.
 
Result< RTSBuildReceipt > queueScriptUnit (Building &producer, SubjectRef unitSubject, LogicalId unitDefinition, int priority=0)
 Queue one data-defined unit through canonical production, action, and economy providers.
 
Result< ReinforcementRequestReceipt > queueScriptReinforcement (Building &producer, SubjectRef unitSubject, LogicalId preferredDefinition, int priority=0)
 Queue a preferred reinforcement, deterministically trying its configured substitution chain.
 
Result< Building * > startScriptConstruction (Faction &faction, SubjectRef buildingSubject, LogicalId buildingDefinition, WorldPosition position, Unit &builder)
 Start one paid data-defined construction project assigned to a canonical worker order.
 
Result< resource::Receipt > cancelScriptConstruction (Building &building)
 Cancel one unfinished paid construction, clear its builders, and refund remaining value.
 
Result< resource::Receipt > sellScriptBuilding (Building &building)
 Sell one completed building, refund its configured value and every paid queued task.
 
Result< RTSBuildReceipt > queueScriptResearch (Building &producer, std::string upgrade, int priority=0)
 Queue one paid data-defined upgrade through canonical research production.
 
Result< RTSCancelProductionReceipt > cancelScriptProduction (Building &producer, int queueIndex=-1)
 Cancel one queued script production/research task by live queue index and refund its full cost.
 
Result< void > setBuildingRally (Building &producer, CommandSpec command, bool groupedReinforcements=false) const
 Set the command copied to completed production, optionally creating a reinforcement group.
 
Result< void > linkBuildingRally (Building &producer, Building &source) const
 Copy a grouped reinforcement rally and composition policy from a friendly producer.
 
Result< void > clearBuildingRally (Building &producer) const
 Clear rally dispatch, transport assignment, and reinforcement policy.
 
Result< void > setReinforcementLimit (Building &producer, std::size_t maximum) const
 Set the maximum living size of a linked reinforcement group; zero removes the cap.
 
Result< void > setReinforcementTypeLimit (Building &producer, std::string unitType, std::size_t maximum) const
 Set or clear one unit type's living cap across a linked reinforcement group.
 
Result< void > setReinforcementTypePriority (Building &producer, std::string unitType, int priority) const
 Set or clear one unit type's contention priority across a linked reinforcement group.
 
Result< void > setReinforcementFallback (Building &producer, std::string preferred, std::string fallback) const
 Set or clear one acyclic preferred-to-substitute mapping across a linked group.
 
Result< void > setReinforcementAutoCancel (Building &producer, float seconds) const
 Configure delayed cancellation/refund while a reinforcement group remains capped.
 
Result< void > setReinforcementTransport (Building &producer, Unit *transport, std::size_t minimumLoad=0) const
 Route reinforcements through an exclusive friendly transport, or clear with null.
 
Result< void > castScriptAbility (Unit &caster, std::string ability, SubjectRef target, WorldPosition point)
 Cast one canonical data-defined ability through the composed damage/effect/economy providers.
 
Result< void > cancelScriptAbility (Unit &caster)
 Cancel an active ability channel without refunding its resource cost or cooldown.
 
Result< std::size_t > requestFireSupport (Unit &requester, WorldPosition center, float radius, int shotsPerResponder, std::size_t maxResponders=0) const
 Assign eligible friendly indirect-fire units to a deterministic suppression corridor.
 
Result< std::size_t > cancelFireSupport (Unit &requester) const
 Cancel every suppression mission assigned for one owned requester.
 
Result< std::size_t > unloadTransport (Unit &transport, WorldPosition destination) const
 Unload every passenger from a module-owned transport around a deterministic destination.
 
Result< std::size_t > evacuateBuilding (Building &building, WorldPosition destination) const
 Evacuate every occupant from a module-owned building around a deterministic destination.
 
Result< void > setUnitCloaked (Unit &unit, bool cloaked) const
 Change the cloak projection of a live module-owned unit.
 
Result< void > queueScriptCommand (RTSReplayCommand command)
 Queue one stable-identity command on the script profile's deterministic tick timeline.
 
Result< std::string > exportScriptCommandLog () const
 Export the complete retained script-profile command history.
 
Result< void > importScriptCommandLog (std::string_view text, bool clearExisting=true)
 Atomically import commands at or after the next script simulation tick.
 
std::uint64_t scriptTick () const noexcept
 Return the most recently completed script simulation tick, or zero before stepping.
 
Result< void > captureScriptCheckpoint (std::string name)
 Capture the complete current script-profile state under a non-empty in-memory name.
 
Result< void > restoreScriptCheckpoint (std::string_view name)
 Atomically restore a named script-profile checkpoint with unchanged root topology.
 
Result< void > removeScriptCheckpoint (std::string_view name)
 Remove one named in-memory script-profile checkpoint.
 
Result< bool > scriptCellVisible (Faction &faction, int x, int y) const
 Query canonical script-profile fog visibility for one faction cell.
 
Result< bool > scriptCellExplored (Faction &faction, int x, int y) const
 Query canonical script-profile explored memory for one faction cell.
 
Result< Value > scriptContact (Faction &faction, SubjectRef target) const
 Project one faction's visible, radar, or last-known stable contact.
 
Result< void > remove (SubjectRef subject)
 Remove one owned unit, building, or resource node by stable identity.
 
Result< std::size_t > cleanupDestroyed ()
 Physically remove dead units and buildings and repair all module-owned relationships.
 
std::size_t unitCount () const noexcept
 Return the number of live Unit roots owned by this module.
 
std::size_t buildingCount () const noexcept
 Return the number of live Building roots owned by this module.
 
std::size_t resourceNodeCount () const noexcept
 Return the number of live resource nodes owned by this module.
 
std::size_t playerCount () const noexcept
 Return the number of live Player roots owned by this module.
 
std::size_t factionCount () const noexcept
 Return the number of live Faction roots owned by this module.
 
std::size_t matchCount () const noexcept
 Return the number of live Match roots owned by this module.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 
- Public 成员函数 继承自 eve::IGameplayControlProvider
virtual ~IGameplayControlProvider ()=default
 Releases IGameplayControlProvider resources.
 
- Public 成员函数 继承自 eve::IGameplayInstanceCatalog
virtual ~IGameplayInstanceCatalog ()=default
 Releases IGameplayInstanceCatalog resources.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::IGameplayControlProvider
static constexpr const char * capabilityName = "IGameplayControlProvider"
 
- 静态 Public 属性 继承自 eve::IGameplayInstanceCatalog
static constexpr const char * capabilityName = "IGameplayInstanceCatalog"
 

详细描述

Owns RTS root entities and coordinates the phase-one systems.

The module owns only the ECS handles it created. Components remain the authoritative state owners, while action lifecycle state remains owned by the caller-provided action::ActionRuntime through IRTSActionExecutor.

在文件 RTS.h 第 63 行定义.

构造及析构函数说明

◆ RTS()

eve::rts::RTS::RTS ( )

Construct an empty RTS composition profile.

在文件 RTS.cpp 第 280 行定义.

◆ ~RTS()

eve::rts::RTS::~RTS ( )
override

Destroy only live entities created through this module.

在文件 RTS.cpp 第 285 行定义.

引用了 eve::rts::FogOfWarSystem::clear(), setCombatProviders() , 以及 setCrowdProvider().

成员函数说明

◆ addBuildingAmmoSupply()

Result< float > eve::rts::RTS::addBuildingAmmoSupply ( Building &  building,
float  rounds 
) const

Add or remove depot ammunition supply, clamped to the building's storage capacity.

在文件 RTS.cpp 第 1117 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ addMatchParticipant()

Result< void > eve::rts::RTS::addMatchParticipant ( Match &  match,
Faction &  faction,
int  team 
) const

Add one owned faction to one owned setup-phase match.

在文件 RTS.cpp 第 833 行定义.

引用了 eve::rts::MatchSystem::addParticipant(), eve::Diagnostic::error(), eve::Result< T >::failure(), findFaction() , 以及 eve::InvalidArgument.

◆ addScriptResource()

Result< void > eve::rts::RTS::addScriptResource ( Faction &  faction,
std::string  resource,
std::int64_t  amount 
)

◆ addUnitAmmoSupply()

Result< float > eve::rts::RTS::addUnitAmmoSupply ( Unit &  unit,
float  rounds 
) const

Add or remove mobile ammunition supply, clamped to the unit's carrying capacity.

在文件 RTS.cpp 第 1102 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ addUnitReserveAmmo()

Result< int > eve::rts::RTS::addUnitReserveAmmo ( Unit &  unit,
int  rounds 
) const

Add or remove reserve ammunition through the unit's canonical weapon ammunition owner.

在文件 RTS.cpp 第 1068 行定义.

引用了 eve::weapon::Ammo, eve::Applied, capacity, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, resource, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ advanceGameplay()

Result< GameplayObservation > eve::rts::RTS::advanceGameplay ( const GameplaySession &  session,
SubjectRef  instance,
const SimulationStep &  step 
)
overridevirtual

Advance one provider-owned instance using injected deterministic time.

Advance gameplay.

实现了 eve::IGameplayControlProvider.

在文件 RTS.cpp 第 482 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, observeGameplay(), eve::PreconditionViolation, session, step , 以及 eve::SimulationStep::tick.

◆ applyEffect() [1/2]

Result< effects::EffectHandle > eve::rts::RTS::applyEffect ( Building &  building,
const RTSEffectDefinition &  definition 
) const

Apply a typed effect to a module-owned Building component.

在文件 RTS.cpp 第 1548 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::StaleHandle.

◆ applyEffect() [2/2]

Result< effects::EffectHandle > eve::rts::RTS::applyEffect ( Unit &  unit,
const RTSEffectDefinition &  definition 
) const

Apply a typed effect to a module-owned Unit component.

在文件 RTS.cpp 第 1541 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::StaleHandle , 以及 unit.

◆ applyStatusEffect()

Result< effects::EffectHandle > eve::rts::RTS::applyStatusEffect ( SubjectRef  source,
SubjectRef  target,
std::string  effect,
double  durationOverride = -1.0 
)

Resolve and apply one canonical data-defined status effect to an owned combat root.

在文件 RTS.cpp 第 1588 行定义.

引用了 eve::Conflict, duration, effect, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, source, target , 以及 unit.

◆ assignBuilder()

Result< std::string > eve::rts::RTS::assignBuilder ( Unit &  worker,
Building &  building 
) const

Replace one capable friendly worker's orders with construction of an unfinished building.

在文件 RTS.cpp 第 1045 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rts::CommandSpec::kind, eve::StaleHandle, eve::rts::CommandSpec::target , 以及 eve::rts::CommandSpec::targetEntity.

◆ assignWorker()

Result< void > eve::rts::RTS::assignWorker ( Unit &  worker,
ResourceNode &  node,
Building &  dropoff 
) const

◆ availableGameplayActions()

Result< std::vector< GameplayActionDescriptor > > eve::rts::RTS::availableGameplayActions ( const GameplaySession &  session,
SubjectRef  instance,
SubjectRef  subject 
) const
overridevirtual

Discover currently legal player-semantic actions for one subject.

Available gameplay actions.

实现了 eve::IGameplayControlProvider.

在文件 RTS.cpp 第 393 行定义.

引用了 actions, eve::Diagnostic::error(), handle, eve::NotFound, number, eve::PreconditionViolation, session, subject , 以及 unit.

◆ build()

Result< RTSBuildReceipt > eve::rts::RTS::build ( Building &  building,
action::ActionRuntime &  action,
resource::IResourceAccount &  account,
resource::CostSpec  cost,
std::string  product,
Duration  duration,
std::string  productionKind = "unit",
int  priority = 0,
std::string  transactionId = {},
definition::DefinitionHandle  definition = {} 
)

Submit a building production action through the canonical transaction facade.

参数
buildingBorrowed module-owned building.
actionBorrowed shared ActionRuntime.
accountBorrowed authoritative resource account.
costPositive resource cost copied into the transaction.
productStable production product identifier.
durationPositive deterministic production duration.
productionKindProduction queue kind, defaulting to unit.
priorityProduction queue priority.
transactionIdOptional transaction correlation id.
definitionOptional pinned definition generation used during settlement.
返回
Committed build receipt or a checked failure with no partial state.

在文件 RTS.cpp 第 1624 行定义.

引用了 account, action, cost, eve::resource::ResourceCost::create(), duration, eve::Diagnostic::error(), eve::Result< T >::failure(), priority, resource , 以及 eve::StaleHandle.

◆ buildingCount()

std::size_t eve::rts::RTS::buildingCount ( ) const
noexcept

Return the number of live Building roots owned by this module.

在文件 RTS.cpp 第 3619 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ cancelFireSupport()

Result< std::size_t > eve::rts::RTS::cancelFireSupport ( Unit &  requester) const

Cancel every suppression mission assigned for one owned requester.

在文件 RTS.cpp 第 3146 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::StaleHandle.

◆ cancelProduction()

Result< RTSCancelProductionReceipt > eve::rts::RTS::cancelProduction ( Building &  building,
resource::IResourceAccount &  account,
std::string  productionTaskId,
std::string  orderId,
resource::CostSpec  refund,
std::string  reason = "production cancelled" 
)

Atomically cancel one paid production task and refund its complete cost.

在文件 RTS.cpp 第 1664 行定义.

引用了 account, eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::StaleHandle.

◆ cancelScriptAbility()

Result< void > eve::rts::RTS::cancelScriptAbility ( Unit &  caster)

Cancel an active ability channel without refunding its resource cost or cooldown.

在文件 RTS.cpp 第 3118 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, eve::StaleHandle, subject, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ cancelScriptConstruction()

Result< resource::Receipt > eve::rts::RTS::cancelScriptConstruction ( Building &  building)

Cancel one unfinished paid construction, clear its builders, and refund remaining value.

在文件 RTS.cpp 第 2499 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, eve::PreconditionViolation, eve::rts::Building::release(), eve::StaleHandle , 以及 value.

◆ cancelScriptProduction()

Result< RTSCancelProductionReceipt > eve::rts::RTS::cancelScriptProduction ( Building &  producer,
int  queueIndex = -1 
)

Cancel one queued script production/research task by live queue index and refund its full cost.

在文件 RTS.cpp 第 2747 行定义.

引用了 active, eve::production::Cancelled, eve::production::Completed, eve::Diagnostic::error(), eve::production::Failed, eve::Result< T >::failure(), index, eve::InvalidArgument, eve::NotFound, eve::StaleHandle, taskId , 以及 value.

◆ canonicalStateJson()

Result< std::string > eve::rts::RTS::canonicalStateJson ( ) const

Encode the stable RTS synchronization projection as deterministic compact JSON.

在文件 RTSSnapshot.cpp 第 343 行定义.

引用了 left, payload, right , 以及 state.

◆ captureScriptCheckpoint()

◆ castScriptAbility()

◆ cleanupDestroyed()

Result< std::size_t > eve::rts::RTS::cleanupDestroyed ( )

Physically remove dead units and buildings and repair all module-owned relationships.

返回
Number of gameplay roots removed in this cleanup pass.

在文件 RTS.cpp 第 3588 行定义.

引用了 eve::Applied, handle, eve::NoOp, removed, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ clearBuildingRally()

Result< void > eve::rts::RTS::clearBuildingRally ( Building &  producer) const

Clear rally dispatch, transport assignment, and reinforcement policy.

在文件 RTS.cpp 第 2835 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ commandUnits()

Result< FanOutReceipt > eve::rts::RTS::commandUnits ( std::span< const SubjectRef >  subjects,
const CommandSpec &  command,
const FormationSpec &  formation = {} 
) const

Resolve stable unit identities and fan out one generic command.

参数
subjectsStable identities in deterministic selection order.
commandGeneric command accepted by the shared order component.
formationDeterministic formation layout.
返回
Accepted order ids, or an atomic failure when any identity is missing.

在文件 RTSCommands.cpp 第 12 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), fanOut(), findUnit(), index, eve::NotFound, unit , 以及 eve::rts::Player::Selection::units.

被这些函数引用 eve::rts::script_internal::exposeFormationBindings().

◆ configureMatch()

Result< void > eve::rts::RTS::configureMatch ( Match &  match,
VictoryRule  rule,
std::string  archetype = {},
double  targetValue = 0.0 
) const

◆ configureScriptAI()

Result< void > eve::rts::RTS::configureScriptAI ( Faction &  faction,
LogicalId  workerDefinition,
LogicalId  armyDefinition,
LogicalId  targetBuildingDefinition,
int  desiredWorkers,
int  attackThreshold,
float  thinkInterval = 1.0f,
float  formationSpacing = 1.2f,
bool  enabled = true 
)

Configure a faction's deterministic worker replenishment, army production, and attack policy.

参数
factionOwned faction whose strategy is changed.
workerDefinitionUnit definition used until the worker target is met.
armyDefinitionUnit definition produced for the attack force.
targetBuildingDefinitionPreferred hostile building definition.
desiredWorkersMinimum live worker count.
attackThresholdMinimum live army count before attacking.
thinkIntervalPositive decision interval in seconds.
formationSpacingPositive attack formation spacing.
enabledWhether the strategy runs.

在文件 RTS.cpp 第 2274 行定义.

引用了 eve::Applied, eve::Conflict, enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::LogicalId::isValid(), eve::LogicalId::name(), eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ configureScriptWorld()

◆ configureSettlementRules()

Result< void > eve::rts::RTS::configureSettlementRules ( const settlement::SettlementRuleSet &  rules)

Replace declarative settlement rules on the active canonical damage provider.

返回
Applied, or NotFound when no combat provider is attached; failure retains previous rules. @thread Call on the RTS owning simulation thread outside update. @reentrancy Does not invoke gameplay callbacks.

在文件 RTS.cpp 第 323 行定义.

引用了 eve::combat::DamageRuntime::configureSettlementRules(), eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::NotFound.

◆ configureWorkforce()

Result< void > eve::rts::RTS::configureWorkforce ( Faction &  faction,
bool  autoConstruction,
int  maxBuildersPerSite,
bool  autoRepair,
int  maxRepairersPerBuilding,
int  reserveWorkers 
) const

Configure deterministic idle-worker construction and repair assignment for one faction.

在文件 RTS.cpp 第 1027 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ escortUnits()

Result< FanOutReceipt > eve::rts::RTS::escortUnits ( std::span< const SubjectRef >  subjects,
SubjectRef  protectedSubject,
float  guardRadius = 6.0f,
float  spacing = 1.5f 
) const

◆ evacuateBuilding()

Result< std::size_t > eve::rts::RTS::evacuateBuilding ( Building &  building,
WorldPosition  destination 
) const

Evacuate every occupant from a module-owned building around a deterministic destination.

在文件 RTS.cpp 第 3160 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::InvalidArgument.

◆ exportScriptCommandLog()

Result< std::string > eve::rts::RTS::exportScriptCommandLog ( ) const

Export the complete retained script-profile command history.

在文件 RTS.cpp 第 3182 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Status::success() , 以及 eve::Result< T >::success().

◆ factionCount()

std::size_t eve::rts::RTS::factionCount ( ) const
noexcept

Return the number of live Faction roots owned by this module.

在文件 RTS.cpp 第 3622 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ fanOut()

Result< FanOutReceipt > eve::rts::RTS::fanOut ( Player::Selection &  selection,
const CommandSpec &  command,
const FormationSpec &  formation 
) const

Fan one common command out through a player's selected unit handles.

参数
selectionPlayer-owned generation-checked selection projection.
commandGeneric Move/Attack/Build/Gather command.
formationDeterministic formation layout.
返回
Accepted order ids in selection order.

在文件 RTSCommands.cpp 第 4 行定义.

引用了 eve::rts::CommandFanOutSystem::fanOut(), eve::rts::Player::Selection::revision , 以及 eve::rts::Player::Selection::units.

被这些函数引用 commandUnits() , 以及 submitGameplay().

◆ findBuilding()

Building * eve::rts::RTS::findBuilding ( SubjectRef  subject) const
noexcept

Resolve a module-owned building by persistent subject identity.

在文件 RTS.cpp 第 891 行定义.

引用了 subject.

被这些函数引用 restoreState().

◆ findFaction()

Faction * eve::rts::RTS::findFaction ( SubjectRef  subject) const
noexcept

Resolve a module-owned faction by persistent subject identity.

在文件 RTS.cpp 第 3625 行定义.

引用了 subject.

被这些函数引用 addMatchParticipant(), restoreState() , 以及 surrenderMatch().

◆ findMatch()

Match * eve::rts::RTS::findMatch ( SubjectRef  subject) const
noexcept

Resolve a module-owned match by persistent subject identity.

在文件 RTS.cpp 第 3626 行定义.

引用了 subject.

被这些函数引用 restoreState().

◆ findResourceNode()

ResourceNode * eve::rts::RTS::findResourceNode ( SubjectRef  subject) const
noexcept

Resolve a module-owned resource node by persistent subject identity.

在文件 RTS.cpp 第 893 行定义.

引用了 subject.

被这些函数引用 restoreState().

◆ findUnit()

Unit * eve::rts::RTS::findUnit ( SubjectRef  subject) const
noexcept

Resolve a module-owned unit by persistent subject identity.

在文件 RTS.cpp 第 889 行定义.

引用了 subject.

被这些函数引用 commandUnits(), restoreState() , 以及 submitMovementGroup().

◆ gameplayDomain()

std::string_view eve::rts::RTS::gameplayDomain ( ) const
overridevirtualnoexcept

Stable provider domain used for discovery and routing.

Gameplay domain.

实现了 eve::IGameplayControlProvider.

在文件 RTS.cpp 第 342 行定义.

◆ gameplayEvents()

Result< std::vector< GameplayEvent > > eve::rts::RTS::gameplayEvents ( const GameplaySession &  session,
SubjectRef  instance,
std::uint64_t  afterSequence 
) const
overridevirtual

Return events strictly newer than an instance-local sequence cursor.

Gameplay events.

实现了 eve::IGameplayControlProvider.

在文件 RTS.cpp 第 502 行定义.

引用了 eve::Applied, eve::SubjectRef::format(), eve::NoOp, observeGameplay(), session , 以及 eve::Status::success().

◆ gameplayInstances()

std::vector< SubjectRef > eve::rts::RTS::gameplayInstances ( ) const
overridevirtual

Instances currently served, in publication order.

Gameplay instances.

实现了 eve::IGameplayInstanceCatalog.

在文件 RTS.cpp 第 344 行定义.

引用了 handle, left , 以及 right.

◆ heal()

Result< double > eve::rts::RTS::heal ( SubjectRef  source,
SubjectRef  target,
double  amount 
) const

◆ importScriptCommandLog()

Result< void > eve::rts::RTS::importScriptCommandLog ( std::string_view  text,
bool  clearExisting = true 
)

Atomically import commands at or after the next script simulation tick.

在文件 RTS.cpp 第 3189 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 text.

◆ inspectFrameEvents()

Value eve::rts::RTS::inspectFrameEvents ( ) const

Project damage transactions completed since the latest step boundary.

返回
Owning presentation data excluded from deterministic snapshots and state hashes.

在文件 RTS.cpp 第 1409 行定义.

引用了 eve::combat::Death, events, eve::combat::Flinch, kind, eve::combat::Knockdown, left, eve::combat::None, right, sequence, eve::combat::Stagger , 以及 value.

◆ inspectMatch()

Result< Value > eve::rts::RTS::inspectMatch ( Match &  match) const

Return an owning deterministic projection of one match lifecycle.

在文件 RTS.cpp 第 854 行定义.

引用了 eve::Diagnostic::error(), events, eve::Result< T >::failure(), eve::InvalidArgument, phase, eve::rts::Running , 以及 eve::rts::Setup.

◆ inspectState()

Value eve::rts::RTS::inspectState ( ) const

Project live module roots into an owning script/debug value.

返回
Deterministically ordered arrays of units, buildings, resource nodes and factions.

在文件 RTS.cpp 第 1271 行定义.

引用了 eve::weapon::Ammo, capacity, eve::rts::combatStanceName(), current, handle, kind, maximum, node, order, eve::rts::orderKindName(), resource, subject, unit, units, x , 以及 y.

◆ linkBuildingRally()

Result< void > eve::rts::RTS::linkBuildingRally ( Building &  producer,
Building &  source 
) const

Copy a grouped reinforcement rally and composition policy from a friendly producer.

在文件 RTS.cpp 第 2811 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::PreconditionViolation, source, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ loadContent()

Result< ContentImportReceipt > eve::rts::RTS::loadContent ( definitions::DefinitionRegistry &  registry,
std::string_view  json 
)
inline

Atomically import an RTS content pack into the caller-owned canonical definition registry.

在文件 RTS.h 第 299 行定义.

◆ loadScriptContent()

Result< ContentImportReceipt > eve::rts::RTS::loadScriptContent ( std::string_view  json)

Atomically load a content pack into the script profile's canonical definition registry.

在文件 RTS.cpp 第 2305 行定义.

◆ matchCount()

std::size_t eve::rts::RTS::matchCount ( ) const
noexcept

Return the number of live Match roots owned by this module.

在文件 RTS.cpp 第 3623 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ Module_REG()

eve::rts::RTS::Module_REG ( RTS  )

◆ newBuilding()

Result< Building * > eve::rts::RTS::newBuilding ( SubjectRef  subject,
LogicalId  definition = {} 
)

Create and own one Building root.

参数
subjectStable persistent subject identity.
definitionOptional logical building definition.
返回
Borrowed pointer valid until the entity is destroyed or this module is destroyed.

在文件 RTS.cpp 第 550 行定义.

引用了 eve::Applied, eve::Conflict, eve::rts::Building::createBuilding(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::rts::Building::release(), status, subject, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 newFactionBuilding() , 以及 rebuildState().

◆ newFaction()

◆ newFactionBuilding()

Result< Building * > eve::rts::RTS::newFactionBuilding ( Faction &  faction,
SubjectRef  subject,
LogicalId  definition = {} 
)

◆ newFactionUnit()

◆ newMatch()

Result< Match * > eve::rts::RTS::newMatch ( SubjectRef  subject)

◆ newPlayer()

Result< Player * > eve::rts::RTS::newPlayer ( SubjectRef  subject)

◆ newResourceNode()

Result< ResourceNode * > eve::rts::RTS::newResourceNode ( SubjectRef  subject,
std::string  resourceType,
float  amount,
WorldPosition  position,
std::size_t  workerCapacity = 1 
)

◆ newUnit()

Result< Unit * > eve::rts::RTS::newUnit ( SubjectRef  subject,
LogicalId  definition = {} 
)

Create and own one Unit root.

参数
subjectStable persistent subject identity.
definitionOptional logical unit definition.
返回
Borrowed pointer valid until the entity is destroyed or this module is destroyed.

在文件 RTS.cpp 第 519 行定义.

引用了 eve::Applied, eve::Conflict, eve::rts::Unit::createUnit(), eve::rts::RTSUnitAttributeAdapter::ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, status, subject, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

被这些函数引用 newFactionUnit() , 以及 rebuildState().

◆ observeGameplay()

◆ playerCount()

std::size_t eve::rts::RTS::playerCount ( ) const
noexcept

Return the number of live Player roots owned by this module.

在文件 RTS.cpp 第 3621 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ queueScriptCommand()

Result< void > eve::rts::RTS::queueScriptCommand ( RTSReplayCommand  command)

Queue one stable-identity command on the script profile's deterministic tick timeline.

在文件 RTS.cpp 第 3175 行定义.

引用了 eve::Conflict, eve::Diagnostic::error() , 以及 eve::Result< T >::failure().

被这些函数引用 eve::rts::script_internal::exposeFormationBindings().

◆ queueScriptReinforcement()

Result< ReinforcementRequestReceipt > eve::rts::RTS::queueScriptReinforcement ( Building &  producer,
SubjectRef  unitSubject,
LogicalId  preferredDefinition,
int  priority = 0 
)

Queue a preferred reinforcement, deterministically trying its configured substitution chain.

在文件 RTS.cpp 第 2384 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::LogicalId::isValid(), eve::SubjectRef::isValid(), eve::LogicalId::name() , 以及 eve::StaleHandle.

◆ queueScriptResearch()

Result< RTSBuildReceipt > eve::rts::RTS::queueScriptResearch ( Building &  producer,
std::string  upgrade,
int  priority = 0 
)

◆ queueScriptUnit()

Result< RTSBuildReceipt > eve::rts::RTS::queueScriptUnit ( Building &  producer,
SubjectRef  unitSubject,
LogicalId  unitDefinition,
int  priority = 0 
)

◆ readUnitAttribute()

Result< double > eve::rts::RTS::readUnitAttribute ( Unit &  unit,
std::string_view  attribute 
) const

Read a canonical selected combat attribute through the RTS facade.

在文件 RTS.cpp 第 1527 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::StaleHandle , 以及 unit.

◆ rebuildState()

Result< void > eve::rts::RTS::rebuildState ( const RTSStateSnapshot &  snapshot)

◆ remove()

Result< void > eve::rts::RTS::remove ( SubjectRef  subject)

Remove one owned unit, building, or resource node by stable identity.

参数
subjectStable identity of the root to remove.
返回
Applied when a root was removed, or NotFound when no owned gameplay root matches.
备注
Removing a transport also removes its passengers. Removing a live building releases its garrison in place; destruction cleanup removes occupants that died with the building.

在文件 RTS.cpp 第 3568 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, node, eve::NotFound, subject, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ removeScriptCheckpoint()

Result< void > eve::rts::RTS::removeScriptCheckpoint ( std::string_view  name)

Remove one named in-memory script-profile checkpoint.

在文件 RTS.cpp 第 3374 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), name, eve::NotFound, eve::Status::success() , 以及 eve::Result< T >::success().

◆ requestFireSupport()

Result< std::size_t > eve::rts::RTS::requestFireSupport ( Unit &  requester,
WorldPosition  center,
float  radius,
int  shotsPerResponder,
std::size_t  maxResponders = 0 
) const

Assign eligible friendly indirect-fire units to a deterministic suppression corridor.

在文件 RTS.cpp 第 3138 行定义.

引用了 center, eve::Diagnostic::error(), eve::Result< T >::failure(), radius , 以及 eve::StaleHandle.

◆ resourceNodeCount()

std::size_t eve::rts::RTS::resourceNodeCount ( ) const
noexcept

Return the number of live resource nodes owned by this module.

在文件 RTS.cpp 第 3620 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ restoreScriptCheckpoint()

Result< void > eve::rts::RTS::restoreScriptCheckpoint ( std::string_view  name)

Atomically restore a named script-profile checkpoint with unchanged root topology.

在文件 RTS.cpp 第 3232 行定义.

引用了 eve::Applied, cell, eve::Conflict, cost, current, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), found, handle, key, name, eve::NotFound, rebuildState(), setDefinitionRegistry(), subject, eve::Status::success(), eve::Result< T >::success(), unit, valid, value, x , 以及 y.

◆ restoreState()

Result< void > eve::rts::RTS::restoreState ( const RTSStateSnapshot &  snapshot)

Validate and atomically restore an exact-topology RTS root snapshot.

在文件 RTSRestore.cpp 第 8 行定义.

引用了 eve::rts::TagSet::add(), eve::Applied, eve::rts::EntityLink< FactionLinkTag >::bind(), eve::rts::EntityLink< ResourceNodeLinkTag >::bind(), eve::rts::EntityLink< BuildingLinkTag >::bind(), eve::rts::EntityLink< ContainerLinkTag >::bind(), buildingCount(), eve::rts::RTSStateSnapshot::buildings, eve::Conflict, eve::rts::Match::Participants::Entry::eliminated, eve::Diagnostic::error(), eve::rts::Match::Participants::Entry::faction, factionCount(), eve::rts::RTSStateSnapshot::factions, eve::Result< T >::failure(), findBuilding(), findFaction(), findMatch(), findResourceNode(), findUnit(), found, group, groups, handle, index, matchCount(), eve::rts::RTSStateSnapshot::matches, node, eve::rts::RTSProjectileSystemSnapshot::payloads, playerCount(), eve::rts::RTSStateSnapshot::players, eve::rts::RTSStateSnapshot::projectiles, eve::rts::Match::Participants::Entry::reason, resourceNodeCount(), eve::rts::RTSStateSnapshot::resourceNodes, eve::rts::AttributeComponent::restore(), eve::rts::RTSEffectAdapter::restore(), eve::rts::RTSProjectileSystem::restore(), eve::rts::ProductionComponent::restore(), eve::rts::RTSUnitAttributeAdapter::restore(), eve::rts::OrderComponent::restoreState(), eve::rts::RTSProjectileSystemSnapshot::runtime, eve::weapon::ProjectileRuntimeSnapshot::slots, eve::rts::RTSUnitAttributeAdapter::snapshot(), source, subject, eve::Status::success(), eve::Result< T >::success(), eve::rts::Match::Participants::Entry::surrendered, tag, target, eve::rts::Match::Participants::Entry::team, unit, unitCount(), eve::rts::RTSStateSnapshot::units, valid, value, eve::rts::TagSet::values() , 以及 eve::rts::RTSStateSnapshot::version.

被这些函数引用 rebuildState().

◆ scriptCellExplored()

Result< bool > eve::rts::RTS::scriptCellExplored ( Faction &  faction,
int  x,
int  y 
) const

Query canonical script-profile explored memory for one faction cell.

在文件 RTS.cpp 第 3396 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ scriptCellVisible()

Result< bool > eve::rts::RTS::scriptCellVisible ( Faction &  faction,
int  x,
int  y 
) const

Query canonical script-profile fog visibility for one faction cell.

在文件 RTS.cpp 第 3381 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ scriptContact()

Result< Value > eve::rts::RTS::scriptContact ( Faction &  faction,
SubjectRef  target 
) const

Project one faction's visible, radar, or last-known stable contact.

在文件 RTS.cpp 第 3411 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::LogicalId::isValid(), eve::NotFound, eve::Status::success(), eve::Result< T >::success() , 以及 target.

◆ scriptResource()

Result< std::int64_t > eve::rts::RTS::scriptResource ( Faction &  faction,
std::string_view  resource 
) const

Read one faction balance from the script-profile canonical economy ledger.

在文件 RTS.cpp 第 2259 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, resource, eve::StaleHandle , 以及 eve::Result< T >::success().

◆ scriptTerrainElevation()

Result< float > eve::rts::RTS::scriptTerrainElevation ( int  x,
int  y 
) const

Read one authoritative script-profile terrain elevation.

在文件 RTS.cpp 第 2228 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ scriptTick()

std::uint64_t eve::rts::RTS::scriptTick ( ) const
noexcept

Return the most recently completed script simulation tick, or zero before stepping.

在文件 RTS.cpp 第 3196 行定义.

◆ sellScriptBuilding()

◆ setAIProductionRequest()

void eve::rts::RTS::setAIProductionRequest ( AIProductionRequest  request)
inline

Install the authoritative production boundary used by enabled faction AI policies.

在文件 RTS.h 第 337 行定义.

引用了 request.

◆ setAmmoProductionPurchase()

void eve::rts::RTS::setAmmoProductionPurchase ( AmmoProductionPurchase  purchase)
inline

Install the authoritative economy purchase boundary used by building ammunition production.

在文件 RTS.h 第 343 行定义.

◆ setBuildingRally()

Result< void > eve::rts::RTS::setBuildingRally ( Building &  producer,
CommandSpec  command,
bool  groupedReinforcements = false 
) const

Set the command copied to completed production, optionally creating a reinforcement group.

在文件 RTS.cpp 第 2794 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::rts::CommandSpec::kind, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success(), valid , 以及 eve::rts::CommandSpec::validate().

◆ setCombatHeightQuery()

void eve::rts::RTS::setCombatHeightQuery ( CombatHeightQuery  query)
inline

Install the map/game-owned absolute projectile launch-height query.

在文件 RTS.h 第 331 行定义.

◆ setCombatProviders()

void eve::rts::RTS::setCombatProviders ( sensing::SensingWorld *  sensing,
combat::DamageRuntime *  damage 
)
noexcept

Attach canonical sensing and damage coordinators used by automatic combat.

在文件 RTS.cpp 第 312 行定义.

被这些函数引用 ~RTS().

◆ setCrowdProvider()

void eve::rts::RTS::setCrowdProvider ( crowd::Crowd *  crowd)
noexcept

Attach the canonical Crowd provider used by Units with a bound Unit::Crowd link.

在文件 RTS.cpp 第 330 行定义.

引用了 handle , 以及 unit.

被这些函数引用 ~RTS().

◆ setDefinitionRegistry()

void eve::rts::RTS::setDefinitionRegistry ( definitions::DefinitionRegistry *  registry)
inlinenoexcept

Attach the canonical definition registry used to settle completed research.

在文件 RTS.h 第 306 行定义.

被这些函数引用 restoreScriptCheckpoint().

◆ setFireLineQuery()

void eve::rts::RTS::setFireLineQuery ( FireLineQuery  query)
inline

Install the map/game-owned line-of-fire query used by direct weapons.

在文件 RTS.h 第 329 行定义.

◆ setFogProvider()

void eve::rts::RTS::setFogProvider ( FogProvider  provider)
noexcept

Install the faction-to-canonical-FOV resolver used by fog-of-war projection.

在文件 RTS.cpp 第 305 行定义.

引用了 eve::rts::FogOfWarSystem::clear() , 以及 handle.

◆ setMatchResourceQuery()

void eve::rts::RTS::setMatchResourceQuery ( MatchResourceQuery  query)
inline

Install the authoritative economy query used by resource-target matches.

在文件 RTS.h 第 339 行定义.

◆ setNavigationProvider()

void eve::rts::RTS::setNavigationProvider ( map::Pathfinder *  pathfinder,
NavigationGrid  grid = {},
NavigationEvent  unreachable = {} 
)
noexcept

Attach the canonical map pathfinder and world/grid conversion used by unit navigation.

在文件 RTSTraffic.cpp 第 237 行定义.

引用了 handle , 以及 unit.

◆ setPassiveIncomeCredit()

void eve::rts::RTS::setPassiveIncomeCredit ( PassiveIncomeCredit  credit)
inline

Install the authoritative economy credit boundary used by powered passive income.

在文件 RTS.h 第 341 行定义.

◆ setProductionResourceReserve()

Result< void > eve::rts::RTS::setProductionResourceReserve ( Faction &  faction,
std::string  resource,
std::int64_t  amount,
int  minimumPriority 
)

Configure or clear a faction-wide production resource floor shared by all factories.

在文件 RTS.cpp 第 1645 行定义.

引用了 eve::Applied, eve::resource::ResourceCost::create(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, resource, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success() , 以及 valid.

◆ setProductionSpawn()

void eve::rts::RTS::setProductionSpawn ( ProductionSpawn  spawn)
inline

Install the game-owned factory that materializes completed canonical unit production tasks.

在文件 RTS.h 第 347 行定义.

◆ setProductionSpawnPosition()

void eve::rts::RTS::setProductionSpawnPosition ( ProductionSpawnPosition  position)
inline

Install the game/map-owned deterministic building-exit placement probe.

在文件 RTS.h 第 349 行定义.

引用了 position.

◆ setProjectileCollisionQuery()

void eve::rts::RTS::setProjectileCollisionQuery ( ProjectileCollisionQuery  query)
inline

Install the map/physics-owned swept collision query for in-flight projectiles.

在文件 RTS.h 第 333 行定义.

◆ setReinforcementAutoCancel()

Result< void > eve::rts::RTS::setReinforcementAutoCancel ( Building &  producer,
float  seconds 
) const

Configure delayed cancellation/refund while a reinforcement group remains capped.

在文件 RTS.cpp 第 2943 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), group, handle, eve::InvalidArgument, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setReinforcementCancel()

void eve::rts::RTS::setReinforcementCancel ( ReinforcementCancel  cancel)
inline

Install the game-owned atomic cancellation/refund boundary for capped reinforcements.

在文件 RTS.h 第 353 行定义.

◆ setReinforcementFallback()

Result< void > eve::rts::RTS::setReinforcementFallback ( Building &  producer,
std::string  preferred,
std::string  fallback 
) const

Set or clear one acyclic preferred-to-substitute mapping across a linked group.

在文件 RTS.cpp 第 2907 行定义.

引用了 eve::Applied, eve::Conflict, current, eve::Diagnostic::error(), eve::Result< T >::failure(), group, handle, eve::InvalidArgument, start, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setReinforcementLimit()

Result< void > eve::rts::RTS::setReinforcementLimit ( Building &  producer,
std::size_t  maximum 
) const

Set the maximum living size of a linked reinforcement group; zero removes the cap.

在文件 RTS.cpp 第 2843 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), group, handle, maximum, eve::PreconditionViolation, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setReinforcementTransport()

Result< void > eve::rts::RTS::setReinforcementTransport ( Building &  producer,
Unit *  transport,
std::size_t  minimumLoad = 0 
) const

Route reinforcements through an exclusive friendly transport, or clear with null.

在文件 RTS.cpp 第 2962 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), handle, eve::InvalidArgument, eve::PreconditionViolation, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setReinforcementTypeLimit()

Result< void > eve::rts::RTS::setReinforcementTypeLimit ( Building &  producer,
std::string  unitType,
std::size_t  maximum 
) const

Set or clear one unit type's living cap across a linked reinforcement group.

在文件 RTS.cpp 第 2862 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), group, handle, eve::InvalidArgument, maximum, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setReinforcementTypePriority()

Result< void > eve::rts::RTS::setReinforcementTypePriority ( Building &  producer,
std::string  unitType,
int  priority 
) const

Set or clear one unit type's contention priority across a linked reinforcement group.

在文件 RTS.cpp 第 2885 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), group, handle, eve::InvalidArgument, priority, eve::Status::success() , 以及 eve::Result< T >::success().

◆ setRepairDebit()

void eve::rts::RTS::setRepairDebit ( RepairDebit  debit)
inline

Install the game-owned economy debit boundary used by building repair.

在文件 RTS.h 第 311 行定义.

◆ setResourceCredit()

void eve::rts::RTS::setResourceCredit ( ResourceCredit  credit)
inline

Install the game-owned economy credit boundary used by mining deliveries.

在文件 RTS.h 第 309 行定义.

◆ setScriptNavigationBlocked()

Result< void > eve::rts::RTS::setScriptNavigationBlocked ( int  x,
int  y,
bool  blocked 
)

Change one cell in the script profile's canonical pathfinder and crowd field.

在文件 RTS.cpp 第 2149 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, key, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ setScriptNavigationCost()

Result< void > eve::rts::RTS::setScriptNavigationCost ( int  x,
int  y,
float  cost 
)

Change one positive cell traversal cost in the script profile's canonical providers.

在文件 RTS.cpp 第 2198 行定义.

引用了 eve::Applied, eve::Conflict, cost, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ setScriptTerrainElevation()

Result< void > eve::rts::RTS::setScriptTerrainElevation ( int  x,
int  y,
float  elevation 
)

Set one finite authoritative terrain elevation shared by fog and combat queries.

在文件 RTS.cpp 第 2212 行定义.

引用了 eve::Applied, eve::Conflict, elevation, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), x , 以及 y.

◆ setUnitAttribute()

Result< void > eve::rts::RTS::setUnitAttribute ( Unit &  unit,
std::string_view  attribute,
double  value 
) const

Set a canonical selected combat attribute through the RTS facade.

在文件 RTS.cpp 第 1534 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::StaleHandle, unit , 以及 value.

◆ setUnitAutoResupply()

Result< void > eve::rts::RTS::setUnitAutoResupply ( Unit &  unit,
bool  enabled 
) const

Enable or disable automatic supply dispatch and cancel an active supply mission when disabled.

在文件 RTS.cpp 第 1132 行定义.

引用了 eve::Applied, eve::Conflict, current, enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::StaleHandle, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ setUnitCloaked()

Result< void > eve::rts::RTS::setUnitCloaked ( Unit &  unit,
bool  cloaked 
) const

Change the cloak projection of a live module-owned unit.

在文件 RTS.cpp 第 3167 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ setUnitMovementPriority()

Result< void > eve::rts::RTS::setUnitMovementPriority ( std::span< const SubjectRef >  subjects,
int  priority 
) const

Set collision/traffic contention priority for module-owned units atomically.

在文件 RTS.cpp 第 937 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::NotFound, priority, eve::Status::success(), eve::Result< T >::success(), unit , 以及 units.

◆ setUnitStance()

Result< void > eve::rts::RTS::setUnitStance ( std::span< const SubjectRef >  subjects,
CombatStance  stance,
float  leashRange 
) const

Set automatic combat stance and pursuit leash for module-owned units atomically.

在文件 RTS.cpp 第 908 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::NotFound, unit , 以及 units.

◆ setWorkerAutoAssignment()

Result< void > eve::rts::RTS::setWorkerAutoAssignment ( std::span< const SubjectRef >  subjects,
bool  enabled 
) const

Enable or disable deterministic idle-worker assignment for module-owned units atomically.

在文件 RTS.cpp 第 1007 行定义.

引用了 eve::Applied, eve::Conflict, enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::NotFound, eve::Status::success(), eve::Result< T >::success() , 以及 unit.

◆ snapshotState()

◆ startMatch()

Result< void > eve::rts::RTS::startMatch ( Match &  match) const

Start one owned match after participant/rule validation.

在文件 RTS.cpp 第 840 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::rts::MatchSystem::start().

◆ startScriptConstruction()

◆ stateHash()

Result< ContentId > eve::rts::RTS::stateHash ( const SnapshotHashProvider &  hashProvider) const

Hash the deterministic synchronization projection through the engine snapshot boundary.

在文件 RTSSnapshot.cpp 第 830 行定义.

◆ step()

Result< std::size_t > eve::rts::RTS::step ( const SimulationStep &  step,
IRTSActionExecutor &  executor 
)

Run phase-one simulation systems in deterministic order.

参数
stepInjected simulation tick and duration.
executorBorrowed adapter over the shared ActionRuntime.
返回
Number of processed records across the systems.

在文件 RTS.cpp 第 1674 行定义.

引用了 actions, eve::Applied, eve::Result< T >::failure(), handle, request, status, eve::Status::success(), eve::Result< T >::success(), eve::SimulationStep::tick, tick , 以及 unit.

◆ stepScript()

Result< std::size_t > eve::rts::RTS::stepScript ( double  seconds)

Advance one script-owned fixed step through the canonical ActionRuntime adapter.

参数
secondsPositive deterministic step duration in seconds.
返回
Number of processed records across the composed systems.
备注
Native games should prefer step(SimulationStep, IRTSActionExecutor&) and inject their shared runtime. This convenience boundary exists for self-contained Squirrel examples.

在文件 RTS.cpp 第 1876 行定义.

引用了 eve::Applied, commands, eve::Conflict, duration, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Duration::fromSeconds(), eve::InvalidArgument, step, eve::Status::success(), eve::Result< T >::success() , 以及 tick.

◆ submitGameplay()

◆ submitMovementGroup()

Result< FanOutReceipt > eve::rts::RTS::submitMovementGroup ( const MovementGroupBatch &  batch)

Commit a caller-built immediate Move group with coordinated pacing.

参数
batchOwned input borrowed only for this call; requires at least two distinct live units.
返回
Per-unit order ids, or validation failure before command mutation.
备注
Owner-thread only, non-reentrant, no callbacks. Membership ends on replacement, completion, death or containment. Selection changes do not change the movement group. @cost Quadratic slot assignment per submitted batch; amortize once per group command.

在文件 RTSMovementGroups.cpp 第 32 行定义.

引用了 eve::Result< T >::failure(), eve::rts::CommandFanOutSystem::fanOut(), findUnit(), eve::rts::MovementGroupBatch::formation, group, eve::rts::CommandSpec::kind, eve::rts::MovementGroupBatch::leadDistance, eve::rts::Move, eve::rts::MovementGroup, status, subject, eve::rts::MovementGroupBatch::target, eve::rts::CommandSpec::target, unit , 以及 eve::rts::MovementGroupBatch::units.

被这些函数引用 eve::rts::script_internal::exposeFormationBindings().

◆ suppressArea()

Result< FanOutReceipt > eve::rts::RTS::suppressArea ( std::span< const SubjectRef >  subjects,
WorldPosition  start,
WorldPosition  end,
float  width = 1.0f,
int  shotsPerUnit = 0 
) const

◆ surrenderMatch()

Result< void > eve::rts::RTS::surrenderMatch ( Match &  match,
Faction &  faction 
) const

Surrender one owned faction from one owned running match.

在文件 RTS.cpp 第 847 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), findFaction(), eve::InvalidArgument , 以及 eve::rts::MatchSystem::surrender().

◆ unitCount()

std::size_t eve::rts::RTS::unitCount ( ) const
noexcept

Return the number of live Unit roots owned by this module.

在文件 RTS.cpp 第 3618 行定义.

被这些函数引用 rebuildState() , 以及 restoreState().

◆ unloadTransport()

Result< std::size_t > eve::rts::RTS::unloadTransport ( Unit &  transport,
WorldPosition  destination 
) const

Unload every passenger from a module-owned transport around a deterministic destination.

在文件 RTS.cpp 第 3153 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::InvalidArgument.


该类的文档由以下文件生成: