Skip to content

Commit

Permalink
strengthen pastagang
Browse files Browse the repository at this point in the history
  • Loading branch information
TodePond committed Mar 1, 2025
1 parent c063506 commit cb2d1bd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { nudelAlert } from './alert.js';
import { nudelConfirm } from './confirm.js';
import { clearStrudelHighlights, Frame, pastamirror } from './main.js';
import { getRandomName } from './random.js';
Expand Down Expand Up @@ -191,6 +192,17 @@ export async function applySettingsToNudel(settings = getSettings()) {
if (confirmed) window.location.reload();
else next.workerTimers2 = previous.workerTimers2;
}

if (isSettingChanged('customRoomEnabled', diff)) {
if (next.customRoomEnabled) {
const confirmed = await nudelConfirm(
`You're leaving the jam. Every time you do this, the power of pastagang fades a little bit. Are you sure you want to continue?`,
);
if (!confirmed) next.customRoomEnabled = false;
} else {
nudelAlert('Welcome home.');
}
}
}

zenModeCheckbox && (zenModeCheckbox.checked = next.zenMode);
Expand Down

0 comments on commit cb2d1bd

Please sign in to comment.