Added prettier (#661)

* Added prettier

* Added prettier

* Added prettier
This commit is contained in:
Daniël van Noord
2021-03-14 18:57:07 +01:00
committed by GitHub
parent f3e7964262
commit 932509a877
132 changed files with 7143 additions and 4894 deletions

View File

@@ -9,17 +9,26 @@ import { isInitializing } from '../../InitSaveLoad/Variables';
* @param {string} config The setting in CM.Options that is checked before creating the flash
*/
export default function Flash(mode, config) {
// The arguments check makes the sound not play upon initialization of the mod
if ((CMOptions[config] === 1 && mode === 3 && isInitializing === false) || mode === 1) {
l('CMWhiteScreen').style.opacity = '0.5';
if (mode === 3) {
l('CMWhiteScreen').style.display = 'inline';
setTimeout(function () { Flash(2, config); }, 1000 / Game.fps);
} else {
setTimeout(function () { Flash(0, config); }, 1000 / Game.fps);
}
} else if (mode === 2) {
l('CMWhiteScreen').style.opacity = '1';
setTimeout(function () { Flash(1, config); }, 1000 / Game.fps);
} else if (mode === 0) l('CMWhiteScreen').style.display = 'none';
// The arguments check makes the sound not play upon initialization of the mod
if (
(CMOptions[config] === 1 && mode === 3 && isInitializing === false) ||
mode === 1
) {
l('CMWhiteScreen').style.opacity = '0.5';
if (mode === 3) {
l('CMWhiteScreen').style.display = 'inline';
setTimeout(function () {
Flash(2, config);
}, 1000 / Game.fps);
} else {
setTimeout(function () {
Flash(0, config);
}, 1000 / Game.fps);
}
} else if (mode === 2) {
l('CMWhiteScreen').style.opacity = '1';
setTimeout(function () {
Flash(1, config);
}, 1000 / Game.fps);
} else if (mode === 0) l('CMWhiteScreen').style.display = 'none';
}