implement ship behaviors

This commit is contained in:
2026-04-20 08:29:53 +02:00
parent 8b84297b41
commit 65de4ddc5c
11 changed files with 1124 additions and 14 deletions

View File

@@ -27,11 +27,24 @@ Simulation::~Simulation() = default;
void Simulation::tick()
{
m_buildingSystem->tickConstruction(m_currentTick);
m_buildingSystem->tickBeltPull(); // tick order step 3
m_buildingSystem->tickProduction(m_currentTick); // step 4
m_buildingSystem->tickBeltPush(); // step 5
m_beltSystem.tick(); // step 6
m_scrapSystem->tickDespawn(m_currentTick); // step 11
m_buildingSystem->tickBeltPull(); // tick order step 3
m_buildingSystem->tickProduction(m_currentTick); // step 4
m_buildingSystem->tickBeltPush(); // step 5
m_beltSystem.tick(); // step 6
// Step 7: ship behavior systems (movement arbitration via intent priority).
m_shipSystem->clearMovementIntents();
m_shipSystem->tickHomeReturn(); // priority 4
m_shipSystem->tickThreatResponse(*m_buildingSystem); // priority 3
m_shipSystem->tickRepairBehavior(*m_buildingSystem); // priority 2
m_shipSystem->tickScrapCollector(*m_scrapSystem, *m_buildingSystem); // priority 1
// Steps 8 & 9: combat resolution and deaths — added in implementation step 7.
// Step 10: advance ship positions from winning intents.
m_shipSystem->tickMovement();
m_scrapSystem->tickDespawn(m_currentTick); // step 11
++m_currentTick;
}