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
13 lines
331 B
C++
13 lines
331 B
C++
#ifndef BUILDING_BLOCKS_CHANGED_EVENT_H
|
|
#define BUILDING_BLOCKS_CHANGED_EVENT_H
|
|
|
|
#include "Event.h"
|
|
|
|
// Fired when the building block stock changes. Carries no payload — subscribers
|
|
// re-read Simulation::getBuildingBlocksStock().
|
|
class BuildingBlocksChangedEvent : public Event
|
|
{
|
|
};
|
|
|
|
#endif // BUILDING_BLOCKS_CHANGED_EVENT_H
|