Rename ship/station scrap drop entities to "debris"
This commit is contained in:
@@ -24,11 +24,11 @@
|
||||
#include "PositionComponent.h"
|
||||
#include "RepairBehavior.h"
|
||||
#include "SalvageScrapBehavior.h"
|
||||
#include "ScrapSystem.h"
|
||||
#include "DebrisSystem.h"
|
||||
#include "SensorRangeComponent.h"
|
||||
#include "ShipIdentityComponent.h"
|
||||
#include "StationBodyComponent.h"
|
||||
#include "ScrapDataComponent.h"
|
||||
#include "DebrisComponent.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -153,7 +153,7 @@ void ArenaView::handleEvent(std::shared_ptr<const BeamFiredEvent> event)
|
||||
maxRadius = shorter / 2.0f;
|
||||
}
|
||||
else if (m_sim->getAdmin().isValid(event->target)
|
||||
&& m_sim->getAdmin().hasAll<ScrapDataComponent>(event->target))
|
||||
&& m_sim->getAdmin().hasAll<DebrisComponent>(event->target))
|
||||
{
|
||||
maxRadius = 0.1f;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void ArenaView::paintGL()
|
||||
drawTiles(painter);
|
||||
drawBuildings(painter);
|
||||
drawStations(painter);
|
||||
drawScrap(painter);
|
||||
drawDebris(painter);
|
||||
if (m_debugDraw)
|
||||
{
|
||||
drawDebugSensorRanges(painter);
|
||||
@@ -336,12 +336,12 @@ void ArenaView::drawBuildings(QPainter& painter)
|
||||
}
|
||||
}
|
||||
|
||||
void ArenaView::drawScrap(QPainter& painter)
|
||||
void ArenaView::drawDebris(QPainter& painter)
|
||||
{
|
||||
const float r = getTilePx() * 0.2f;
|
||||
for (const ScrapInfo& scrap : m_sim->getScraps().getAllScrapInfo())
|
||||
for (const DebrisInfo& debris : m_sim->getDebrisSystem().getAllDebrisInfo())
|
||||
{
|
||||
const QPointF center = worldToWidget(scrap.position);
|
||||
const QPointF center = worldToWidget(debris.position);
|
||||
painter.setBrush(QColor(128, 110, 90));
|
||||
painter.setPen(QPen(QColor(50, 40, 30), 1));
|
||||
painter.drawEllipse(center,
|
||||
@@ -529,9 +529,9 @@ void ArenaView::drawDebugTargetLines(QPainter& painter)
|
||||
const PositionComponent& pos, const FactionComponent& fac,
|
||||
const SalvageScrapBehavior& salvage)
|
||||
{
|
||||
if (!salvage.scrapTarget.has_value()) { return; }
|
||||
if (!salvage.debrisTarget.has_value()) { return; }
|
||||
|
||||
drawTargetLine(fac.isEnemy, pos.value, *salvage.scrapTarget);
|
||||
drawTargetLine(fac.isEnemy, pos.value, *salvage.debrisTarget);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user