misuzu/assets/misuzu.js/events/events.js

16 lines
357 B
JavaScript
Raw Normal View History

2024-01-24 21:53:26 +00:00
const MszSeasonalEvents = function() {
const events = [];
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
};