From: Ian Jackson Date: Mon, 18 Apr 2022 11:38:14 +0000 (+0100) Subject: Currency: Declare to be multigrab X-Git-Tag: otter-1.1.0~474 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1377306d812fb0fa14c0dcbaa511bb43db7cf725;p=otter.git Currency: Declare to be multigrab We don't actually implement the PieceTrait method, so that just returns Inapplicable. Ie, after this you can try to multiselect a banknote but you get Problem manipulating piece: UI operation not valid in the curret piece state in the log. Signed-off-by: Ian Jackson --- diff --git a/src/currency.rs b/src/currency.rs index c14360b8..a26e4236 100644 --- a/src/currency.rs +++ b/src/currency.rs @@ -69,8 +69,11 @@ impl PieceSpec for Spec { itemname, qty, min_unit, }; - SpecLoaded { p: Box::new(bnote) as _, occultable: None, - special: default() } + let special = PieceSpecialProperties { + multigrab: true, + ..default() + }; + SpecLoaded { p: Box::new(bnote) as _, occultable: None, special } } }