From 78deecdb6c1b74abc79a73a01cb9763a115a4d3e Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Wed, 9 Jul 2025 00:20:38 -0400 Subject: [PATCH] Don't erase patterns on page load (#1383) ## Description: Even if the player does not appear to have access to a pattern, do not erase their setting. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --- src/client/TerritoryPatternsModal.ts | 5 ----- src/client/index.html | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/client/TerritoryPatternsModal.ts b/src/client/TerritoryPatternsModal.ts index 9984994cd..b7b3938a8 100644 --- a/src/client/TerritoryPatternsModal.ts +++ b/src/client/TerritoryPatternsModal.ts @@ -64,11 +64,6 @@ export class TerritoryPatternsModal extends LitElement { async onUserMe(userMeResponse: UserMeResponse | null) { this.patterns = await patterns(userMeResponse); - const p = this.patterns.find((p) => p.name === this.selectedPattern); - if (p === undefined || p.lockedReason || p.notShown) { - console.warn("selected pattern is locked or not shown, resetting"); - this.selectPattern(undefined); - } this.me = userMeResponse; this.requestUpdate(); } diff --git a/src/client/index.html b/src/client/index.html index c9b2daaa9..14e989d7b 100644 --- a/src/client/index.html +++ b/src/client/index.html @@ -184,7 +184,7 @@