chiark / gitweb /
hand: Fixes to track claiming and unclaiming
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Feb 2021 00:00:09 +0000 (00:00 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Feb 2021 16:03:30 +0000 (16:03 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/pieces.rs
templates/script.ts

index b74f6f67ece1b4e4f8edec257cc9f89aa31e8367..a700bef72cafb849774055e3e2d51c957c02137b 100644 (file)
@@ -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,
       }}
     })
   }
index d32f8c9c81bf4ceb1598571f0311cb9c45198d7d..4c95792899131689cbffc090e0237b2b2795a26b 100644 (file)
@@ -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') {