载入中...
搜索中...
未找到
RTSSystemMovementInternal.h
浏览该文件的文档.
16EVENGINE_API_DOMAINS bool isFormationSegmentClear(const map::Pathfinder& pathfinder, const NavigationGrid& grid,
19inline bool isFinitePosition(WorldPosition position) { return std::isfinite(position.x) && std::isfinite(position.y); }
36 (order.kind == OrderKind::Move || order.kind == OrderKind::AttackMove || order.kind == OrderKind::Attack ||
68 return kind == OrderKind::Gather || kind == OrderKind::ReturnCargo || kind == OrderKind::Build ||
79 const float workers = static_cast<float>(std::max<std::size_t>(1, node->harvest()->workers.size()));
102 if (order.kind == OrderKind::Attack || order.kind == OrderKind::Resupply || order.kind == OrderKind::SupplyRelay) {
117 if (current) return Result<std::optional<OrderRecord>>::success(std::move(current).takeValue());
120 return Result<std::optional<OrderRecord>>::success(std::nullopt, Status::success(StatusCode::NoOp));
Deterministic phase-one RTS systems and their ECS contracts.
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
RTS building domain root with placement and production composition.
Definition RTSTypes.h:852
Generic orders component adapter; the queue remains the sole order owner.
Definition RTSTypes.h:390
Result< OrderRecord > current() const
Project the active order or return NotFound when idle.
Definition RTSTypes.cpp:420
Harvestable RTS resource node; deposited balances are owned by an external resource account.
Definition RTSTypes.h:1085
WorldPosition movementGoal(Unit &unit, const OrderRecord &order)
Resolve the current canonical movement goal without retaining entity pointers. @ownership Returns a w...
Definition RTSSystemMovementInternal.h:100
float visibleHostileThreatAt(Faction &viewer, WorldPosition point)
Observe visible hostile weapon threat at a world point using canonical faction intelligence.
Definition RTSNavigation.cpp:9
float interactionArrivalRadius(Unit &unit, const OrderRecord &order)
Definition RTSSystemMovementInternal.h:75
float distanceSquared(float ax, float ay, float bx, float by)
Definition RTSSystemMovementInternal.h:27
Result< std::optional< OrderRecord > > readCurrent(OrderComponent &orders)
Definition RTSSystemMovementInternal.h:115
bool isInteractionOrder(OrderKind kind)
Definition RTSSystemMovementInternal.h:67
bool isSameHandle(const ecs::EntityHandle &left, const ecs::EntityHandle &right)
Definition RTSSystemMovementInternal.h:21
bool isMovementOrder(OrderKind kind)
Definition RTSSystemMovementInternal.h:47
std::optional< WorldPosition > entityPosition(const ecs::EntityHandle &handle)
Definition RTSSystemMovementInternal.h:89
bool isSharedFlowOrder(Unit &unit, const OrderRecord &order)
Whether motion uses a shared field instead of a radius-clear moving slot.
Definition RTSSystemMovementInternal.h:42
bool isFinitePosition(WorldPosition position)
Definition RTSSystemMovementInternal.h:19
EVENGINE_API_DOMAINS bool isFormationSegmentClear(const map::Pathfinder &pathfinder, const NavigationGrid &grid, WorldPosition from, WorldPosition to, float radius)
Definition RTSFormationClearance.cpp:10
bool isSharedFlowNavigationOrder(Unit &unit, const OrderRecord &order)
Whether planning uses the shared policy, before the current group projection exists.
Definition RTSSystemMovementInternal.h:34
@ BoardTransport
@ Repair
@ Garrison
@ ReturnCargo
@ Escort
@ AttackMove
@ Capture
@ Gather
@ Build
@ Attack
@ Patrol
@ SupplyRelay
@ Resupply
@ NotFound
@ NoOp
Owning projection of the active generic order used by RTS systems.
Definition RTSTypes.h:122