implement ship behaviors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user