载入中...
搜索中...
未找到
RTSSystems.h
浏览该文件的文档.
179 [[nodiscard]] static Result<std::vector<WorldPosition>> plan(std::size_t count, WorldPosition anchor,
226 [[nodiscard]] static Result<FanOutReceipt> fanOut(std::span<const ecs::EntityHandle> unitHandles,
289 [[nodiscard]] static Result<std::size_t> stepSharedFlow(map::Pathfinder& pathfinder, const NavigationGrid& grid,
293 [[nodiscard]] static Result<std::size_t> stepInternal(map::Pathfinder& pathfinder, const NavigationGrid& grid,
298 [[nodiscard]] static Result<std::size_t> step(map::Pathfinder& pathfinder, const NavigationGrid& grid,
342 ecs::EntityHandle faction{};
350 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const NavigationGrid& grid,
369 [[nodiscard]] static Result<std::size_t> stepSharedFlow(const SimulationStep& step, crowd::Crowd& crowd,
373 [[nodiscard]] static Result<std::size_t> stepInternal(const SimulationStep& step, crowd::Crowd& crowd,
389using ResourceCredit = std::function<Result<resource::Receipt>(Unit&, const resource::CostSpec&)>;
395 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const ResourceCredit& credit);
414using RepairDebit = std::function<Result<resource::Receipt>(Unit&, Building&, const resource::CostSpec&)>;
420 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, combat::DamageRuntime& settlement,
433using PassiveIncomeCredit = std::function<Result<resource::Receipt>(Building&, const resource::CostSpec&)>;
451 [[nodiscard]] static Result<std::size_t> evacuate(Building& building, WorldPosition destination);
523using AbilityResourceDebit = std::function<Result<resource::Receipt>(Unit&, const resource::CostSpec&)>;
536 [[nodiscard]] static Result<void> validateCast(Unit& caster, const AbilitySpec& spec, ecs::EntityHandle target,
591 [[nodiscard]] static Result<std::size_t> request(Unit& requester, WorldPosition center, float radius,
630 WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity)>;
698class EVENGINE_API_DOMAINS RTSProjectileSystem final : public weapon::IProjectileTargetProvider {
701 [[nodiscard]] Result<void> launch(SubjectRef source, ecs::EntityHandle faction, WorldPosition origin,
707 [[nodiscard]] Result<std::size_t> step(const SimulationStep& step, combat::DamageRuntime& damage,
711 [[nodiscard]] Result<weapon::ProjectilePoint> position(ecs::EntityHandle target) const override;
753 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, IRTSActionExecutor& executor);
774 std::function<Result<ProductionSpawnOutcome>(Building&, const production::ProductionTask&, WorldPosition)>;
777 std::function<Result<std::optional<WorldPosition>>(Building&, const production::ProductionTask&)>;
783 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const ProductionSpawn& spawn = {},
822 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, combat::DamageRuntime& settlement,
Deterministic pooled projectile simulation.
RTS adapter boundary over the shared action lifecycle.
Strongly typed, transaction-friendly resource cost protocol.
Human-readable, scoped identifier in the form namespace:name.
Definition Identity.h:414
Dynamic field-of-view / fog-of-war facade. Phase A: 2D shadowcast + multi-revealer + explored memory....
Definition Fov.h:27
Pathfinding facade. Single-agent: A*. Group (same goal): Flow Field + follow. Grid/topology internals...
Definition Pathfinder.h:62
Runs deterministic faction production and attack policy.
Definition RTSSystems.h:615
Validates, schedules and settles active RTS abilities through canonical damage/effect owners.
Definition RTSSystems.h:526
Selects reachable shoot-and-scoot positions without taking ownership of map navigation.
Definition RTSSystems.h:571
Composes RTS powered build influence with the canonical building placement authority.
Definition RTSSystems.h:187
RTS building domain root with placement and production composition.
Definition RTSTypes.h:852
Resolves deterministic single-faction and contested building capture.
Definition RTSSystems.h:425
Validates a typed selection and fans one command out in formation order.
Definition RTSSystems.h:216
Builds deterministic faction command networks with relay capacity and hostile jamming.
Definition RTSSystems.h:516
Applies immediate Stop and persistent Hold/AttackMove command state.
Definition RTSSystems.h:249
Advances construction using valid builders that reached their assigned site.
Definition RTSSystems.h:399
Resolves transport boarding, building garrisoning, and contained-unit synchronization.
Definition RTSSystems.h:444
Synchronizes linked RTS units through the canonical Crowd simulation.
Definition RTSSystems.h:366
Advances lifecycle-only effects on Units and Buildings.
Definition RTSSystems.h:819
Reads authoritative faction contact projections for command authorization.
Definition RTSSystems.h:152
Resolves same-faction and match-team alliances without duplicating diplomacy state.
Definition RTSSystems.h:143
Faction domain root; membership is a set of typed runtime handles.
Definition RTSTypes.h:1192
Assigns indirect-fire responders and automatic counter-battery ground attacks.
Definition RTSSystems.h:588
Projects RTS vision into canonical map FOV and maintains faction last-known contacts.
Definition RTSSystems.h:335
Interface isolating RTS orders from the shared action runtime.
Definition RTSAction.h:38
Allocates faction power deterministically and settles powered passive income.
Definition RTSSystems.h:436
Advances Gather/ReturnCargo orders without owning an economy balance.
Definition RTSSystems.h:392
Recovers suppression and applies nearby friendly morale auras.
Definition RTSSystems.h:500
Moves units toward their active generic order targets.
Definition RTSSystems.h:231
Settles arrived finite movement orders so the canonical queue can advance.
Definition RTSSystems.h:242
Sends active generic orders to one shared action executor.
Definition RTSSystems.h:745
Maintains persistent two-point patrol state without owning pathfinding.
Definition RTSSystems.h:303
RTS impact adapter over the canonical pooled weapon projectile trajectory runtime.
Definition RTSSystems.h:698
std::size_t activeCount() const noexcept
Return live canonical projectile count.
Definition RTSSystems.h:713
EVENGINE_API_DOMAINS public API.
Definition RTSSystems.h:801
Dispatches and unloads production reinforcements assigned to canonical unit containers.
Definition RTSSystems.h:812
Repairs friendly completed buildings without owning an economy balance.
Definition RTSSystems.h:417
Regenerates unit and building shield projections after their configured damage delay.
Definition RTSSystems.h:508
Derives stable multi-vehicle supply convoys and paces their leader.
Definition RTSSystems.h:493
Selects a low-threat supply rendezvous while delegating reachability to the canonical map.
Definition RTSSystems.h:484
Updates escort guards and deterministic combat-group target commitments.
Definition RTSSystems.h:600
Arbitrates deterministic directional entry into connected narrow map corridors.
Definition RTSSystems.h:310
Applies one hostile kill's experience to canonical unit veterancy state.
Definition RTSSystems.h:131
static Result< int > award(Unit &unit, float experience)
Award experience and apply every newly crossed rank modifier atomically.
Definition RTSSystems_Faction.cpp:9
Deterministically assigns idle auto-workers to compatible resource nodes.
Definition RTSSystems.h:382
Assigns idle faction workers to incomplete or damaged buildings by deterministic distance.
Definition RTSSystems.h:407
Mirrored world positions and query composition; consumers decide gameplay actions from results.
Definition Sensing.h:197
Optional target-position boundary used only by homing projectiles.
Definition ProjectileRuntime.h:102
Definition Crowd.cpp:14
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
Definition ArchSpaceTileMapProjector.h:10
Definition RTS.cpp:30
std::function< Result< resource::Receipt >(Unit &, const resource::CostSpec &)> AbilityResourceDebit
Debits an ability resource cost through the game-owned canonical economy boundary.
Definition RTSSystems.h:523
DamageChannel
Authoritative damage route that produced one transient RTS frame event.
Definition RTSSystems.h:68
@ Weapon
@ Projectile
std::function< map::Fov *(Faction &)> FogProvider
Resolves the canonical FOV instance used by a faction; allies may deliberately share one instance.
Definition RTSSystems.h:332
std::span< const SystemContract > systemContracts() noexcept
Return the phase-one RTS ECS contracts for tooling and review.
Definition RTSSystems.cpp:125
std::function< Result< resource::Receipt >(Building &, const resource::CostSpec &)> PassiveIncomeCredit
Credits passive building income through the game-owned canonical economy boundary.
Definition RTSSystems.h:433
std::function< void(const LifecycleEvent &, SimulationTick)> LifecycleEventSink
Read-only observer invoked after a non-combat lifecycle transition commits.
Definition RTSSystems.h:128
std::function< Result< std::string >(Building &, std::string_view)> ReinforcementEnqueue
Game-owned transactional enqueue boundary used while resolving reinforcement fallbacks.
Definition RTSSystems.h:791
std::function< Result< resource::Receipt >(Unit &, const resource::CostSpec &)> ResourceCredit
Callback that credits gathered resources to the authoritative account selected by the game.
Definition RTSSystems.h:389
std::function< void(const CombatFireEvent &, SimulationTick)> CombatFireEventSink
Read-only observer invoked after a weapon consumes one authoritative shot.
Definition RTSSystems.h:92
std::function< Result< void >(WorldPosition, LogicalId)> PlacementValidation
Caller-owned canonical terrain/occupancy validation used after RTS influence checks.
Definition RTSSystems.h:184
std::function< Result< ProductionSpawnOutcome >(Building &, const production::ProductionTask &, WorldPosition)> ProductionSpawn
Game-owned factory receiving the requested production exit position. The factory owns final placement...
Definition RTSSystems.h:774
@ Column
@ Dispersed
CombatFireEventKind
Transient weapon lifecycle event emitted after an authoritative firing attempt commits.
Definition RTSSystems.h:75
@ FireBlocked
@ WeaponFired
@ ReloadCompleted
@ ReloadStarted
@ ShotMissed
@ ProjectileFired
@ WeaponDry
std::function< Result< std::optional< WorldPosition > >(Building &, const production::ProductionTask &)> ProductionSpawnPosition
Game/map-owned deterministic exit probe; empty means every valid exit is currently occupied.
Definition RTSSystems.h:777
LifecycleEventKind
Non-combat RTS state transition exposed to presentation without entering authoritative state.
Definition RTSSystems.h:95
@ BuildingCaptured
@ AbilityChannelCompleted
@ AbilityChannelTick
@ SupplyDispatched
@ StatusExpired
@ AbilityInterrupted
@ ProductionSpawnCleared
@ ProductionSpawnBlocked
@ AmmoResupplied
@ UnitProduced
@ SuppressionRecovered
@ ShieldRecharged
@ StatusApplied
@ ConstructionCompleted
@ SupplyReturned
@ SupplyRelayDispatched
@ AbilityChannelStarted
@ SupplyRelayTransferred
@ AmmoProduced
@ AbilityChannelCancelled
@ SupplyReturning
@ AbilityCast
std::function< Result< std::optional< ProjectileCollision > >(WorldPosition from, float fromHeight, WorldPosition to, float toHeight, SubjectRef source, ecs::EntityHandle intendedTarget)> ProjectileCollisionQuery
Map/physics-owned swept collision query; empty means the segment remained clear.
Definition RTSSystems.h:665
std::function< void(const combat::DamageRequest &request, const combat::DamageOutcome &outcome, SimulationTick tick, DamageChannel channel)> DamageEventSink
Read-only observer invoked after canonical damage has committed.
Definition RTSSystems.h:72
std::function< void(Unit &, const OrderRecord &)> NavigationEvent
Notification emitted once when a newly planned order has no canonical map route.
Definition RTSSystems.h:282
std::function< Result< void >(Faction &, Building &, const LogicalId &)> AIProductionRequest
Authoritative production boundary invoked by AI policy decisions.
Definition RTSSystems.h:612
std::function< Result< bool >(WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity, const weapon::WeaponDefinition &weapon)> FireLineQuery
Uses canonical sensing, weapon and damage providers for RTS automatic fire.
Definition RTSSystems.h:625
std::function< CombatHeightProfile(WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity)> CombatHeightQuery
Resolve absolute heights for one authorized projectile launch.
Definition RTSSystems.h:630
std::function< Result< resource::Receipt >(Unit &, Building &, const resource::CostSpec &)> RepairDebit
Callback that debits repair costs from the authoritative account selected by the game.
Definition RTSSystems.h:414
std::function< Result< std::size_t >(Building &, std::string_view, std::int64_t, std::size_t)> AmmoProductionPurchase
Assigns and transfers tactical ammunition through canonical WeaponEntity resource state.
Definition RTSSystems.h:456
std::function< Result< void >(Building &, std::string_view)> ReinforcementCancel
Pauses canonical production tasks when a shared rally combat group reaches reinforcement limits.
Definition RTSSystems.h:789
std::function< ecs::Entity *(SubjectRef)> ProjectileSubjectResolver
Resolve one stable RTS subject while restoring projectile relationships.
Definition RTSSystems.h:695
ProductionSpawnState
Whether a completed production task published a unit or is waiting for space.
Definition RTSSystems.h:757
Definition RTSSystems.h:258
Complete owning audit result of one committed damage transaction.
Definition Damage.h:103
A subject-agnostic continuous task retained for audit and save games.
Definition Production.h:158
Typed ability policy; lifecycle effects remain owned by the canonical effect container.
Definition RTSTypes.h:138
Deterministic, canonical-map-validated artillery relocation choice.
Definition RTSSystems.h:561
bool avoidedDepartedPosition
Definition RTSSystems.h:567
Stable presentation payload for firing, launch, and miss feedback.
Definition RTSSystems.h:85
Adapter-owned keys previously mirrored into a shared sensing world.
Definition RTSSystems.h:636
std::set< std::string > mirroredSubjects
Definition RTSSystems.h:637
std::set< std::string > blockedSubjects
Definition RTSSystems.h:638
Absolute muzzle and target heights resolved by the authoritative map/game adapter.
Definition RTSSystems.h:627
One domain-neutral command submitted to a unit's generic order queue.
Definition RTSTypes.h:106
Receipt containing all order ids accepted by command fan-out.
Definition RTSSystems.h:203
Runtime-only revealer bindings; authoritative explored cells remain owned by map::Fov.
Definition RTSSystems.h:338
EVENGINE_API_DOMAINS Result< void > validate() const
Validate layout kind, spacing, grid columns and finite rotation.
Definition RTSFormation.cpp:12
float rotationRadians
Counterclockwise rotation around the anchor; zero preserves legacy layouts.
Definition RTSSystems.h:38
Stable payload for one committed RTS lifecycle transition.
Definition RTSSystems.h:120
Caller-built admission batch for an immediate coordinated Move or AttackMove command....
Definition RTSSystems.h:48
float leadDistance
Positive world-space allowance before leaders slow for lagging members.
Definition RTSSystems.h:52
OrderKind kind
Supported coordinated order; other kinds reject before mutation.
Definition RTSSystems.h:53
std::vector< SubjectRef > units
Owned stable identities; no entity pointers are retained.
Definition RTSSystems.h:49
Owning projection of the active generic order used by RTS systems.
Definition RTSTypes.h:122
Factory outcome; blocked tasks retain their payment and reserved identity.
Definition RTSSystems.h:760
Unit * unit
Borrowed game-owned unit; non-null only for Created, valid until ECS destruction.
Definition RTSSystems.h:763
Earliest canonical collision found along one projectile sweep segment.
Definition RTSSystems.h:657
Stable RTS damage payload paired with one shared projectile-pool handle.
Definition RTSSystems.h:668
bool blockedByObstacles
Definition RTSSystems.h:683
std::vector< std::string > requiredTargetTags
Definition RTSSystems.h:684
std::vector< std::string > excludedTargetTags
Definition RTSSystems.h:685
WorldPosition targetPoint
Definition RTSSystems.h:674
float splashMinimumDamageFactor
Definition RTSSystems.h:679
Complete in-flight RTS projectile state with stable gameplay relationships.
Definition RTSSystems.h:689
std::vector< RTSProjectilePayloadSnapshot > payloads
Definition RTSSystems.h:691
weapon::ProjectileRuntimeSnapshot runtime
Definition RTSSystems.h:690
Result of resolving a preferred reinforcement through a deterministic substitution chain.
Definition RTSSystems.h:794
std::string queuedProduct
Definition RTSSystems.h:796
std::string requestedProduct
Definition RTSSystems.h:795
A safe map-reachable rendezvous selected around a predicted moving relay intercept.
Definition RTSSystems.h:477
Static metadata for one ECS system's access and phase contract.
Definition RTSSystems.h:57
Caller-built atomic exact-placement request; Crowd-linked units must already be projected.
Definition RTSSystems.h:276
Explicit world-space placement for one RTS-owned unit identity.
Definition RTSSystems.h:271
Complete deterministic projectile-pool state for rollback and save games.
Definition ProjectileRuntime.h:97