add event system and use it to propagate to print traces
This commit is contained in:
@@ -10,15 +10,16 @@
|
||||
|
||||
#include "BeltSystem.h"
|
||||
#include "EntityAdmin.h"
|
||||
|
||||
#include "entt/entity/entity.hpp"
|
||||
#include "SchematicDropEvent.h"
|
||||
#include "BuildingType.h"
|
||||
#include "BuildingId.h"
|
||||
#include "EventHandler.h"
|
||||
#include "FireEvent.h"
|
||||
#include "GameConfig.h"
|
||||
#include "Rotation.h"
|
||||
#include "Tick.h"
|
||||
#include "TracePrintRequestedEvent.h"
|
||||
|
||||
class AiSystem;
|
||||
class BuildingSystem;
|
||||
@@ -29,7 +30,7 @@ class ShipSystem;
|
||||
class ScrapSystem;
|
||||
class WaveSystem;
|
||||
|
||||
class Simulation
|
||||
class Simulation: public CombinedEventHandler<TracePrintRequestedEvent>
|
||||
{
|
||||
public:
|
||||
explicit Simulation(GameConfig config, unsigned int seed = 0);
|
||||
@@ -83,6 +84,8 @@ public:
|
||||
const EntityAdmin& admin() const;
|
||||
|
||||
private:
|
||||
void handleEvent(std::shared_ptr<const TracePrintRequestedEvent> event) override;
|
||||
|
||||
BuildingId allocateBuildingId(); // Strictly increasing; never returns kInvalidBuildingId.
|
||||
|
||||
// Populate HQ, player defence stations, and the first enemy station set.
|
||||
|
||||
Reference in New Issue
Block a user