schematic selection dialog

This commit is contained in:
2026-06-13 12:00:05 +02:00
parent 1641189b75
commit 49f7129bd5
25 changed files with 453 additions and 268 deletions

View File

@@ -12,7 +12,7 @@
#include "BeltSystem.h"
#include "EntityAdmin.h"
#include "entt/entity/entity.hpp"
#include "SchematicDropEvent.h"
#include "SchematicChoiceOption.h"
#include "BuildingType.h"
#include "BuildingId.h"
#include "EventHandler.h"
@@ -52,8 +52,16 @@ public:
// internal queue. Call once per rendered frame (REQ-SHP-FIRING-BEAM).
std::vector<FireEvent> drainFireEvents();
// Returns all schematic drop events since the last drain.
std::vector<SchematicDropEvent> drainSchematicDropEvents();
// Returns the pending schematic choices (empty if no drop is pending).
const std::vector<SchematicChoiceOption>& getPendingSchematicChoices() const;
// Returns true if there are pending schematic choices waiting for player input.
bool hasSchematicChoicesPending() const;
// Applies the player's chosen schematic from the pending choices.
// choiceIndex must be in [0, pendingChoices.size()).
// Clears the pending choices after application.
void applySchematicChoice(int choiceIndex);
Tick currentTick() const;
int buildingBlocksStock() const;
@@ -108,8 +116,8 @@ private:
// Tick step 9: remove dead ships and buildings, drop scrap, handle push.
void tickDeathsAndLoot();
// Award a random schematic drop (REQ-DEF-SCHEMATIC-DROP) and emit the event.
void awardSchematicDrop(int destroyedStationLevel);
// Generate up to 3 schematic choices (REQ-DEF-SCHEMATIC-DROP) for the player.
void generateSchematicChoices(int destroyedStationLevel);
GameConfig m_config;
std::mt19937 m_rng;
@@ -158,5 +166,5 @@ private:
std::unique_ptr<CombatSystem> m_combatSystem;
std::vector<FireEvent> m_fireEvents;
std::vector<SchematicDropEvent> m_schematicDropEvents;
std::vector<SchematicChoiceOption> m_pendingSchematicChoices;
};