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,17 @@
import { CMOptions } from '../../Config/VariablesAndData';
import Flash from '../../Disp/Notifications/Flash';
import PlaySound from '../../Disp/Notifications/Sound';
import { LastGardenNextStep } from '../VariablesAndData';
/**
* This function checks if a garden tick has happened
*/
export default function CheckGardenTick() {
if (Game.Objects.Farm.minigameLoaded && LastGardenNextStep !== Game.Objects.Farm.minigame.nextStep) {
if (LastGardenNextStep !== 0 && LastGardenNextStep < Date.now()) {
Flash(3, 'GardFlash');
PlaySound(CMOptions.GardSoundURL, 'GardSound', 'GardVolume');
}
LastGardenNextStep = Game.Objects.Farm.minigame.nextStep;
}
}