载入中...
搜索中...
未找到
RTSTypes.h
浏览该文件的文档.
194 Diagnostic::error(DiagnosticCode::StaleHandle, "RTS entity link target is not live", "link.handle"));
217 [[nodiscard]] bool isStale() const noexcept { return bound_ && ecs::try_get(handle_) == nullptr; }
372 [[nodiscard]] Result<void> initialize(std::span<const eve::attributes::AttributeSnapshotBase> values);
376 [[nodiscard]] Result<eve::attributes::ModifierId> addModifier(eve::attributes::AttributeModifier modifier);
381 [[nodiscard]] Result<void> restore(const eve::attributes::AttributeProjectionSnapshot& snapshot,
459 [[nodiscard]] Result<std::string> enqueue(std::string_view owner, std::string_view kind, std::string_view product,
476 [[nodiscard]] Result<void> cancel(std::string_view taskId, std::string_view reason = "cancelled");
478 [[nodiscard]] std::vector<production::ProductionTask> readyToSettle(std::string_view kind) const;
511 ecs::EntityHandle self{};
549 std::uint64_t runtimeOwner = 0;
580 std::size_t waypointIndex = 0;
639 std::uint64_t shotSequence = 0;
682 ecs::EntityHandle uplink{};
725 std::size_t convoyIndex = 0;
726 ecs::EntityHandle assignedTarget{};
727 ecs::EntityHandle convoyLeader{};
765 std::uint32_t shotSequence = 0;
767 ecs::EntityHandle fireSupportRequester{};
768 ecs::EntityHandle observedFireSpotter{};
773 std::uint64_t counterBatteryWindowTicks = 0;
862 ecs::EntityHandle self{};
936 ecs::EntityHandle capturingFaction{};
950 std::uint64_t combatGroup = 0;
951 ecs::EntityHandle transport{};
952 std::size_t minimumTransportLoad = 1;
958 std::size_t reinforcementLimit = 0;
974 ecs::EntityHandle airDefenseNetworkRoot{};
978 std::size_t airDefenseNetworkSize = 0;
983 std::uint64_t shotSequence = 0;
1000 std::int64_t productionCostPerRound = 0;
1081 [[nodiscard]] static Building* createBuilding(SubjectRef subject = {}, LogicalId definition = {});
1143 ecs::EntityHandle self{};
1202 ecs::EntityHandle self{};
1243 std::size_t maxBuildersPerSite = 2;
1244 std::size_t maxRepairersPerBuilding = 2;
1245 std::size_t reserveWorkers = 0;
1353 std::uint64_t completedSequence = 0;
1517 std::uint64_t updateSequence = 0;
Owner-aware canonical attribute state shared by gameplay adapters.
Deterministic damage, poise, hit-reaction and knockback resolution.
Strong identity values shared by persistence, content and logical-name APIs.
RTS effect adapter with morale, suppression and production policies.
Move-only, checked operation results for the common layer.
Strong generation-qualified handles for non-ECS runtime registries.
Stable reference to a runtime gameplay subject.
Common time values and an injectable deterministic simulation clock.
std::map< std::string, std::span< const std::uint8_t > > members
Definition UnityPackage.cpp:81
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
Human-readable, scoped identifier in the form namespace:name.
Definition Identity.h:414
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Process-local slot identity tagged by the registry that owns it.
Definition RuntimeHandle.h:116
Canonical attributes component adapter, backed by attributes::AttributeSet.
Definition RTSTypes.h:328
AttributeComponent & operator=(AttributeComponent &&other) noexcept
Operator =.
AttributeComponent(AttributeComponent &&other) noexcept
Attribute component.
RTS building domain root with placement and production composition.
Definition RTSTypes.h:852
Validates a typed selection and fans one command out in formation order.
Definition RTSSystems.h:216
bool isBound() const noexcept
Whether a handle has been assigned, including a stale one.
Definition RTSTypes.h:215
ecs::Entity * resolve() const noexcept
Resolve the target for this call, or return null when stale.
Definition RTSTypes.h:219
static Result< EntityLink > bind(ecs::EntityHandle handle)
Bind a live ECS handle, rejecting a null or stale handle.
Definition RTSTypes.h:189
static EntityLink fromHandleForRestore(ecs::EntityHandle handle) noexcept
Rehydrate a serialized runtime link before its target is known.
Definition RTSTypes.h:207
bool isStale() const noexcept
Whether the assigned target no longer resolves at its generation.
Definition RTSTypes.h:217
const ecs::EntityHandle & handle() const noexcept
Return the local runtime handle retained by this link.
Definition RTSTypes.h:221
Faction domain root; membership is a set of typed runtime handles.
Definition RTSTypes.h:1192
Independent match composition root; factions may participate in different matches.
Definition RTSTypes.h:1476
Generic orders component adapter; the queue remains the sole order owner.
Definition RTSTypes.h:390
~OrderComponent()
Player domain root; selection is RTS-local, authority/economy/social are links.
Definition RTSTypes.h:1133
Production adapter whose queue owns all task state.
Definition RTSTypes.h:443
ProductionComponent(ProductionComponent &&other) noexcept
Production component.
ProductionComponent & operator=(ProductionComponent &&other) noexcept
Operator =.
Entity-local RTS effect component backed by the canonical adapter.
Definition RTSEffects.h:118
Coordinates Orders, Production, Action and resource payment.
Definition RTSProductionAction.h:130
Harvestable RTS resource node; deposited balances are owned by an external resource account.
Definition RTSTypes.h:1085
Strong key link to an external module-owned service object.
Definition RTSTypes.h:245
static ServiceLink fromKeyForRestore(std::string_view key)
Rehydrate a provider key during restore/import.
Definition RTSTypes.h:261
static Result< ServiceLink > bind(std::string_view key)
Bind a non-empty provider key.
Definition RTSTypes.h:248
bool isStale() const noexcept
Whether the key is empty and therefore cannot resolve.
Definition RTSTypes.h:270
Entity-local sorted tags; this is the RTS entity's tag authority.
Definition RTSTypes.h:158
const std::vector< std::string > & values() const noexcept
Return tags in deterministic order.
Definition RTSTypes.h:167
Definition PathSceneCapture.h:7
Definition Crowd.cpp:14
Definition QueueInspector.h:11
Definition QueueInspector.h:12
Definition RTS.cpp:30
MissionObjectiveKind
Deterministic campaign objective kinds owned by a Match.
Definition RTSTypes.h:1319
@ ProtectSubjects
@ OccupyBuildings
@ ReachScore
@ EliminateFaction
@ SurviveDuration
@ ReachResource
@ DestroyBuilding
MissionVariableCompare
Variable comparison used as an AND gate on a trigger.
Definition RTSTypes.h:1381
const char * combatStanceName(CombatStance stance) noexcept
Return the stable lower-case spelling of a combat stance. @ownership Returns a borrowed pointer to im...
Definition RTSTypes.cpp:168
MissionTriggerEventKind
Domain event kinds that can wake Match campaign triggers.
Definition RTSTypes.h:1357
@ MatchStarted
@ ObjectiveCompleted
@ MatchFinished
@ ObjectiveFailed
@ TimerElapsed
@ BuildingDestroyed
@ RegionExited
@ RegionEntered
@ BoardTransport
@ Repair
@ Garrison
@ ReturnCargo
@ HoldPosition
@ AttackGround
@ AttackMove
@ Capture
@ Gather
@ Build
@ Attack
@ Patrol
@ SupplyRelay
@ Resupply
@ SuppressArea
@ Setup
@ Defensive
@ Aggressive
@ Passive
MissionActionKind
Built-in campaign actions; Script entries are retained for the game layer.
Definition RTSTypes.h:1391
@ AddVariable
@ EnableTrigger
@ SetVariable
@ DisableMonitor
@ StopTimer
@ StartTimer
@ DisableTrigger
@ EmitCustom
@ EnableMonitor
@ ResetTimer
const char * orderKindName(OrderKind kind) noexcept
Return the stable lower-case spelling of an RTS order kind.
Definition RTSTypes.cpp:177
@ ScoreTarget
@ Mission
Campaign/mission mode: Match::Objectives own completion and failure settlement.
@ Annihilation
@ DestroyHeadquarters
@ ResourceTarget
@ InvalidArgument
@ StaleHandle
@ Pending
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
@ Running
Definition Container.h:602
Mutable combat state owned by the gameplay domain for one subject.
Definition Damage.h:38
Validated input used to create a domain-neutral production task.
Definition Production.h:137
Typed ability policy; lifecycle effects remain owned by the canonical effect container.
Definition RTSTypes.h:138
Automatic targeting policy for a stationary defensive building.
Definition RTSTypes.h:972
std::map< std::string, float > targetPriorities
Definition RTSTypes.h:984
Static command provider and hostile jamming policy.
Definition RTSTypes.h:1030
Construction progress and generation-checked assigned builders.
Definition RTSTypes.h:909
std::vector< ecs::EntityHandle > builders
Definition RTSTypes.h:913
Resource delivery policy; actual balances remain in the economy provider.
Definition RTSTypes.h:942
std::vector< std::string > acceptedResources
Definition RTSTypes.h:943
Building garrison capacity and generation-checked occupants.
Definition RTSTypes.h:987
std::vector< ecs::EntityHandle > occupants
Definition RTSTypes.h:990
Last indirect-fire exposure for static artillery and counter-battery observation.
Definition RTSTypes.h:1039
WorldPosition lastFirePosition
Definition RTSTypes.h:1041
RTS infrastructure projection; economy balances remain owned by the linked provider.
Definition RTSTypes.h:1019
std::string incomeResource
Definition RTSTypes.h:1025
Building health and repair economy configuration.
Definition RTSTypes.h:916
Placement world key and authoritative cell state.
Definition RTSTypes.h:871
std::string reinforcementPolicyPausedTask
Definition RTSTypes.h:963
std::map< std::string, std::size_t > reinforcementTypeLimits
Definition RTSTypes.h:959
std::string blockedProductionTask
Definition RTSTypes.h:955
std::vector< ecs::EntityHandle > reinforcements
Definition RTSTypes.h:957
std::map< std::string, std::string > reinforcementFallbacks
Definition RTSTypes.h:961
std::map< std::string, int > reinforcementTypePriorities
Definition RTSTypes.h:960
std::vector< std::string > settledProductionTasks
Definition RTSTypes.h:956
RTS shield layer for structures; canonical CombatState remains health authority.
Definition RTSTypes.h:924
Static ammunition stock and transfer policy for completed buildings.
Definition RTSTypes.h:993
std::string productionResource
Definition RTSTypes.h:999
Upgrade ids already projected onto this building.
Definition RTSTypes.h:1015
Static vision contribution projected into a faction-owned canonical map FOV provider.
Definition RTSTypes.h:1005
Canonical weapon entity used by an armed building.
Definition RTSTypes.h:968
One domain-neutral command submitted to a unit's generic order queue.
Definition RTSTypes.h:106
Result< void > validate() const
Validate coordinates and command metadata without mutating state.
Definition RTSTypes.cpp:201
Persistent last-known enemy contacts derived from the faction's canonical FOV provider.
Definition RTSTypes.h:1257
std::vector< ecs::EntityHandle > buildings
Definition RTSTypes.h:1221
Cross-factory resource floors reserved for production at or above a priority threshold.
Definition RTSTypes.h:1248
std::map< std::string, Reserve > resourceReserves
Definition RTSTypes.h:1254
Deterministic high-level production and attack policy for an AI-controlled faction.
Definition RTSTypes.h:1228
LogicalId targetBuildingDefinition
Definition RTSTypes.h:1231
Completed research definitions and canonical production tasks already consumed.
Definition RTSTypes.h:1272
std::vector< std::string > consumedTasks
Definition RTSTypes.h:1274
std::map< std::string, Value::Object > unlockedDefinitions
Validated immutable rule payload accepted for each completed research id.
Definition RTSTypes.h:1276
std::vector< std::string > unlocked
Definition RTSTypes.h:1273
Deterministic idle-worker assignment policy for construction and repair.
Definition RTSTypes.h:1240
Campaign trigger host owned by the match (WC3-style events/monitors/timers).
Definition RTSTypes.h:1551
std::vector< MissionVariable > variables
Definition RTSTypes.h:1555
std::vector< MissionActionLogEntry > actions
Definition RTSTypes.h:1557
std::vector< MissionPendingEvent > pending
Definition RTSTypes.h:1556
std::vector< MissionRegionMonitor > monitors
Definition RTSTypes.h:1553
std::vector< SubjectRef > trackedAlive
Subjects known alive on the previous campaign step for death edges.
Definition RTSTypes.h:1559
std::vector< MissionObjectiveState > values
Definition RTSTypes.h:1533
One faction's team and elimination projection.
Definition RTSTypes.h:1502
Configured victory rule; immutable while the match is running.
Definition RTSTypes.h:1489
Match-owned team scores for ScoreTarget and timed score settlement.
Definition RTSTypes.h:1522
std::vector< Entry > entries
Sorted by ascending team id for deterministic projection.
Definition RTSTypes.h:1529
Retained Script-action activation for game-layer consumption.
Definition RTSTypes.h:1465
Persistent mission objective definition using stable subjects and team ids.
Definition RTSTypes.h:1332
std::vector< SubjectRef > requiredSubjects
Definition RTSTypes.h:1342
Mutable objective status retained with the match.
Definition RTSTypes.h:1350
Queued campaign event waiting to wake triggers.
Definition RTSTypes.h:1455
Axis-aligned world region that emits enter/exit events for live subjects.
Definition RTSTypes.h:1426
std::vector< SubjectRef > occupants
Runtime occupants discovered on the previous step.
Definition RTSTypes.h:1436
std::vector< SubjectRef > subjects
Definition RTSTypes.h:1434
Match-owned countdown that emits TimerElapsed when it reaches zero.
Definition RTSTypes.h:1440
One variable predicate evaluated against Match::Campaign variables.
Definition RTSTypes.h:1384
Optional filters that narrow one trigger event subscription.
Definition RTSTypes.h:1371
std::string id
Timer, region, objective, or custom id; empty matches any id for that kind.
Definition RTSTypes.h:1374
Authorable trigger: OR of events, AND of variable conditions, then actions.
Definition RTSTypes.h:1414
std::vector< MissionTriggerCondition > conditions
Definition RTSTypes.h:1420
std::vector< MissionTriggerEventFilter > events
Definition RTSTypes.h:1419
Complete RTS order projection snapshot; entity handles must be rebound by the owning domain.
Definition RTSTypes.h:393
std::map< std::string, CommandSpec > extended
Definition RTSTypes.h:395
Owning projection of the active generic order used by RTS systems.
Definition RTSTypes.h:122
RTS-owned selection handles; handles are generation checked on use.
Definition RTSTypes.h:1160
std::vector< ecs::EntityHandle > buildings
Definition RTSTypes.h:1162
Typed RTS definition projected to the common lifecycle schema.
Definition RTSEffects.h:35
Concurrent worker capacity and current generation-checked assignments.
Definition RTSTypes.h:1113
std::vector< ecs::EntityHandle > workers
Definition RTSTypes.h:1115
Authoritative world position and interaction radius.
Definition RTSTypes.h:1100
Typed link tag for a provider-owned capability or registry entry.
Definition RTSTypes.h:234
Ability cooldowns and an optional deterministic cast/channel in progress.
Definition RTSTypes.h:685
Indirect-fire deployment and deterministic area-fire policy.
Definition RTSTypes.h:752
Capture contribution while executing a Capture order.
Definition RTSTypes.h:701
RTS stance and pursuit limits used by automatic combat policies.
Definition RTSTypes.h:622
std::map< std::string, float > targetPriorities
Definition RTSTypes.h:640
Command-network policy and derived connection state for a mobile unit or relay.
Definition RTSTypes.h:667
Unit containment state for transports and building garrisons.
Definition RTSTypes.h:705
std::vector< ecs::EntityHandle > occupants
Definition RTSTypes.h:708
RuntimeHandle< eve::crowd::CrowdAgentTag > runtimeAgent
Definition RTSTypes.h:548
Canonical combat durability state consumed by combat::DamageRuntime.
Definition RTSTypes.h:643
Suppression, recovery, retreat policy, and friendly morale aura.
Definition RTSTypes.h:736
Authoritative kinematic state used by the phase-one move slice.
Definition RTSTypes.h:569
RTS shield layer consumed before canonical health damage and regenerated deterministically.
Definition RTSTypes.h:648
Tactical ammunition logistics; weapon ammunition remains authoritative in WeaponEntity.
Definition RTSTypes.h:711
Escort geometry and combat-group coordination state.
Definition RTSTypes.h:776
SubjectRef escortInterceptTarget
Definition RTSTypes.h:795
Upgrade ids already projected onto this unit, preventing repeated multiplicative application.
Definition RTSTypes.h:802
Persistent combat experience and deterministic veteran/elite modifiers.
Definition RTSTypes.h:656
Vision contribution projected into a faction-owned canonical map FOV provider.
Definition RTSTypes.h:598
Worker gathering and delivery state; balances remain owned by the linked economy account.
Definition RTSTypes.h:610