make repair ships standby with rest of fleet if there is no one to repair (instead of advancing towards the enemy stations)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "SalvageScrapBehavior.h"
|
||||
#include "SelectedBehaviorComponent.h"
|
||||
#include "SensorRangeComponent.h"
|
||||
#include "StandbyBehavior.h"
|
||||
#include "Tick.h"
|
||||
#include "tracing.h"
|
||||
#include "WeaponComponent.h"
|
||||
@@ -401,6 +402,11 @@ entt::entity ShipSystem::spawn(const std::string& schematicId, int level,
|
||||
repair.orbitRadius_tiles =
|
||||
maxRepairRange * static_cast<float>(m_config.world.orbitFactor);
|
||||
m_admin.addComponent<RepairBehavior>(entity, repair);
|
||||
|
||||
// Repair-capable ships hold with the fleet (REQ-SHP-STANDBY) instead of
|
||||
// charging the enemy when no more urgent behavior applies; this applies
|
||||
// whether or not the ship also carries weapons.
|
||||
m_admin.addComponent<StandbyBehavior>(entity, StandbyBehavior{});
|
||||
}
|
||||
|
||||
return entity;
|
||||
|
||||
Reference in New Issue
Block a user