Rename ship/station scrap drop entities to "debris"
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "GameConfig.h"
|
||||
#include "PlayerCommandsAppliedEvent.h"
|
||||
#include "RecipesConfig.h"
|
||||
#include "ScrapSelectionChangedEvent.h"
|
||||
#include "DebrisSelectionChangedEvent.h"
|
||||
#include "SelectionChangedEvent.h"
|
||||
#include "ShipLayout.h"
|
||||
#include "ShipsConfig.h"
|
||||
@@ -38,7 +38,7 @@ class SelectedBuildingPanel : public QWidget,
|
||||
PlayerCommandsAppliedEvent,
|
||||
EntitySelectionChangedEvent,
|
||||
SelectionChangedEvent,
|
||||
ScrapSelectionChangedEvent,
|
||||
DebrisSelectionChangedEvent,
|
||||
DebugDrawToggledEvent>
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
void handleEvent(std::shared_ptr<const PlayerCommandsAppliedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const EntitySelectionChangedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const SelectionChangedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const ScrapSelectionChangedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const DebrisSelectionChangedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const DebugDrawToggledEvent> event) override;
|
||||
|
||||
private slots:
|
||||
@@ -80,8 +80,9 @@ private:
|
||||
void buildEmpty();
|
||||
void buildSingle(BuildingId id);
|
||||
void buildMulti(const std::vector<BuildingId>& ids);
|
||||
void refreshScrapTotal();
|
||||
// "Scrap: N" for the summed remaining amount of the selected piles (REQ-UI-SCRAP-PANEL).
|
||||
// Summed remaining scrap across the selected debris (REQ-UI-DEBRIS-PANEL).
|
||||
int selectedDebrisScrapTotal() const;
|
||||
// "Scrap x N" line for the multi-object summary (REQ-UI-FIELD-MULTI-SELECTION).
|
||||
QString scrapTotalText() const;
|
||||
void refreshBuffers(const Building* b);
|
||||
void refreshSiteProgress(const ConstructionSite* s);
|
||||
@@ -117,23 +118,26 @@ private:
|
||||
|
||||
bool m_debugDraw = false;
|
||||
// The selected ships/defence stations. Shares the "field" selection category with
|
||||
// scrap (m_selectedScrap): both can be non-empty at once (REQ-UI-SELECTION-CATEGORIES).
|
||||
// debris (m_selectedDebris): both can be non-empty at once (REQ-UI-SELECTION-CATEGORIES).
|
||||
std::vector<entt::entity> m_selectedEntities;
|
||||
ShipStatsPanel* m_entityStatsPanel;
|
||||
QLabel* m_entityTitleLabel;
|
||||
QLabel* m_stationStatsLabel;
|
||||
QLabel* m_entitySummaryLabel;
|
||||
|
||||
std::vector<entt::entity> m_selectedScrap;
|
||||
std::vector<entt::entity> m_selectedDebris;
|
||||
// Shows the debris "Scrap" stat row (single selection) — the scrap total for the
|
||||
// multi-object summary lives in m_entitySummaryLabel instead.
|
||||
QLabel* m_scrapLabel;
|
||||
|
||||
// Renders the combined field selection (actors + scrap): a single-actor stats panel
|
||||
// or a multi-actor summary, plus the scrap total when scrap is also selected
|
||||
// (REQ-UI-FIELD-MULTI-SELECTION).
|
||||
// Renders the combined field selection (actors + debris): a single-object stats panel
|
||||
// (ship, station, or debris) or a multi-object count summary that appends the debris
|
||||
// count and scrap total when debris is also selected (REQ-UI-FIELD-MULTI-SELECTION).
|
||||
void buildFieldSelection();
|
||||
void buildEntityShip(entt::entity entity);
|
||||
void buildEntityStation(entt::entity entity);
|
||||
void buildEntitySummary();
|
||||
void buildDebrisSingle();
|
||||
void refreshEntityStats();
|
||||
void clearEntityDisplay();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user