载入中...
搜索中...
未找到
RTSSystems.h 文件参考

Deterministic phase-one RTS systems and their ECS contracts. 更多...

#include "common/Export.h"
#include "rts/RTSAction.h"
#include "common/ResourceAccount.h"
#include "weapon/ProjectileRuntime.h"
#include "weapon/WeaponTypes.h"
#include <cstddef>
#include <functional>
#include <map>
#include <span>
#include <set>
#include <vector>

浏览源代码.

类

struct  eve::rts::FormationSpec
 Input to the pure formation planner. 更多...
 
struct  eve::rts::MovementGroupBatch
 Caller-built admission batch for an immediate coordinated Move command. @cost Linear in unit count; callers own and pass stable identities once per command admission. 更多...
 
struct  eve::rts::SystemContract
 Static metadata for one ECS system's access and phase contract. 更多...
 
struct  eve::rts::CombatFireEvent
 Stable presentation payload for firing, launch, and miss feedback. 更多...
 
struct  eve::rts::LifecycleEvent
 Stable payload for one committed RTS lifecycle transition. 更多...
 
class  eve::rts::VeterancySystem
 Applies one hostile kill's experience to canonical unit veterancy state. 更多...
 
class  eve::rts::FactionRelationSystem
 Resolves same-faction and match-team alliances without duplicating diplomacy state. 更多...
 
class  eve::rts::FactionIntelSystem
 Reads authoritative faction contact projections for command authorization. 更多...
 
class  eve::rts::FormationPlanner
 Pure deterministic formation planner. 更多...
 
class  eve::rts::BuildInfluenceSystem
 Composes RTS powered build influence with the canonical building placement authority. 更多...
 
struct  eve::rts::FanOutReceipt
 Receipt containing all order ids accepted by command fan-out. 更多...
 
class  eve::rts::CommandFanOutSystem
 Validates a typed selection and fans one command out in formation order. 更多...
 
class  eve::rts::MotionSystem
 Moves units toward their active generic order targets. 更多...
 
class  eve::rts::MovementOrderSystem
 Settles arrived finite movement orders so the canonical queue can advance. 更多...
 
class  eve::rts::CommandStateSystem
 Applies immediate Stop and persistent Hold/AttackMove command state. 更多...
 
struct  eve::rts::NavigationGrid
 World/grid conversion used when an RTS composition consumes a canonical map Pathfinder. 更多...
 
class  eve::rts::NavigationSystem
 Plans unit routes through the canonical map Pathfinder without owning map blockers or costs. 更多...
 
class  eve::rts::PatrolSystem
 Maintains persistent two-point patrol state without owning pathfinding. 更多...
 
class  eve::rts::TrafficReservationSystem
 Arbitrates deterministic directional entry into connected narrow map corridors. 更多...
 
class  eve::rts::FogOfWarSystem
 Projects RTS vision into canonical map FOV and maintains faction last-known contacts. 更多...
 
struct  eve::rts::FogOfWarSystem::State
 Runtime-only revealer bindings; authoritative explored cells remain owned by map::Fov. 更多...
 
struct  eve::rts::FogOfWarSystem::State::Binding
 Binding public API. 更多...
 
class  eve::rts::CrowdMotionSystem
 Synchronizes linked RTS units through the canonical Crowd simulation. 更多...
 
class  eve::rts::WorkerAssignmentSystem
 Deterministically assigns idle auto-workers to compatible resource nodes. 更多...
 
class  eve::rts::MiningSystem
 Advances Gather/ReturnCargo orders without owning an economy balance. 更多...
 
class  eve::rts::ConstructionSystem
 Advances construction using valid builders that reached their assigned site. 更多...
 
class  eve::rts::WorkforceAssignmentSystem
 Assigns idle faction workers to incomplete or damaged buildings by deterministic distance. 更多...
 
class  eve::rts::RepairSystem
 Repairs friendly completed buildings without owning an economy balance. 更多...
 
class  eve::rts::CaptureSystem
 Resolves deterministic single-faction and contested building capture. 更多...
 
class  eve::rts::InfrastructureSystem
 Allocates faction power deterministically and settles powered passive income. 更多...
 
class  eve::rts::ContainmentSystem
 Resolves transport boarding, building garrisoning, and contained-unit synchronization. 更多...
 
class  eve::rts::SupplySystem
 EVENGINE_API_DOMAINS public API. 更多...
 
struct  eve::rts::SupplyRendezvousSelection
 A safe map-reachable rendezvous selected around a predicted moving relay intercept. 更多...
 
class  eve::rts::SupplyRendezvousSystem
 Selects a low-threat supply rendezvous while delegating reachability to the canonical map. 更多...
 
class  eve::rts::SupplyConvoySystem
 Derives stable multi-vehicle supply convoys and paces their leader. 更多...
 
class  eve::rts::MoraleSystem
 Recovers suppression and applies nearby friendly morale auras. 更多...
 
class  eve::rts::ShieldSystem
 Regenerates unit and building shield projections after their configured damage delay. 更多...
 
class  eve::rts::CommandNetworkSystem
 Builds deterministic faction command networks with relay capacity and hostile jamming. 更多...
 
class  eve::rts::AbilitySystem
 Validates, schedules and settles active RTS abilities through canonical damage/effect owners. 更多...
 
class  eve::rts::ArtillerySystem
 Tracks indirect-fire deployment after movement. 更多...
 
struct  eve::rts::ArtilleryRelocationSelection
 Deterministic, canonical-map-validated artillery relocation choice. 更多...
 
class  eve::rts::ArtilleryRelocationSystem
 Selects reachable shoot-and-scoot positions without taking ownership of map navigation. 更多...
 
class  eve::rts::FireSupportSystem
 Assigns indirect-fire responders and automatic counter-battery ground attacks. 更多...
 
class  eve::rts::TacticsSystem
 Updates escort guards and deterministic combat-group target commitments. 更多...
 
class  eve::rts::AISystem
 Runs deterministic faction production and attack policy. 更多...
 
struct  eve::rts::CombatHeightProfile
 Absolute muzzle and target heights resolved by the authoritative map/game adapter. 更多...
 
class  eve::rts::CombatFireSystem
 EVENGINE_API_DOMAINS public API. 更多...
 
struct  eve::rts::CombatFireSystem::State
 Adapter-owned keys previously mirrored into a shared sensing world. 更多...
 
struct  eve::rts::ProjectileCollision
 Earliest canonical collision found along one projectile sweep segment. 更多...
 
struct  eve::rts::RTSProjectilePayloadSnapshot
 Stable RTS damage payload paired with one shared projectile-pool handle. 更多...
 
struct  eve::rts::RTSProjectileSystemSnapshot
 Complete in-flight RTS projectile state with stable gameplay relationships. 更多...
 
class  eve::rts::RTSProjectileSystem
 RTS impact adapter over the canonical pooled weapon projectile trajectory runtime. 更多...
 
class  eve::rts::OrderActionSystem
 Sends active generic orders to one shared action executor. 更多...
 
struct  eve::rts::ProductionSpawnOutcome
 Factory outcome; blocked tasks retain their payment and reserved identity. 更多...
 
class  eve::rts::BuildingProductionSystem
 EVENGINE_API_DOMAINS public API. 更多...
 
struct  eve::rts::ReinforcementRequestReceipt
 Result of resolving a preferred reinforcement through a deterministic substitution chain. 更多...
 
class  eve::rts::ReinforcementProductionPolicySystem
 EVENGINE_API_DOMAINS public API. 更多...
 
class  eve::rts::ReinforcementSystem
 Dispatches and unloads production reinforcements assigned to canonical unit containers. 更多...
 
class  eve::rts::EffectSystem
 Advances lifecycle-only effects on Units and Buildings. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::rts
 
namespace  eve::crowd
 
namespace  eve::sensing
 
namespace  eve::map
 放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectangle / iso / staggered / hex 与 XY/XZ 平面轴)。
 

类型定义

using eve::rts::DamageEventSink = std::function< void(const combat::DamageRequest &request, const combat::DamageOutcome &outcome, SimulationTick tick, DamageChannel channel)>
 Read-only observer invoked after canonical damage has committed.
 
using eve::rts::CombatFireEventSink = std::function< void(const CombatFireEvent &, SimulationTick)>
 Read-only observer invoked after a weapon consumes one authoritative shot.
 
using eve::rts::LifecycleEventSink = std::function< void(const LifecycleEvent &, SimulationTick)>
 Read-only observer invoked after a non-combat lifecycle transition commits.
 
using eve::rts::PlacementValidation = std::function< Result< void >(WorldPosition, LogicalId)>
 Caller-owned canonical terrain/occupancy validation used after RTS influence checks.
 
using eve::rts::NavigationEvent = std::function< void(Unit &, const OrderRecord &)>
 Notification emitted once when a newly planned order has no canonical map route.
 
using eve::rts::FogProvider = std::function< map::Fov *(Faction &)>
 Resolves the canonical FOV instance used by a faction; allies may deliberately share one instance.
 
using eve::rts::ResourceCredit = std::function< Result< resource::Receipt >(Unit &, const resource::CostSpec &)>
 Callback that credits gathered resources to the authoritative account selected by the game.
 
using eve::rts::RepairDebit = std::function< Result< resource::Receipt >(Unit &, Building &, const resource::CostSpec &)>
 Callback that debits repair costs from the authoritative account selected by the game.
 
using eve::rts::PassiveIncomeCredit = std::function< Result< resource::Receipt >(Building &, const resource::CostSpec &)>
 Credits passive building income through the game-owned canonical economy boundary.
 
using eve::rts::AmmoProductionPurchase = std::function< Result< std::size_t >(Building &, std::string_view, std::int64_t, std::size_t)>
 Assigns and transfers tactical ammunition through canonical WeaponEntity resource state.
 
using eve::rts::AbilityResourceDebit = std::function< Result< resource::Receipt >(Unit &, const resource::CostSpec &)>
 Debits an ability resource cost through the game-owned canonical economy boundary.
 
using eve::rts::AIProductionRequest = std::function< Result< void >(Faction &, Building &, const LogicalId &)>
 Authoritative production boundary invoked by AI policy decisions.
 
using eve::rts::FireLineQuery = std::function< Result< bool >(WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity, const weapon::WeaponDefinition &weapon)>
 Uses canonical sensing, weapon and damage providers for RTS automatic fire.
 
using eve::rts::CombatHeightQuery = std::function< CombatHeightProfile(WorldPosition origin, WorldPosition target, ecs::EntityHandle source, ecs::EntityHandle targetEntity)>
 Resolve absolute heights for one authorized projectile launch.
 
using eve::rts::ProjectileCollisionQuery = std::function< Result< std::optional< ProjectileCollision > >(WorldPosition from, float fromHeight, WorldPosition to, float toHeight, SubjectRef source, ecs::EntityHandle intendedTarget)>
 Map/physics-owned swept collision query; empty means the segment remained clear.
 
using eve::rts::ProjectileSubjectResolver = std::function< ecs::Entity *(SubjectRef)>
 Resolve one stable RTS subject while restoring projectile relationships.
 
using eve::rts::ProductionSpawn = std::function< Result< ProductionSpawnOutcome >(Building &, const production::ProductionTask &, WorldPosition)>
 Game-owned factory receiving the requested production exit position. The factory owns final placement (including collision resolution); settlement preserves that position. Return Created with a borrowed game-owned unit, Blocked without publishing anything when space is unavailable, or failure for an invalid request. Called synchronously on the simulation thread; the producer must remain alive and the callback must not reenter settlement.
 
using eve::rts::ProductionSpawnPosition = std::function< Result< std::optional< WorldPosition > >(Building &, const production::ProductionTask &)>
 Game/map-owned deterministic exit probe; empty means every valid exit is currently occupied.
 
using eve::rts::ReinforcementCancel = std::function< Result< void >(Building &, std::string_view)>
 Pauses canonical production tasks when a shared rally combat group reaches reinforcement limits.
 
using eve::rts::ReinforcementEnqueue = std::function< Result< std::string >(Building &, std::string_view)>
 Game-owned transactional enqueue boundary used while resolving reinforcement fallbacks.
 

枚举

enum class  eve::rts::FormationKind : std::uint8_t {
  eve::rts::Line , eve::rts::Grid , eve::rts::Wedge , eve::rts::Column ,
  eve::rts::Dispersed
}
 Deterministic formation layout strategies. 更多...
 
enum class  eve::rts::DamageChannel : std::uint8_t { eve::rts::Ability , eve::rts::Projectile , eve::rts::Weapon }
 Authoritative damage route that produced one transient RTS frame event. 更多...
 
enum class  eve::rts::CombatFireEventKind : std::uint8_t {
  eve::rts::WeaponFired , eve::rts::ProjectileFired , eve::rts::ShotMissed , eve::rts::ReloadStarted ,
  eve::rts::ReloadCompleted , eve::rts::WeaponDry , eve::rts::FireBlocked
}
 Transient weapon lifecycle event emitted after an authoritative firing attempt commits. 更多...
 
enum class  eve::rts::LifecycleEventKind : std::uint8_t {
  eve::rts::SuppressionRecovered , eve::rts::ShieldRecharged , eve::rts::ConstructionCompleted , eve::rts::ProductionSpawnBlocked ,
  eve::rts::ProductionSpawnCleared , eve::rts::UnitProduced , eve::rts::BuildingCaptured , eve::rts::AbilityCast ,
  eve::rts::AbilityChannelStarted , eve::rts::AbilityChannelTick , eve::rts::AbilityChannelCompleted , eve::rts::AbilityInterrupted ,
  eve::rts::AbilityChannelCancelled , eve::rts::StatusApplied , eve::rts::StatusExpired , eve::rts::AmmoProduced ,
  eve::rts::SupplyDispatched , eve::rts::SupplyRelayDispatched , eve::rts::AmmoResupplied , eve::rts::SupplyRelayTransferred ,
  eve::rts::SupplyReturning , eve::rts::SupplyReturned
}
 Non-combat RTS state transition exposed to presentation without entering authoritative state. 更多...
 
enum class  eve::rts::ProductionSpawnState { eve::rts::Created , eve::rts::Blocked }
 Whether a completed production task published a unit or is waiting for space. 更多...
 

函数

std::span< const SystemContract > eve::rts::systemContracts () noexcept
 Return the phase-one RTS ECS contracts for tooling and review.
 

详细描述

Deterministic phase-one RTS systems and their ECS contracts.

在文件 RTSSystems.h 中定义.