2024-01-24 21:53:26 +00:00
|
|
|
const MszSeasonalEvents = function() {
|
|
|
|
const events = [];
|
2023-07-17 14:37:39 +00:00
|
|
|
|
2024-01-24 21:53:26 +00:00
|
|
|
return {
|
|
|
|
add: eventInfo => {
|
|
|
|
if(!events.includes(eventInfo))
|
|
|
|
events.push(eventInfo);
|
|
|
|
},
|
|
|
|
dispatch: () => {
|
|
|
|
for(const info of events)
|
|
|
|
if(info.isActive())
|
|
|
|
info.dispatch();
|
|
|
|
},
|
|
|
|
};
|
2022-09-13 13:14:49 +00:00
|
|
|
};
|