From 1377306d812fb0fa14c0dcbaa511bb43db7cf725 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 18 Apr 2022 12:38:14 +0100 Subject: [PATCH] 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 --- src/currency.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 } } } -- 2.30.2