Complete overhaul of code structure and relevant files (#639)
This commit is contained in:
17
src/Main/CheckStates/Garden.js
Normal file
17
src/Main/CheckStates/Garden.js
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user