From 41d3ead1d53bdc4b6e824b3b0520188aa1ee6bdd Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Sun, 1 Nov 2026 17:58:34 +0100 Subject: [PATCH] Default Vanuatu to 2D and shorten automatic retrieval setting --- README.md | 2 +- scripts/publish-beta.mjs | 2 +- scripts/release-preferences.mjs | 2 +- test/release-preferences.test.js | 2 +- viewer/localization/da.json | 2 +- viewer/localization/de.json | 2 +- viewer/localization/el.json | 2 +- viewer/localization/en.json | 2 +- viewer/localization/fa.json | 2 +- viewer/localization/fr.json | 2 +- viewer/localization/hi.json | 2 +- viewer/localization/it.json | 2 +- viewer/localization/ko.json | 2 +- viewer/localization/nl.json | 2 +- viewer/localization/pl.json | 2 +- viewer/localization/pt-BR.json | 2 +- viewer/localization/ro.json | 2 +- viewer/localization/ru.json | 2 +- viewer/localization/vi.json | 2 +- viewer/localization/zh-CN.json | 2 +- viewer/localization/zh-TW.json | 2 +- viewer/ui.js | 7 ++++--- 22 files changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index e413f89..e612fa7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The repository is public; the game is listed on BGS as a beta. Supplied artwork Node 24+, pnpm. `pnpm install`, `pnpm build`, `pnpm dev` (port 5246). `pnpm test` runs rules tests; install the browser once with `pnpm exec playwright install chromium`; `pnpm test:browser` checks the viewer. -BGS supplies the shared `colorBlind` and `sound` preferences. Color-blind mode adds player symbols and K/C/B resource labels; game sounds give a quiet confirmation after successful moves. The toggles in Rules & help update the same BGS account settings. Standalone practice stores its own preferences locally. The 2D/3D switch saves the `mapView` preference through BGS; 3D is the default, with a 2D fallback when WebGL is unavailable. Motion follows the browser’s reduced-motion setting. +BGS supplies the shared `colorBlind` and `sound` preferences. Color-blind mode adds player symbols and K/C/B resource labels; game sounds give a quiet confirmation after successful moves. The toggles in Rules & help update the same BGS account settings. Standalone practice stores its own preferences locally. The 2D/3D switch saves the `mapView` preference through BGS; 2D is the default, and an explicitly saved 3D choice is restored when WebGL is available. Motion follows the browser’s reduced-motion setting. Marker retrieval is manual by default, including the last unusable action stack. Each player can opt into automatic retrieval when retrieving one stack is the only available move in Rules & help; this setting is saved separately for each game. Automatic retrieval never skips optional treasure exchanges or chooses between multiple stacks. Guided lessons always use manual retrieval. diff --git a/scripts/publish-beta.mjs b/scripts/publish-beta.mjs index 805789f..a130479 100644 --- a/scripts/publish-beta.mjs +++ b/scripts/publish-beta.mjs @@ -59,7 +59,7 @@ const defaults = { settings: [ { name: "autoRetrieve", - label: "Automatically retrieve markers when there is no choice", + label: "Auto-retrieve when forced", type: "checkbox", default: false, }, diff --git a/scripts/release-preferences.mjs b/scripts/release-preferences.mjs index f3b8415..177062a 100644 --- a/scripts/release-preferences.mjs +++ b/scripts/release-preferences.mjs @@ -2,7 +2,7 @@ export const mapViewPreference = { name: "mapView", label: "2D / 3D", type: "select", - default: "3d", + default: "2d", items: [ { name: "2d", label: "2D" }, { name: "3d", label: "3D" }, diff --git a/test/release-preferences.test.js b/test/release-preferences.test.js index 3743be3..f0ecb61 100644 --- a/test/release-preferences.test.js +++ b/test/release-preferences.test.js @@ -15,7 +15,7 @@ test("release replaces animation preference with a persistent view selector, pre next.some((p) => p.name === "animations"), false, ); - assert.equal(next.at(-1).default, "3d"); + assert.equal(next.at(-1).default, "2d"); assert.deepEqual( next.at(-1).items.map((p) => p.name), ["2d", "3d"], diff --git a/viewer/localization/da.json b/viewer/localization/da.json index e7bf3f9..0d47427 100644 --- a/viewer/localization/da.json +++ b/viewer/localization/da.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Vent på din tur.", "Choose an action to take back its markers without acting.": "Vælg en handling, hvis markører du tager tilbage uden at handle.", "Undo my move": "Fortryd mit træk", - "Automatically retrieve markers when there is no choice": "Tag automatisk markører tilbage, når der ikke er noget valg", + "Auto-retrieve when forced": "Automatisk tvungen tilbagetagning", "Goods replenished": "Varer genopfyldt", "Empty goods space": "Tom vareplads", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Ved begyndelsen af hver runde udskiftes fyldte skibe. En ø uden varer får sit oprindelige udvalg igen. Hvis blot én terning er tilbage, genopfyldes intet." diff --git a/viewer/localization/de.json b/viewer/localization/de.json index fb9bb35..8c6696f 100644 --- a/viewer/localization/de.json +++ b/viewer/localization/de.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Warte, bis du am Zug bist.", "Choose an action to take back its markers without acting.": "Wähle eine Aktion, deren Marker du ohne Aktion zurücknimmst.", "Undo my move": "Zug zurücknehmen", - "Automatically retrieve markers when there is no choice": "Marker automatisch zurücknehmen, wenn es keine Wahl gibt", + "Auto-retrieve when forced": "Pflichtrücknahme automatisch", "Goods replenished": "Waren aufgefüllt", "Empty goods space": "Leerer Warenplatz", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Zu Beginn jeder Runde werden volle Schiffe ersetzt. Eine Insel ohne Waren erhält ihren ursprünglichen Warenbestand zurück. Solange auch nur ein Würfel übrig ist, wird nichts aufgefüllt." diff --git a/viewer/localization/el.json b/viewer/localization/el.json index 397706f..49d06cf 100644 --- a/viewer/localization/el.json +++ b/viewer/localization/el.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Περιμένετε τη σειρά σας.", "Choose an action to take back its markers without acting.": "Επίλεξε μια ενέργεια για να πάρεις πίσω τους δείκτες της χωρίς να την εκτελέσεις.", "Undo my move": "Αναίρεση κίνησης", - "Automatically retrieve markers when there is no choice": "Αυτόματη ανάκτηση δεικτών όταν δεν υπάρχει επιλογή", + "Auto-retrieve when forced": "Αυτόματη υποχρεωτική ανάκτηση", "Goods replenished": "Αναπλήρωση αγαθών", "Empty goods space": "Κενή θέση αγαθού", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Στην αρχή κάθε γύρου, τα γεμάτα πλοία αντικαθίστανται. Ένα νησί χωρίς κανένα αγαθό λαμβάνει ξανά την αρχική του συλλογή. Αν απομένει έστω ένας κύβος, δεν αναπληρώνεται τίποτα." diff --git a/viewer/localization/en.json b/viewer/localization/en.json index aee4ab2..499f86a 100644 --- a/viewer/localization/en.json +++ b/viewer/localization/en.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Wait for your turn.", "Choose an action to take back its markers without acting.": "Choose an action to take back its markers without acting.", "Undo my move": "Undo my move", - "Automatically retrieve markers when there is no choice": "Automatically retrieve markers when there is no choice", + "Auto-retrieve when forced": "Auto-retrieve when forced", "Goods replenished": "Goods replenished", "Empty goods space": "Empty goods space", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished." diff --git a/viewer/localization/fa.json b/viewer/localization/fa.json index 170b7ed..e291e21 100644 --- a/viewer/localization/fa.json +++ b/viewer/localization/fa.json @@ -948,7 +948,7 @@ "Wait for your turn.": "منتظر نوبت خود باشید.", "Choose an action to take back its markers without acting.": "اقدامی را انتخاب کنید تا مهره‌هایش را بدون انجام آن پس بگیرید.", "Undo my move": "بازگرداندن حرکت", - "Automatically retrieve markers when there is no choice": "پس‌گرفتن خودکار نشانگرها وقتی انتخابی وجود ندارد", + "Auto-retrieve when forced": "بازگشت خودکار در حالت اجباری", "Goods replenished": "کالاها دوباره تأمین شدند", "Empty goods space": "جای خالی کالا", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "در آغاز هر دور، کشتی‌های تکمیل‌شده جایگزین می‌شوند. جزیره‌ای که هیچ کالایی در آن نمانده، دوباره مجموعهٔ اولیهٔ کالاهایش را دریافت می‌کند. اگر حتی یک مکعب باقی مانده باشد، هیچ کالایی اضافه نمی‌شود." diff --git a/viewer/localization/fr.json b/viewer/localization/fr.json index 35c2302..3a20fec 100644 --- a/viewer/localization/fr.json +++ b/viewer/localization/fr.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Attendez votre tour.", "Choose an action to take back its markers without acting.": "Choisissez une action dont vous reprenez les marqueurs sans agir.", "Undo my move": "Annuler mon coup", - "Automatically retrieve markers when there is no choice": "Reprendre automatiquement les marqueurs lorsqu'il n'y a pas de choix", + "Auto-retrieve when forced": "Retrait auto si forcé", "Goods replenished": "Marchandises réapprovisionnées", "Empty goods space": "Emplacement de marchandise vide", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Au début de chaque manche, les navires complets sont remplacés. Une île sans aucune marchandise retrouve son assortiment initial. S’il reste ne serait-ce qu’un cube, rien n’est réapprovisionné." diff --git a/viewer/localization/hi.json b/viewer/localization/hi.json index 91b6b5b..7cf612d 100644 --- a/viewer/localization/hi.json +++ b/viewer/localization/hi.json @@ -948,7 +948,7 @@ "Wait for your turn.": "अपनी बारी का इंतज़ार करें।", "Choose an action to take back its markers without acting.": "एक कार्रवाई चुनें जिसके मार्कर आप बिना कार्रवाई किए वापस लेंगे।", "Undo my move": "अपनी चाल वापस लें", - "Automatically retrieve markers when there is no choice": "कोई विकल्प न होने पर मार्कर अपने-आप वापस लें", + "Auto-retrieve when forced": "अनिवार्य वापसी अपने-आप", "Goods replenished": "माल फिर भरा गया", "Empty goods space": "माल की खाली जगह", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "हर दौर की शुरुआत में भरे हुए जहाज़ बदल दिए जाते हैं। जिस द्वीप पर कोई माल नहीं बचा है, वहाँ शुरुआती माल फिर रख दिया जाता है। अगर एक भी घन बचा हो, तो कोई माल नहीं भरा जाता।" diff --git a/viewer/localization/it.json b/viewer/localization/it.json index e094bce..9b0ada3 100644 --- a/viewer/localization/it.json +++ b/viewer/localization/it.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Attendi il tuo turno.", "Choose an action to take back its markers without acting.": "Scegli un’azione di cui riprendere i segnalini senza agire.", "Undo my move": "Annulla la mossa", - "Automatically retrieve markers when there is no choice": "Ritirare automaticamente i segnalini quando non c'è scelta", + "Auto-retrieve when forced": "Ritiro automatico se obbligato", "Goods replenished": "Merci rifornite", "Empty goods space": "Spazio merce vuoto", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "All’inizio di ogni round, le navi complete vengono sostituite. Un’isola senza più merci riceve nuovamente il suo assortimento iniziale. Se rimane anche un solo cubetto, non viene rifornito nulla." diff --git a/viewer/localization/ko.json b/viewer/localization/ko.json index ab4a1a5..5235d87 100644 --- a/viewer/localization/ko.json +++ b/viewer/localization/ko.json @@ -948,7 +948,7 @@ "Wait for your turn.": "차례를 기다리세요.", "Choose an action to take back its markers without acting.": "행동하지 않고 마커를 회수할 행동을 선택하세요.", "Undo my move": "내 수 되돌리기", - "Automatically retrieve markers when there is no choice": "선택의 여지가 없을 때 마커 자동 회수", + "Auto-retrieve when forced": "강제 회수 자동화", "Goods replenished": "상품 보충", "Empty goods space": "빈 상품 자리", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "매 라운드 시작 시 가득 찬 배를 교체합니다. 상품이 하나도 남지 않은 섬은 처음의 상품 구성을 다시 받습니다. 큐브가 하나라도 남아 있으면 보충하지 않습니다." diff --git a/viewer/localization/nl.json b/viewer/localization/nl.json index 29fdf37..c0167ec 100644 --- a/viewer/localization/nl.json +++ b/viewer/localization/nl.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Wacht op je beurt.", "Choose an action to take back its markers without acting.": "Kies een actie waarvan je de markers zonder actie terugneemt.", "Undo my move": "Zet ongedaan maken", - "Automatically retrieve markers when there is no choice": "Markeringen automatisch terugnemen als er geen keuze is", + "Auto-retrieve when forced": "Verplicht terugnemen automatisch", "Goods replenished": "Goederen aangevuld", "Empty goods space": "Lege goederenplek", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Aan het begin van elke ronde worden volle schepen vervangen. Een eiland zonder goederen krijgt zijn oorspronkelijke assortiment terug. Als er ook maar één blokje over is, wordt niets aangevuld." diff --git a/viewer/localization/pl.json b/viewer/localization/pl.json index fed94bc..509a69b 100644 --- a/viewer/localization/pl.json +++ b/viewer/localization/pl.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Poczekaj na swoją turę.", "Choose an action to take back its markers without acting.": "Wybierz akcję, z której zabierasz znaczniki bez jej wykonywania.", "Undo my move": "Cofnij ruch", - "Automatically retrieve markers when there is no choice": "Automatycznie zabieraj znaczniki, gdy nie ma wyboru", + "Auto-retrieve when forced": "Automatyczne wymuszone wycofanie", "Goods replenished": "Uzupełniono towary", "Empty goods space": "Puste miejsce na towar", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Na początku każdej rundy pełne statki są zastępowane nowymi. Wyspa, na której nie ma już żadnych towarów, odzyskuje swój początkowy zestaw. Jeśli pozostała choć jedna kostka, niczego się nie uzupełnia." diff --git a/viewer/localization/pt-BR.json b/viewer/localization/pt-BR.json index a965bfb..a412135 100644 --- a/viewer/localization/pt-BR.json +++ b/viewer/localization/pt-BR.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Aguarde sua vez.", "Choose an action to take back its markers without acting.": "Escolha uma ação para recolher os marcadores dela sem agir.", "Undo my move": "Desfazer jogada", - "Automatically retrieve markers when there is no choice": "Recolher marcadores automaticamente quando não há escolha", + "Auto-retrieve when forced": "Recolher automaticamente se obrigatório", "Goods replenished": "Mercadorias reabastecidas", "Empty goods space": "Espaço vazio de mercadoria", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "No início de cada rodada, os navios completos são substituídos. Uma ilha sem nenhuma mercadoria recebe novamente seu conjunto original. Se restar um único cubo, nada é reabastecido." diff --git a/viewer/localization/ro.json b/viewer/localization/ro.json index 6e6dfe5..ec34936 100644 --- a/viewer/localization/ro.json +++ b/viewer/localization/ro.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Așteaptă-ți rândul.", "Choose an action to take back its markers without acting.": "Alege o acțiune ale cărei marcaje le retragi fără a acționa.", "Undo my move": "Anulează mutarea", - "Automatically retrieve markers when there is no choice": "Retrage automat marcatorii când nu există altă opțiune", + "Auto-retrieve when forced": "Retragere forțată automată", "Goods replenished": "Mărfuri reaprovizionate", "Empty goods space": "Loc gol pentru marfă", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "La începutul fiecărei runde, navele complete sunt înlocuite. O insulă fără nicio marfă primește din nou sortimentul inițial. Dacă a rămas chiar și un singur cub, nu se reaprovizionează nimic." diff --git a/viewer/localization/ru.json b/viewer/localization/ru.json index 158b96c..e564d33 100644 --- a/viewer/localization/ru.json +++ b/viewer/localization/ru.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Дождитесь своего хода.", "Choose an action to take back its markers without acting.": "Выберите действие, маркеры которого вы заберёте без выполнения действия.", "Undo my move": "Отменить ход", - "Automatically retrieve markers when there is no choice": "Автоматически забирать маркеры, когда нет выбора", + "Auto-retrieve when forced": "Автовозврат без выбора", "Goods replenished": "Товары пополнены", "Empty goods space": "Пустое место для товара", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "В начале каждого раунда заполненные корабли заменяются. Остров, на котором не осталось товаров, снова получает исходный набор. Если остался хотя бы один кубик, товары не пополняются." diff --git a/viewer/localization/vi.json b/viewer/localization/vi.json index ef996d5..28768b4 100644 --- a/viewer/localization/vi.json +++ b/viewer/localization/vi.json @@ -948,7 +948,7 @@ "Wait for your turn.": "Hãy chờ đến lượt bạn.", "Choose an action to take back its markers without acting.": "Chọn một hành động để thu hồi dấu của nó mà không thực hiện hành động.", "Undo my move": "Hoàn tác nước đi", - "Automatically retrieve markers when there is no choice": "Tự động thu hồi dấu khi không có lựa chọn", + "Auto-retrieve when forced": "Tự thu hồi khi bắt buộc", "Goods replenished": "Đã bổ sung hàng hóa", "Empty goods space": "Ô hàng hóa trống", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "Ở đầu mỗi vòng, các tàu đã đầy được thay thế. Một đảo không còn hàng hóa nào sẽ được bổ sung lại đúng loại và số lượng ban đầu. Nếu vẫn còn dù chỉ một khối, sẽ không bổ sung gì." diff --git a/viewer/localization/zh-CN.json b/viewer/localization/zh-CN.json index 6fe712c..2ced05d 100644 --- a/viewer/localization/zh-CN.json +++ b/viewer/localization/zh-CN.json @@ -948,7 +948,7 @@ "Wait for your turn.": "请等待你的回合。", "Choose an action to take back its markers without acting.": "选择一个行动,收回其标记而不执行。", "Undo my move": "撤销我的行动", - "Automatically retrieve markers when there is no choice": "没有选择时自动收回标记", + "Auto-retrieve when forced": "强制收回时自动执行", "Goods replenished": "货物已补充", "Empty goods space": "空货物格", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "每轮开始时,已装满的船会被替换。完全没有货物的岛屿会重新补上原本的货物组合。只要还剩一颗方块,就不会补充任何货物。" diff --git a/viewer/localization/zh-TW.json b/viewer/localization/zh-TW.json index 28044c8..26e3a8a 100644 --- a/viewer/localization/zh-TW.json +++ b/viewer/localization/zh-TW.json @@ -948,7 +948,7 @@ "Wait for your turn.": "請等待輪到你。", "Choose an action to take back its markers without acting.": "選擇一個行動,收回其標記但不執行行動。", "Undo my move": "撤回我的行動", - "Automatically retrieve markers when there is no choice": "無其他選擇時自動收回標記", + "Auto-retrieve when forced": "強制收回時自動執行", "Goods replenished": "貨物已補充", "Empty goods space": "空貨物格", "At the start of each round, completed ships are replaced. An island with no goods left receives its original assortment again. If even one cube remains, none are replenished.": "每輪開始時,已裝滿的船會被替換。完全沒有貨物的島嶼會重新補上原本的貨物組合。只要還剩一顆方塊,就不會補充任何貨物。" diff --git a/viewer/ui.js b/viewer/ui.js index 279cc43..2565ced 100644 --- a/viewer/ui.js +++ b/viewer/ui.js @@ -113,11 +113,12 @@ export function mountGame(target, options = {}) { focusReturn; let board3D, threeUnavailable = false, - mapView = "3d", + mapView = "2d", mapLive = false, journalCells = []; try { - if (localStorage.getItem("vanuatu-map-view") === "2d") mapView = "2d"; + const savedView = localStorage.getItem("vanuatu-map-view"); + if (savedView === "2d" || savedView === "3d") mapView = savedView; } catch {} root.dataset.mapView = mapView; const patch = createRenderer( @@ -983,7 +984,7 @@ export function mountGame(target, options = {}) { } if ("help" in d) { showDialog( - `

${t("help")}

${options.onSetting && Number.isInteger(player) && !analysis ? `` : ""}${ + `

${t("help")}

${options.onSetting && Number.isInteger(player) && !analysis ? `` : ""}${ hostedLocale ? "" : `