32 lines
970 B
C
32 lines
970 B
C
#pragma once
|
|
|
|
#include "Event.h"
|
|
#include "Tick.h"
|
|
|
|
#include "entt/entity/entity.hpp"
|
|
|
|
// The kind of tool that produced a beam. Used by the renderer to choose the
|
|
// beam color (REQ-SHP-FIRING-BEAM).
|
|
enum class BeamKind
|
|
{
|
|
Weapon,
|
|
Repair,
|
|
Salvage,
|
|
};
|
|
|
|
// Transient record emitted whenever a weapon fires, a repair tool starts a heal
|
|
// cycle, or a salvage module starts a collection cycle (REQ-SHP-FIRING,
|
|
// REQ-SHP-FIRING-BEAM). Buffered in a sim-owned vector during the tick, then
|
|
// drained and re-emitted via EventManager by the UI frame handler.
|
|
struct BeamFiredEvent : public Event
|
|
{
|
|
BeamFiredEvent() = default;
|
|
BeamFiredEvent(BeamKind kind, entt::entity shooter, entt::entity target, Tick emittedAt)
|
|
: kind(kind), shooter(shooter), target(target), emittedAt(emittedAt) {}
|
|
|
|
BeamKind kind = BeamKind::Weapon;
|
|
entt::entity shooter = entt::null;
|
|
entt::entity target = entt::null;
|
|
Tick emittedAt = 0;
|
|
};
|