From 2655efbcd34ed11776b4b64cb1832e48c9a535cf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 14 Feb 2021 00:00:09 +0000 Subject: [PATCH] hand: Fixes to track claiming and unclaiming Signed-off-by: Ian Jackson --- src/pieces.rs | 4 ++-- templates/script.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pieces.rs b/src/pieces.rs index b74f6f67..a700bef7 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -368,14 +368,14 @@ impl Piece for Hand { def_key: 'C', opname: "deactivate".to_owned(), desc: Html::lit("Deactivate hand"), - wrc: WRC::Unpredictable, + wrc: WRC::UpdateSvg, }} else { UoDescription { kind: UoKind:: Piece, def_key: 'C', opname: "claim".to_owned(), desc: Html::lit("Claim this as your hand"), - wrc: WRC::Unpredictable, + wrc: WRC::UpdateSvg, }} }) } diff --git a/templates/script.ts b/templates/script.ts index d32f8c9c..4c957928 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -378,7 +378,7 @@ function some_keydown(e: KeyboardEvent) { f(uo); return; } - if (!(uo.kind == 'Global' || uo.kind == 'GlobalExtra')) + if (!(uo.kind == 'Global' || uo.kind == 'GlobalExtra' || uo.kind == 'Piece')) throw 'bad kind '+uo.kind; if (uo.wrc == 'UpdateSvg' || uo.wrc == 'Predictable') { -- 2.30.2