Add the proof token to the organise function, and check it in hand.
This only currently makes any difference for player labels, because
the other kinds of hand are unrotateable from load time.
Because we don't update uos on rotation, the player can try to
organise a rotated player label, but they will get an error.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-> UpdateFromOpComplex {
if let Some(r) = {
let gpc = a.gs.pieces.byid_mut(a.piece)?;
+ let rot_checked = gpc.occulter_check_unrotated(vis)?;
let rect = self.shape.outline.rect(gpc.pos)
.map_err(|CoordinateOverflow|
internal_error_bydebug(&(&gpc.pos, &self.shape)))?;
- organise::ui_operation(&mut a, opname, wrc, &rect)?
+ organise::ui_operation(&mut a, rot_checked, opname, wrc, &rect)?
} {
return r;
}
#[throws(ApiPieceOpError)]
-pub fn ui_operation(a: &mut ApiPieceOpArgs<'_>, opname: &str,
- _wrc: WhatResponseToClientOp, region: &Rect)
+pub fn ui_operation(a: &mut ApiPieceOpArgs<'_>, _: OcculterRotationChecked,
+ opname: &str, _wrc: WhatResponseToClientOp, region: &Rect)
-> Option<UpdateFromOpComplex> {
let do_sort = match opname {
"organise" => false,