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:
@@ -3,12 +3,10 @@
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
// Fired when the building block stock changes. Carries no payload — subscribers
|
||||
// re-read Simulation::getBuildingBlocksStock().
|
||||
class BuildingBlocksChangedEvent : public Event
|
||||
{
|
||||
public:
|
||||
explicit BuildingBlocksChangedEvent(int blocks) : blocks(blocks) {}
|
||||
const int blocks;
|
||||
};
|
||||
|
||||
#endif // BUILDING_BLOCKS_CHANGED_EVENT_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user