Test button for sounds and new Audio() code #630

This commit is contained in:
Daniël van Noord committed 2021-03-16 13:27:21 +01:00
1 parent b201e15c8e
commit d35217b6d5
12 files changed
+32 -12

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ export default function CheckGardenTick() {
) {
if (LastGardenNextStep !== 0 && LastGardenNextStep < Date.now()) {
Flash(3, 'GardFlash');
PlaySound(CMOptions.GardSoundURL, 'GardSound', 'GardVolume');
PlaySound(CMOptions.GardSoundURL, 'GardSound', 'GardVolume', false);
}
LastGardenNextStep = Game.Objects.Farm.minigame.nextStep;
}
+1 -1
View File
@@ -50,7 +50,7 @@ export default function CheckGoldenCookie() {
if (LastGoldenCookieState) {
if (LastSpawnedGoldenCookieState < CurrSpawnedGoldenCookieState) {
Flash(3, 'GCFlash');
PlaySound(CMOptions.GCSoundURL, 'GCSound', 'GCVolume');
PlaySound(CMOptions.GCSoundURL, 'GCSound', 'GCVolume', false);
CreateNotification(
'GCNotification',
'Golden Cookie Spawned',
+1 -1
View File
@@ -18,7 +18,7 @@ export default function CheckMagicMeter() {
else if (!LastMagicBarFull) {
LastMagicBarFull = true;
Flash(3, 'MagicFlash');
PlaySound(CMOptions.MagicSoundURL, 'MagicSound', 'MagicVolume');
PlaySound(CMOptions.MagicSoundURL, 'MagicSound', 'MagicVolume', false);
CreateNotification(
'MagicNotification',
'Magic Meter full',
+1 -1
View File
@@ -19,7 +19,7 @@ export default function CheckSeasonPopup() {
}
});
Flash(3, 'SeaFlash');
PlaySound(CMOptions.SeaSoundURL, 'SeaSound', 'SeaVolume');
PlaySound(CMOptions.SeaSoundURL, 'SeaSound', 'SeaVolume', false);
CreateNotification(
'SeaNotification',
'Reindeer sighted!',
+6 -1
View File
@@ -17,7 +17,12 @@ export default function CheckTickerFortune() {
Game.TickerEffect && Game.TickerEffect.type === 'fortune';
if (LastTickerFortuneState) {
Flash(3, 'FortuneFlash');
PlaySound(CMOptions.FortuneSoundURL, 'FortuneSound', 'FortuneVolume');
PlaySound(
CMOptions.FortuneSoundURL,
'FortuneSound',
'FortuneVolume',
false,
);
CreateNotification(
'FortuneNotification',
'Fortune Cookie found',
+2
View File
@@ -32,12 +32,14 @@ export default function CheckWrinklerCount() {
CMOptions.WrinklerMaxSoundURL,
'WrinklerMaxSound',
'WrinklerMaxVolume',
false,
);
} else {
PlaySound(
CMOptions.WrinklerSoundURL,
'WrinklerSound',
'WrinklerVolume',
false,
);
}
if (