From: Ian Jackson Date: Mon, 18 Apr 2022 15:20:46 +0000 (+0100) Subject: Multigrab: allow to multigrab occulters X-Git-Tag: otter-1.1.0~472 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c5dbf55971bfdd152f066da07ce2c6e47e89aaa7;p=otter.git 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 --- 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),