let views = OwnerOccultationView {
owner: player,
owner_view: OccK::Visible,
- defview: OccK::Displaced { within: region },
+ defview: OccK::Displaced(region),
}.views()?;
dbgc!("claiming got region", ®ion, &views);
Ok::<_,IE>((region, views))
#[derive(Clone,Copy,Debug,Serialize,Deserialize)]
#[derive(Eq,PartialEq,Hash)]
-pub enum OccultationKind {
+pub enum OccultationKindGeneral<D> {
Visible,
Scrambled,
- Displaced { within: Area },
+ Displaced(D),
Invisible,
}
+pub type OccultationKind = OccultationKindGeneral<Area>;
impl Default for OccultationKind {
fn default() -> Self { OccK::Visible }
impl Ord for OccultationKind {
fn cmp(&self, rhs: &Self) -> Ordering {
- fn level(k: &OccK) -> u8 { use OccultationKind::*; match k {
+ fn level(k: &OccK) -> u8 { use OccKG::*; match k {
Visible => 0,
Scrambled => 1,
Displaced{..} => 2,
// hidden.rs
pub type OccK = OccultationKind;
+pub use OccultationKindGeneral as OccKG;
// updates.rs
pub type PUE = PreparedUpdateEntry;