From 7d496d15255bd2b209f1bb9b4cc63ba08761235d Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Tue, 24 Dec 2024 10:26:15 -0500 Subject: [PATCH] don't send glowtip moves to non glowtip gear --- lib/Backend/sensors.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Backend/sensors.dart b/lib/Backend/sensors.dart index d4f109a8..8bc76b1b 100644 --- a/lib/Backend/sensors.dart +++ b/lib/Backend/sensors.dart @@ -284,7 +284,16 @@ abstract class TriggerDefinition extends ChangeNotifier implements Comparable !sentDeviceTypes.contains(element.baseDeviceDefinition.deviceType), ) - .toList() + .where( + (element) { + // filter out devices without a glowtip if its a glowtip action + if ([ActionCategory.glowtip].contains(baseAction.actionCategory)) { + return element.hasGlowtip.value == GlowtipStatus.glowtip; + } + // return remaining gear if action is not a glowtip action + return true; + }, + ).toList() ..shuffle()) { if (HiveProxy.getOrDefault(settings, kitsuneModeToggle, defaultValue: kitsuneModeDefault)) { await Future.delayed(Duration(milliseconds: Random().nextInt(kitsuneDelayRange)));