NoClient | NoPlayer(_) | GameBeingDestroyed(_)
=> Status::NotFound,
OE::PieceHeld | OE::PieceImmoveable |
- OE::OverlappingOccultation |
BadOperation | BadJSON(_)
=> Status::BadRequest,
}
PieceImmoveable, // xxx should be _inapplicable_
#[error("improper UI operation")]
BadOperation, // xxx should be _inapplicable_
- #[error("overlapping occultation")]
- OverlappingOccultation, // xxx should be _inapplicable_
}
#[derive(Error,Debug)]
#[error("piece may not be moved")] PieceImmoveable,
#[error("occulter already rotated")] OcculterAlreadyRotated,
#[error("overfull, cannot organise")] OrganisedPlacementOverfull,
+ #[error("overlapping occultation(s)")] OverlappingOccultation,
#[error("UI operation not valid in the curret piece state")]
BadPieceStateForOperation,
}
} }
}
-#[throws(Fatal)]
+#[throws(APOE)]
pub fn create_occultation(
gen: &mut UniqueGenGen,
max_z: &mut ZLevel,
}
for occ in goccults.occults.values() {
- if occ.region.overlaps(®ion) { throw!(OE::OverlappingOccultation) }
+ if occ.region.overlaps(®ion) { throw!(Ia::OverlappingOccultation) }
}
let mut recalc = vec![];