NoClient | NoPlayer(_) | GameBeingDestroyed(_)
=> Status::NotFound,
OE::PieceHeld | OE::PieceImmoveable |
- OE::OverlappingOccultation | OE::Occultation |
+ OE::OverlappingOccultation |
BadOperation | BadJSON(_)
=> Status::BadRequest,
}
let ApiPieceOpArgs { gs,piece, .. } = a;
let gpc = gs.pieces.byid_mut(piece).unwrap();
if gpc.occult.is_active() {
- if self.z >= gpc.zlevel.z { throw!(OE::Occultation) }
+ if self.z >= gpc.zlevel.z { throw!(Ia::Occultation) }
}
gpc.zlevel = ZLevel { z: self.z.clone(), zg: gs.gen };
let update = PieceUpdateOp::SetZLevel(());
BadOperation, // xxx should be _inapplicable_
#[error("overlapping occultation")]
OverlappingOccultation, // xxx should be _inapplicable_
- #[error("piece is occulting, or occulted")]
- Occultation, // xxx should be _inapplicable_
}
#[derive(Error,Debug)]
self.occult.active.is_some()
}
- #[throws(OE)]
+ #[throws(Ia)]
pub fn forbid_involved_in_occultation(&self) {
- if self.involved_in_occultation() { throw!(OE::Occultation) }
+ if self.involved_in_occultation() { throw!(Ia::Occultation) }
}
}