载入中...
搜索中...
未找到
RTSSystems.h
浏览该文件的文档.
178 [[nodiscard]] static Result<std::vector<WorldPosition>> plan(std::size_t count, WorldPosition anchor,
225 [[nodiscard]] static Result<FanOutReceipt> fanOut(std::span<const ecs::EntityHandle> unitHandles,
276 [[nodiscard]] static Result<std::size_t> step(map::Pathfinder& pathfinder, const NavigationGrid& grid,
320 ecs::EntityHandle faction{};
328 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const NavigationGrid& grid,
358using ResourceCredit = std::function<Result<resource::Receipt>(Unit&, const resource::CostSpec&)>;
364 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const ResourceCredit& credit);
383using RepairDebit = std::function<Result<resource::Receipt>(Unit&, Building&, const resource::CostSpec&)>;
389 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, combat::DamageRuntime& settlement,
402using PassiveIncomeCredit = std::function<Result<resource::Receipt>(Building&, const resource::CostSpec&)>;
420 [[nodiscard]] static Result<std::size_t> evacuate(Building& building, WorldPosition destination);
492using AbilityResourceDebit = std::function<Result<resource::Receipt>(Unit&, const resource::CostSpec&)>;
550 [[nodiscard]] static Result<std::size_t> request(Unit& requester, WorldPosition center, float radius,
589 WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity)>;
653class EVENGINE_API_DOMAINS RTSProjectileSystem final : public weapon::IProjectileTargetProvider {
656 [[nodiscard]] Result<void> launch(SubjectRef source, ecs::EntityHandle faction, WorldPosition origin,
662 [[nodiscard]] Result<std::size_t> step(const SimulationStep& step, combat::DamageRuntime& damage,
666 [[nodiscard]] Result<weapon::ProjectilePoint> position(ecs::EntityHandle target) const override;
708 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, IRTSActionExecutor& executor);
729 std::function<Result<ProductionSpawnOutcome>(Building&, const production::ProductionTask&, WorldPosition)>;
732 std::function<Result<std::optional<WorldPosition>>(Building&, const production::ProductionTask&)>;
738 [[nodiscard]] static Result<std::size_t> step(const SimulationStep& step, const ProductionSpawn& spawn = {},
777 [[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:411
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:20
Runs deterministic faction production and attack policy.
Definition RTSSystems.h:574
Validates, schedules and settles active RTS abilities through canonical damage/effect owners.
Definition RTSSystems.h:495
Selects reachable shoot-and-scoot positions without taking ownership of map navigation.
Definition RTSSystems.h:530
Composes RTS powered build influence with the canonical building placement authority.
Definition RTSSystems.h:186
RTS building domain root with placement and production composition.
Definition RTSTypes.h:840
Resolves deterministic single-faction and contested building capture.
Definition RTSSystems.h:394
Validates a typed selection and fans one command out in formation order.
Definition RTSSystems.h:215
Builds deterministic faction command networks with relay capacity and hostile jamming.
Definition RTSSystems.h:485
Applies immediate Stop and persistent Hold/AttackMove command state.
Definition RTSSystems.h:248
Advances construction using valid builders that reached their assigned site.
Definition RTSSystems.h:368
Resolves transport boarding, building garrisoning, and contained-unit synchronization.
Definition RTSSystems.h:413
Synchronizes linked RTS units through the canonical Crowd simulation.
Definition RTSSystems.h:344
Advances lifecycle-only effects on Units and Buildings.
Definition RTSSystems.h:774
Reads authoritative faction contact projections for command authorization.
Definition RTSSystems.h:151
Resolves same-faction and match-team alliances without duplicating diplomacy state.
Definition RTSSystems.h:142
Faction domain root; membership is a set of typed runtime handles.
Definition RTSTypes.h:1178
Assigns indirect-fire responders and automatic counter-battery ground attacks.
Definition RTSSystems.h:547
Projects RTS vision into canonical map FOV and maintains faction last-known contacts.
Definition RTSSystems.h:313
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:405
Advances Gather/ReturnCargo orders without owning an economy balance.
Definition RTSSystems.h:361
Recovers suppression and applies nearby friendly morale auras.
Definition RTSSystems.h:469
Moves units toward their active generic order targets.
Definition RTSSystems.h:230
Settles arrived finite movement orders so the canonical queue can advance.
Definition RTSSystems.h:241
Sends active generic orders to one shared action executor.
Definition RTSSystems.h:700
Maintains persistent two-point patrol state without owning pathfinding.
Definition RTSSystems.h:281
RTS impact adapter over the canonical pooled weapon projectile trajectory runtime.
Definition RTSSystems.h:653
std::size_t activeCount() const noexcept
Return live canonical projectile count.
Definition RTSSystems.h:668
EVENGINE_API_DOMAINS public API.
Definition RTSSystems.h:756
Dispatches and unloads production reinforcements assigned to canonical unit containers.
Definition RTSSystems.h:767
Repairs friendly completed buildings without owning an economy balance.
Definition RTSSystems.h:386
Regenerates unit and building shield projections after their configured damage delay.
Definition RTSSystems.h:477
Derives stable multi-vehicle supply convoys and paces their leader.
Definition RTSSystems.h:462
Selects a low-threat supply rendezvous while delegating reachability to the canonical map.
Definition RTSSystems.h:453
Updates escort guards and deterministic combat-group target commitments.
Definition RTSSystems.h:559
Arbitrates deterministic directional entry into connected narrow map corridors.
Definition RTSSystems.h:288
Applies one hostile kill's experience to canonical unit veterancy state.
Definition RTSSystems.h:130
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:351
Assigns idle faction workers to incomplete or damaged buildings by deterministic distance.
Definition RTSSystems.h:376
Gameplay-facing 2D candidate query service; it never values or selects targets.
Definition Sensing.h:151
Optional target-position boundary used only by homing projectiles.
Definition ProjectileRuntime.h:102
Definition Crowd.cpp:14
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
Definition PlacementWorld.h:19
Definition RTS.cpp:24
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:492
DamageChannel
Authoritative damage route that produced one transient RTS frame event.
Definition RTSSystems.h:67
@ 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:310
std::span< const SystemContract > systemContracts() noexcept
Return the phase-one RTS ECS contracts for tooling and review.
Definition RTSSystems.cpp:160
std::function< Result< resource::Receipt >(Building &, const resource::CostSpec &)> PassiveIncomeCredit
Credits passive building income through the game-owned canonical economy boundary.
Definition RTSSystems.h:402
std::function< void(const LifecycleEvent &, SimulationTick)> LifecycleEventSink
Read-only observer invoked after a non-combat lifecycle transition commits.
Definition RTSSystems.h:127
std::function< Result< std::string >(Building &, std::string_view)> ReinforcementEnqueue
Game-owned transactional enqueue boundary used while resolving reinforcement fallbacks.
Definition RTSSystems.h:746
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:358
std::function< void(const CombatFireEvent &, SimulationTick)> CombatFireEventSink
Read-only observer invoked after a weapon consumes one authoritative shot.
Definition RTSSystems.h:91
std::function< Result< void >(WorldPosition, LogicalId)> PlacementValidation
Caller-owned canonical terrain/occupancy validation used after RTS influence checks.
Definition RTSSystems.h:183
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:729
@ Column
@ Dispersed
CombatFireEventKind
Transient weapon lifecycle event emitted after an authoritative firing attempt commits.
Definition RTSSystems.h:74
@ 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:732
LifecycleEventKind
Non-combat RTS state transition exposed to presentation without entering authoritative state.
Definition RTSSystems.h:94
@ 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:620
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:71
std::function< void(Unit &, const OrderRecord &)> NavigationEvent
Notification emitted once when a newly planned order has no canonical map route.
Definition RTSSystems.h:270
std::function< Result< void >(Faction &, Building &, const LogicalId &)> AIProductionRequest
Authoritative production boundary invoked by AI policy decisions.
Definition RTSSystems.h:571
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:584
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:589
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:383
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:425
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:744
std::function< ecs::Entity *(SubjectRef)> ProjectileSubjectResolver
Resolve one stable RTS subject while restoring projectile relationships.
Definition RTSSystems.h:650
ProductionSpawnState
Whether a completed production task published a unit or is waiting for space.
Definition RTSSystems.h:712
Definition RTSSystems.h:257
Complete owning audit result of one committed damage transaction.
Definition Damage.h:98
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:133
Deterministic, canonical-map-validated artillery relocation choice.
Definition RTSSystems.h:520
bool avoidedDepartedPosition
Definition RTSSystems.h:526
Stable presentation payload for firing, launch, and miss feedback.
Definition RTSSystems.h:84
Adapter-owned keys previously mirrored into a shared sensing world.
Definition RTSSystems.h:595
std::set< std::string > mirroredSubjects
Definition RTSSystems.h:596
std::set< std::string > blockedSubjects
Definition RTSSystems.h:597
Absolute muzzle and target heights resolved by the authoritative map/game adapter.
Definition RTSSystems.h:586
One domain-neutral command submitted to a unit's generic order queue.
Definition RTSTypes.h:101
Receipt containing all order ids accepted by command fan-out.
Definition RTSSystems.h:202
Runtime-only revealer bindings; authoritative explored cells remain owned by map::Fov.
Definition RTSSystems.h:316
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:119
Caller-built admission batch for an immediate coordinated Move command. @cost Linear in unit count; c...
Definition RTSSystems.h:48
float leadDistance
Positive world-space allowance before leaders slow for lagging members.
Definition RTSSystems.h:52
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:117
Factory outcome; blocked tasks retain their payment and reserved identity.
Definition RTSSystems.h:715
Unit * unit
Borrowed game-owned unit; non-null only for Created, valid until ECS destruction.
Definition RTSSystems.h:718
Earliest canonical collision found along one projectile sweep segment.
Definition RTSSystems.h:612
Stable RTS damage payload paired with one shared projectile-pool handle.
Definition RTSSystems.h:623
bool blockedByObstacles
Definition RTSSystems.h:638
std::vector< std::string > requiredTargetTags
Definition RTSSystems.h:639
std::vector< std::string > excludedTargetTags
Definition RTSSystems.h:640
WorldPosition targetPoint
Definition RTSSystems.h:629
float splashMinimumDamageFactor
Definition RTSSystems.h:634
Complete in-flight RTS projectile state with stable gameplay relationships.
Definition RTSSystems.h:644
std::vector< RTSProjectilePayloadSnapshot > payloads
Definition RTSSystems.h:646
weapon::ProjectileRuntimeSnapshot runtime
Definition RTSSystems.h:645
Result of resolving a preferred reinforcement through a deterministic substitution chain.
Definition RTSSystems.h:749
std::string queuedProduct
Definition RTSSystems.h:751
std::string requestedProduct
Definition RTSSystems.h:750
A safe map-reachable rendezvous selected around a predicted moving relay intercept.
Definition RTSSystems.h:446
Static metadata for one ECS system's access and phase contract.
Definition RTSSystems.h:56
Complete deterministic projectile-pool state for rollback and save games.
Definition ProjectileRuntime.h:97