From 783f43d7fcefb3c04da1da563416992f6ab47304 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 16 Apr 2022 00:12:55 +0100 Subject: [PATCH] flip: Use description after flip, not before This makes the log messages about dice true. Signed-off-by: Ian Jackson --- daemon/api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/api.rs b/daemon/api.rs index 27462cf2..2e9d0c66 100644 --- a/daemon/api.rs +++ b/daemon/api.rs @@ -597,12 +597,12 @@ api_route!{ ("flip", wrc@ WRC::UpdateSvg) => { let nfaces = ipc.show(y).nfaces(); + gpc.face = ((RawFaceId::from(gpc.face) + 1) % nfaces).into(); + // todo: name the most visible aspect in the log ? let logents = log_did_to_piece( ioccults,&gs.occults,gpl,gpc,ipc, "flipped" )?; - // todo: name the most visible aspect in the log - gpc.face = ((RawFaceId::from(gpc.face) + 1) % nfaces).into(); return (( wrc, PieceUpdateOp::Modify(()), -- 2.30.2