From: Ian Jackson Date: Fri, 15 Apr 2022 23:12:55 +0000 (+0100) Subject: flip: Use description after flip, not before X-Git-Tag: otter-1.1.0~543 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=783f43d7fcefb3c04da1da563416992f6ab47304;p=otter.git flip: Use description after flip, not before This makes the log messages about dice true. Signed-off-by: Ian Jackson --- 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(()),