Use Framework notifications
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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!',
|
||||
|
||||
@@ -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!',
|
||||
|
||||
@@ -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!',
|
||||
|
||||
@@ -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.',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user