2024-01-24 21:53:26 +00:00
|
|
|
const MszSeasonalEvents = function() {
|
|
|
|
const events = [];
|
2023-07-15 23:58:17 +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();
|
|
|
|
},
|
|
|
|
};
|
2020-05-11 01:17:05 +00:00
|
|
|
};
|