adventskalender/shared/js/lock.js aktualisiert
This commit is contained in:
@@ -167,13 +167,13 @@ function createDevConsole() {
|
|||||||
window.isDoorUnlocked = function (day) {
|
window.isDoorUnlocked = function (day) {
|
||||||
// wenn wir im dev sind UND es einen simulierten Tag gibt → den nehmen
|
// wenn wir im dev sind UND es einen simulierten Tag gibt → den nehmen
|
||||||
if (DEV_MODE) {
|
if (DEV_MODE) {
|
||||||
const sim = getSimulatedDay();
|
const sim = getSimulatedDay();
|
||||||
if (sim !== null) {
|
if (sim !== null) {
|
||||||
return parseInt(day, 10) <= sim;
|
return parseInt(day, 10) <= sim;
|
||||||
}
|
|
||||||
// wenn kein sim gesetzt, im dev alles offen
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
// Wenn kein Sim-Tag gesetzt → normale Tageslogik verwenden
|
||||||
|
return _checkDoorUnlocked(day);
|
||||||
|
}
|
||||||
|
|
||||||
// sonst normale Prüfung
|
// sonst normale Prüfung
|
||||||
return _checkDoorUnlocked(day);
|
return _checkDoorUnlocked(day);
|
||||||
|
|||||||
Reference in New Issue
Block a user