adventskalender/shared/js/lock.js aktualisiert
This commit is contained in:
@@ -165,7 +165,7 @@ function createDevConsole() {
|
|||||||
// GLOBALER Export für door-open.js
|
// GLOBALER Export für door-open.js
|
||||||
// ===============================
|
// ===============================
|
||||||
window.isDoorUnlocked = function (day) {
|
window.isDoorUnlocked = function (day) {
|
||||||
// wenn wir im dev sind UND es einen simulierten Tag gibt → den nehmen
|
const unlocked = (() => {
|
||||||
if (DEV_MODE) {
|
if (DEV_MODE) {
|
||||||
const sim = getSimulatedDay();
|
const sim = getSimulatedDay();
|
||||||
if (sim !== null) {
|
if (sim !== null) {
|
||||||
@@ -173,10 +173,16 @@ window.isDoorUnlocked = function (day) {
|
|||||||
}
|
}
|
||||||
// Wenn kein Sim-Tag gesetzt → normale Tageslogik verwenden
|
// Wenn kein Sim-Tag gesetzt → normale Tageslogik verwenden
|
||||||
return _checkDoorUnlocked(day);
|
return _checkDoorUnlocked(day);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sonst normale Prüfung
|
|
||||||
return _checkDoorUnlocked(day);
|
return _checkDoorUnlocked(day);
|
||||||
|
})();
|
||||||
|
|
||||||
|
// Wenn gesperrt, Popup anzeigen (falls vorhanden)
|
||||||
|
if (!unlocked && typeof window.showLockedPopup === "function") {
|
||||||
|
window.showLockedPopup(day);
|
||||||
|
}
|
||||||
|
|
||||||
|
return unlocked;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Dev-Konsole nur anzeigen, wenn ?dev
|
// Dev-Konsole nur anzeigen, wenn ?dev
|
||||||
|
|||||||
Reference in New Issue
Block a user