chiark / gitweb /
Multigrab: allow to multigrab occulters
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Apr 2022 15:20:46 +0000 (16:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Apr 2022 15:22:02 +0000 (16:22 +0100)
I don't expect any pieces to exist that can both be active occulter,
and multigrab.  But if it does it should probably do the thing, rather
than mysteriously not work.  And this simplifies the code.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs
src/pcrender.rs

index 701d5d0d654d36dccf466d7662cfe7387da4e0da..89123d9c3788a2eb8d8413de5471b643211711df 100644 (file)
@@ -470,10 +470,6 @@ impl GPiece {
     if self.occult.is_active() { false }
     else { self.rotateable }
   }
-  pub fn multigrab(&self, ipc: &IPiece) -> bool {
-    if self.occult.is_active() { false }
-    else { ipc.special.multigrab }
-  }
 
   pub fn dummy() -> Self {
     let gen_dummy = Generation(1);
index 2111e096137a3ccb8f4ec8ac603a030deff9284b..f0446330c879c5b6106bdb05975ce9735292097f 100644 (file)
@@ -136,7 +136,7 @@ impl PieceRenderInstructions {
       angle      : pri.angle(gpc).to_compass(),
       pinned     : gpc.pinned,
       rotateable : gpc.rotateable(),
-      multigrab  : gpc.multigrab(ipc),
+      multigrab  : ipc.special.multigrab,
       uos        : pri.ui_operations(gs, gpc, ipc)?,
       moveable   : gpc.moveable(),
       facehint   : pri.facehint(gpc),