import { MOB_TYPES } from '@airbattle/protocol' ; import { POWERUPS_ADD_PERIODIC , TIMELINE_BEFORE_GAME_START } from '../../../events' ; import { System } from '../../../server/system' ; import { PeriodicPowerupTemplate } from '../../../types' ; export default class ShieldsPeriodic extends System { constructor ( { app } ) { super ( { app } ) ; this . listeners = { [ TIMELINE_BEFORE_GAME_START ] : this . init , } ; } init ( ) { this . emit ( POWERUPS_ADD_PERIODIC , [ { interval : 90 , randomInterval : this . config . ctf . randomBaseShieldInterval , posX : - 9300 , posY : - 1480 , type : MOB_TYPES . SHIELD , } as PeriodicPowerupTemplate , { interval : 90 , randomInterval : this . config . ctf . randomBaseShieldInterval , posX : 8350 , posY : - 935 , type : MOB_TYPES . SHIELD , } as PeriodicPowerupTemplate , ] ) ; this . log . debug ( 'Periodic shields loaded.' ) ; } }