Rename ship/station scrap drop entities to "debris"

This commit is contained in:
2026-07-23 20:51:05 +02:00
parent 11daa61714
commit 8b71fe1a03
48 changed files with 468 additions and 443 deletions

View File

@@ -20,7 +20,7 @@ SET(HDRS
${CMAKE_CURRENT_SOURCE_DIR}/RetreatBehavior.h
${CMAKE_CURRENT_SOURCE_DIR}/SalvagerComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/SalvageScrapBehavior.h
${CMAKE_CURRENT_SOURCE_DIR}/ScrapDataComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/DebrisComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/SelectedBehaviorComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/SensorRangeComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/ShipIdentityComponent.h

View File

@@ -0,0 +1,8 @@
#pragma once
// Marks a piece of debris and holds the amount of scrap it still contains
// (REQ-RES-DEBRIS-DROP). Salvage modules collect one scrap per cycle (REQ-SHP-SALVAGE).
struct DebrisComponent
{
int amount;
};

View File

@@ -5,10 +5,10 @@
#include <QVector2D>
// Collect-scrap behavior (one half of the old SalvageBehaviorComponent). The
// evaluator finds the nearest scrap and sets scrapTarget when cargo is not full.
// evaluator finds the nearest debris and sets debrisTarget when cargo is not full.
struct SalvageScrapBehavior
{
std::optional<QVector2D> scrapTarget;
std::optional<QVector2D> debrisTarget;
float maxCollectionRange_tiles = 0.0f;
float orbitRadius_tiles = 0.0f; // REQ-SHP-ORBIT
float score = 0.0f;

View File

@@ -1,6 +0,0 @@
#pragma once
struct ScrapDataComponent
{
int amount;
};

View File

@@ -6,6 +6,6 @@ struct ShipIdentityComponent
{
std::string schematicId;
// Scrap dropped on destruction, derived from the ship's as-built threat cost
// at spawn time (REQ-RES-SCRAP-DROP).
// at spawn time (REQ-RES-DEBRIS-DROP).
int scrapDrop = 0;
};