Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
// xxx prevent addpiece and removepiece in places that would be occulted
// xxx this means this only happens on ungrab I think ?
-// xxx prevent occultation scrambling of grasped things
#[throws(InternalError)]
fn recalculate_occultation_general<
for (notch, nr) in occ.notches.table.iter_enumerated() {
let piece = if let Some(p) = nr.piece() { p } else { continue };
+ let gpc = if let Some(gpc) = gpieces.get(piece) { gpc }else{ continue };
+ if gpc.held.is_some() { continue }
let occilk = (|| Some(ipieces.get(piece)?.occilk.as_ref()?))();
let occilk = if let Some(o) = occilk { *o.borrow() } else {
error!("{}", internal_error_bydebug(&(occid, &occ, &nr, piece)));