Disable queued End turn and publish viewer 0.1.183
This commit is contained in:
parent
c84f175bbc
commit
71848d2d6c
4 changed files with 15 additions and 7 deletions
|
|
@ -639,3 +639,10 @@ The selection shows the total one-food cost; skipping or declining payment costs
|
|||
nothing. Food and gold substitution remain supported. Previously pending payments
|
||||
continue into an army selection. Includes a restartable local preview and six
|
||||
regressions covering selection, payment, cancellation, and old pending payments.
|
||||
|
||||
## Viewer 0.1.183
|
||||
|
||||
Disable End turn and remove its ready highlight once End turn is queued while
|
||||
waiting for another player's choice. Close any end-turn confirmation in that
|
||||
state. Undo remains available to remove the queued End turn and enable it again.
|
||||
No engine update required.
|
||||
|
|
|
|||
4
web-client/package-lock.json
generated
4
web-client/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.182",
|
||||
"version": "0.1.183",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.182",
|
||||
"version": "0.1.183",
|
||||
"dependencies": {
|
||||
"@boardgamers/protocol": "0.9.0",
|
||||
"lucide-svelte": "^0.577.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.182",
|
||||
"version": "0.1.183",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -306,10 +306,11 @@
|
|||
};
|
||||
let mapPositions = $derived(new Set($session.game?.map.tiles.map(([position]) => position) ?? []));
|
||||
let totalActions = $derived($session.game?.actions_left ?? 0);
|
||||
let readyToEnd = $derived(!!$session.view?.canEndTurn && totalActions === 0);
|
||||
const canEndTurn = $derived(!!$session.view?.canEndTurn && !(planningQueue && queueControls?.ended));
|
||||
let readyToEnd = $derived(canEndTurn && totalActions === 0);
|
||||
const tradeWarning = $derived($session.view?.endTurnTradeWarning);
|
||||
$effect(() => {
|
||||
if (!$session.view?.canEndTurn) confirmEnd = false;
|
||||
if (!canEndTurn) confirmEnd = false;
|
||||
});
|
||||
let collectAvailable = $derived($session.view?.cities.some((c) => !c.reason && c.choices.length > 0));
|
||||
let researchAvailable = $derived($session.view?.advances.some((a) => !!a.action));
|
||||
|
|
@ -1478,7 +1479,7 @@
|
|||
title="End turn"
|
||||
data-tutorial="end"
|
||||
aria-label="End turn"
|
||||
disabled={!!$session.playback || !$session.view?.canEndTurn || $session.pending}
|
||||
disabled={!!$session.playback || !canEndTurn || $session.pending}
|
||||
onclick={() => {
|
||||
controller.closeActivity();
|
||||
controller.patch({ mode: 'overview', tilePanel: false });
|
||||
|
|
@ -1874,7 +1875,7 @@
|
|||
<div class="end-confirm">
|
||||
<button class="secondary" onclick={() => (confirmEnd = false)}>Keep playing</button><button
|
||||
class="primary"
|
||||
disabled={$session.pending || !$session.view?.canEndTurn}
|
||||
disabled={$session.pending || !canEndTurn}
|
||||
onclick={() => {
|
||||
confirmEnd = false;
|
||||
controller.submit({ Playing: 'EndTurn' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue