From c5dbf55971bfdd152f066da07ce2c6e47e89aaa7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 18 Apr 2022 16:20:46 +0100 Subject: [PATCH] Multigrab: allow to multigrab occulters 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 --- src/gamestate.rs | 4 ---- src/pcrender.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gamestate.rs b/src/gamestate.rs index 701d5d0d..89123d9c 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -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); diff --git a/src/pcrender.rs b/src/pcrender.rs index 2111e096..f0446330 100644 --- a/src/pcrender.rs +++ b/src/pcrender.rs @@ -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), -- 2.30.2