chiark / gitweb /
Fix confusion, "occluded" should read "occulted"
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2021 21:39:20 +0000 (21:39 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2021 21:39:20 +0000 (21:39 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/cmdlistener.rs
src/gamestate.rs
src/hidden.rs

index e39ed1bff7d3a91825e1479b64d94b9f5ca28e5f..309641cd18e1f33090db92de8456b42dc0cdbae3 100644 (file)
@@ -379,7 +379,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>(
         |(piece,gpc)| (|| Ok::<_,MgmtError>(if_chain!{
           let &GPiece { pos, face, .. } = gpc;
           if let Some(p) = ig.ipieces.get(piece);
-          let visible = if ! piece_at_all_occluded(&ig.gs.occults, piece) {
+          let visible = if ! piece_at_all_occulted(&ig.gs.occults, piece) {
             // todo: something more sophisticated would be nice
             let pri = PieceRenderInstructions::new_visible(
               // visible id is internal one here
index 7eceb6fc65a9295152c569795e7622aa45162b6b..b75e875b2d3fc6793541c3492c9db5b6e09800f9 100644 (file)
@@ -356,15 +356,15 @@ impl PieceXDataExt for PieceXDataState {
 #[derive(Debug,Clone)]
 pub struct PieceRenderInstructions {
   pub vpid: VisiblePieceId,
-  pub occluded: PriOccluded,
+  pub occulted: PriOcculted,
 }
 
 #[derive(Debug,Clone,Copy)]
-pub enum PriOccluded { Visible /*, Occluded*/ }
+pub enum PriOcculted { Visible /*, Occluded*/ }
 
 impl PieceRenderInstructions {
   pub fn new_visible(vpid: VisiblePieceId) -> PieceRenderInstructions {
-    PieceRenderInstructions { vpid, occluded: PriOccluded::Visible }
+    PieceRenderInstructions { vpid, occulted: PriOcculted::Visible }
   }
 
   #[throws(IE)]
@@ -375,7 +375,7 @@ impl PieceRenderInstructions {
     fn inner(pri: &PieceRenderInstructions, gpc: &GPiece, p: &dyn PieceTrait)
              -> Html
   {
-    let PriOccluded::Visible = pri.occluded;
+    let PriOcculted::Visible = pri.occulted;
 
     let mut defs = Html(String::new());
     let dragraise = match p.thresh_dragraise()? {
@@ -403,7 +403,7 @@ impl PieceRenderInstructions {
     fn inner(pri: &PieceRenderInstructions, gpc: &GPiece, p: &dyn PieceTrait)
              -> Html
   {
-    let PriOccluded::Visible = pri.occluded;
+    let PriOcculted::Visible = pri.occulted;
 
     pri.describe_fallible(gpc, p)
       .unwrap_or_else(|e| {
@@ -420,7 +420,7 @@ impl PieceRenderInstructions {
   }
 
   pub fn angle(&self, gpc: &GPiece) -> VisiblePieceAngle {
-    let PriOccluded::Visible = self.occluded;
+    let PriOcculted::Visible = self.occulted;
 
     gpc.angle
   }
@@ -429,7 +429,7 @@ impl PieceRenderInstructions {
   pub fn ui_operations(&self, gpc: &GPiece, p: &dyn PieceTrait)
                    -> Vec<UoDescription>
   {
-    let PriOccluded::Visible = self.occluded;
+    let PriOcculted::Visible = self.occulted;
     type WRC = WhatResponseToClientOp;
 
     let mut out = vec![];
index b1e68f7de4631b8a0a38a0ea2ffe883b5e242fa7..69c5826e0aa9651514653e5c762a98574f504d82 100644 (file)
@@ -192,15 +192,15 @@ fn inner(
 {
   let vpid = gpl.idmap.fwd_or_insert(piece);
   let angle = gpc.angle;
-  let occluded = PriOccluded::Visible; // xxx
+  let occulted = PriOcculted::Visible; // xxx
   trace!("{} {:?} => {} angle={:?}",
          player, piece, vpid, angle);
-  Some(PieceRenderInstructions { vpid, occluded })
+  Some(PieceRenderInstructions { vpid, occulted })
 }
   inner(occults, player, gpl, piece, gpc, p.borrow())
 }
 
-pub fn piece_at_all_occluded(
+pub fn piece_at_all_occulted(
   _occults: &GameOccults, // xxx
   _piece: PieceId, // xxx
 ) -> bool {