Rename ship/station scrap drop entities to "debris"
This commit is contained in:
@@ -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
|
||||
|
||||
8
src/lib/ecs/component/DebrisComponent.h
Normal file
8
src/lib/ecs/component/DebrisComponent.h
Normal 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;
|
||||
};
|
||||
@@ -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;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
struct ScrapDataComponent
|
||||
{
|
||||
int amount;
|
||||
};
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user