The two executors were line-for-line duplicates: orbit the behavior target, then hand it to the owner's in-range modules. Both now call a templated executeOrbitAndAssign<Behavior, ModuleComponent>; the view types, iteration order, and sequence of component writes are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GH8ZMRY3vhxxXcaUxBqxkk
18 lines
465 B
C++
18 lines
465 B
C++
#include "RepairExecutor.h"
|
|
|
|
#include "BehaviorKind.h"
|
|
#include "EntityAdmin.h"
|
|
#include "OrbitAndAssignExecutor.h"
|
|
#include "RepairBehavior.h"
|
|
#include "RepairToolComponent.h"
|
|
#include "tracing.h"
|
|
|
|
void RepairExecutor::execute(EntityAdmin& admin)
|
|
{
|
|
TRACE();
|
|
|
|
// Orbit the repair target and hand it to every repair tool that can reach it
|
|
// (REQ-SHP-ORBIT).
|
|
executeOrbitAndAssign<RepairBehavior, RepairToolComponent>(admin, BehaviorKind::Repair);
|
|
}
|