drop the now-dead payloads from the sim-backed state-change events
TickAdvanced, BuildingBlocksChanged, ExpansionCostChanged, BossWaveUpdated and ArtifactCountChanged all duplicated state the Simulation already owns. With every subscriber re-reading from the sim, the fields had no readers left, so the five events become payload-free refresh signals and the emitters keep the values only as locals for change detection. This makes the convention uniform: a state-change event backed by the simulation carries nothing. Events whose state lives in the view (selection, game speed, deconstruct and debug-draw modes) keep their payloads, since there is no sim getter behind them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHcUerKAZKWNvSKJxYKbnG
This commit is contained in:
@@ -2,16 +2,11 @@
|
||||
#define BOSS_WAVE_UPDATED_EVENT_H
|
||||
|
||||
#include "Event.h"
|
||||
#include "Tick.h"
|
||||
|
||||
// Fired when the boss wave counter or its countdown changes. Carries no payload —
|
||||
// subscribers re-read Simulation::getBossWaveCounter() and getBossCountdownTicks().
|
||||
class BossWaveUpdatedEvent : public Event
|
||||
{
|
||||
public:
|
||||
BossWaveUpdatedEvent(int counter, Tick countdownTicks)
|
||||
: counter(counter), countdownTicks(countdownTicks) {}
|
||||
const int counter;
|
||||
const Tick countdownTicks;
|
||||
};
|
||||
|
||||
#endif // BOSS_WAVE_UPDATED_EVENT_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user