const MszSeasonalEvents = function() { const events = []; return { add: eventInfo => { if(!events.includes(eventInfo)) events.push(eventInfo); }, dispatch: () => { for(const info of events) if(info.isActive()) info.dispatch(); }, }; };