diff --git a/src/Main/CheckStates/Garden.js b/src/Main/CheckStates/Garden.js index 628754c..0ae5822 100644 --- a/src/Main/CheckStates/Garden.js +++ b/src/Main/CheckStates/Garden.js @@ -1,5 +1,4 @@ -import Flash from '../../Disp/Notifications/Flash'; -import PlaySound from '../../Disp/Notifications/Sound'; +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { LastGardenNextStep } from '../VariablesAndData'; /** @@ -11,8 +10,9 @@ export default function CheckGardenTick() { LastGardenNextStep !== Game.Objects.Farm.minigame.nextStep ) { if (LastGardenNextStep !== 0 && LastGardenNextStep < Date.now()) { - Flash(3, 'GardFlash', false); - PlaySound( + nF.createFlash('cookieMonsterMod', 3, 'GardFlash', false); + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.GardSoundURL, 'GardSound', 'GardVolume', diff --git a/src/Main/CheckStates/GoldenCookie.js b/src/Main/CheckStates/GoldenCookie.js index da0f180..df85757 100644 --- a/src/Main/CheckStates/GoldenCookie.js +++ b/src/Main/CheckStates/GoldenCookie.js @@ -1,8 +1,6 @@ +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { CacheSpawnedGoldenShimmer, CacheGoldenShimmersByID } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars import CreateGCTimer from '../../Disp/GoldenCookieTimers/GoldenCookieTimers'; -import Flash from '../../Disp/Notifications/Flash'; -import CreateNotification from '../../Disp/Notifications/Notification'; -import PlaySound from '../../Disp/Notifications/Sound'; import { UpdateFavicon } from '../../Disp/TabTitle/FavIcon'; import { GCTimers } from '../../Disp/VariablesAndData'; import { @@ -44,14 +42,16 @@ export default function CheckGoldenCookie() { LastGoldenCookieState = Game.shimmerTypes.golden.n; if (LastGoldenCookieState) { if (LastSpawnedGoldenCookieState < CurrSpawnedGoldenCookieState) { - Flash(3, 'GCFlash', false); - PlaySound( + nF.createFlash('cookieMonsterMod', 3, 'GCFlash', false); + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.GCSoundURL, 'GCSound', 'GCVolume', false, ); - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'GCNotification', 'Golden Cookie Spawned', 'A Golden Cookie has spawned. Click it now!', diff --git a/src/Main/CheckStates/Grimoire.js b/src/Main/CheckStates/Grimoire.js index af0f496..225b6cd 100644 --- a/src/Main/CheckStates/Grimoire.js +++ b/src/Main/CheckStates/Grimoire.js @@ -1,6 +1,4 @@ -import Flash from '../../Disp/Notifications/Flash'; -import CreateNotification from '../../Disp/Notifications/Notification'; -import PlaySound from '../../Disp/Notifications/Sound'; +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { LastMagicBarFull } from '../VariablesAndData'; /** @@ -16,14 +14,16 @@ export default function CheckMagicMeter() { if (minigame.magic < minigame.magicM) LastMagicBarFull = false; else if (!LastMagicBarFull) { LastMagicBarFull = true; - Flash(3, 'MagicFlash', false); - PlaySound( + nF.createFlash('cookieMonsterMod', 3, 'MagicFlash', false); + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.MagicSoundURL, 'MagicSound', 'MagicVolume', false, ); - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'MagicNotification', 'Magic Meter full', 'Your Magic Meter is full. Cast a spell!', diff --git a/src/Main/CheckStates/Season.js b/src/Main/CheckStates/Season.js index 211d149..3134a88 100644 --- a/src/Main/CheckStates/Season.js +++ b/src/Main/CheckStates/Season.js @@ -1,7 +1,5 @@ +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars -import Flash from '../../Disp/Notifications/Flash'; -import CreateNotification from '../../Disp/Notifications/Notification'; -import PlaySound from '../../Disp/Notifications/Sound'; import { LastSeasonPopupState } from '../VariablesAndData'; /** @@ -16,14 +14,16 @@ export default function CheckSeasonPopup() { CacheSeasonPopShimmer = Game.shimmers[i]; } }); - Flash(3, 'SeaFlash', false); - PlaySound( + nF.createFlash('cookieMonsterMod', 3, 'SeaFlash', false); + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.SeaSoundURL, 'SeaSound', 'SeaVolume', false, ); - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'SeaNotification', 'Reindeer sighted!', 'A Reindeer has spawned. Click it now!', diff --git a/src/Main/CheckStates/Ticker.js b/src/Main/CheckStates/Ticker.js index 7263cdb..d58d6cd 100644 --- a/src/Main/CheckStates/Ticker.js +++ b/src/Main/CheckStates/Ticker.js @@ -1,6 +1,4 @@ -import Flash from '../../Disp/Notifications/Flash'; -import CreateNotification from '../../Disp/Notifications/Notification'; -import PlaySound from '../../Disp/Notifications/Sound'; +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { LastTickerFortuneState } from '../VariablesAndData'; /** @@ -11,14 +9,16 @@ export default function CheckTickerFortune() { if (LastTickerFortuneState !== (Game.TickerEffect && Game.TickerEffect.type === 'fortune')) { LastTickerFortuneState = Game.TickerEffect && Game.TickerEffect.type === 'fortune'; if (LastTickerFortuneState) { - Flash(3, 'FortuneFlash', false); - PlaySound( + nF.createFlash('cookieMonsterMod', 3, 'FortuneFlash', false); + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.FortuneSoundURL, 'FortuneSound', 'FortuneVolume', false, ); - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'FortuneNotification', 'Fortune Cookie found', 'A Fortune Cookie has appeared on the Ticker.', diff --git a/src/Main/CheckStates/Wrinkler.js b/src/Main/CheckStates/Wrinkler.js index 03aa814..55274de 100644 --- a/src/Main/CheckStates/Wrinkler.js +++ b/src/Main/CheckStates/Wrinkler.js @@ -1,6 +1,4 @@ -import Flash from '../../Disp/Notifications/Flash'; -import CreateNotification from '../../Disp/Notifications/Notification'; -import PlaySound from '../../Disp/Notifications/Sound'; +import { notificationsFunctions as nF } from '@cookiemonsterteam/cookiemonsterframework/src/index'; import { LastWrinklerCount } from '../VariablesAndData'; /** @@ -19,22 +17,24 @@ export default function CheckWrinklerCount() { CurrentWrinklers === Game.getWrinklersMax() && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerMaxFlash ) { - Flash(3, 'WrinklerMaxFlash', false); + nF.createFlash('cookieMonsterMod', 3, 'WrinklerMaxFlash', false); } else { - Flash(3, 'WrinklerFlash', false); + nF.createFlash('cookieMonsterMod', 3, 'WrinklerFlash', false); } if ( CurrentWrinklers === Game.getWrinklersMax() && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerMaxSound ) { - PlaySound( + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerMaxSoundURL, 'WrinklerMaxSound', 'WrinklerMaxVolume', false, ); } else { - PlaySound( + nF.playCMSound( + 'cookieMonsterMod', Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerSoundURL, 'WrinklerSound', 'WrinklerVolume', @@ -45,13 +45,15 @@ export default function CheckWrinklerCount() { CurrentWrinklers === Game.getWrinklersMax() && Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.WrinklerMaxNotification ) { - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'WrinklerMaxNotification', 'Maximum Wrinklers Reached', 'You have reached your maximum ammount of wrinklers', ); } else { - CreateNotification( + nF.createNotification( + 'cookieMonsterMod', 'WrinklerNotification', 'A Wrinkler appeared', 'A new wrinkler has appeared',