Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord
2021-03-14 00:41:14 +01:00
committed by GitHub
parent bb34bce9a5
commit 1bffb58782
163 changed files with 7369 additions and 10882 deletions

View File

@@ -0,0 +1,19 @@
import Flash from '../../Disp/Notifications/Flash';
import Notification from '../../Disp/Notifications/Notification';
import PlaySound from '../../Disp/Notifications/Sound';
import { LastTickerFortuneState } from '../VariablesAndData';
/**
* This function checks if there is a fortune cookie on the ticker
* It is called by CM.Main.Loop
*/
export default function CheckTickerFortune() {
if (LastTickerFortuneState !== (Game.TickerEffect && Game.TickerEffect.type === 'fortune')) {
LastTickerFortuneState = (Game.TickerEffect && Game.TickerEffect.type === 'fortune');
if (LastTickerFortuneState) {
Flash(3, 'FortuneFlash');
PlaySound(CM.Options.FortuneSoundURL, 'FortuneSound', 'FortuneVolume');
Notification('FortuneNotification', 'Fortune Cookie found', 'A Fortune Cookie has appeared on the Ticker.');
}
}
}