Skip to content

Commit

Permalink
don't send glowtip moves to non glowtip gear
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Dec 24, 2024
1 parent b57a887 commit 7d496d1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Backend/sensors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,16 @@ abstract class TriggerDefinition extends ChangeNotifier implements Comparable<Tr
// support sending to next device type if 2 actions+ actions are set
(element) => !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)));
Expand Down

0 comments on commit 7d496d1

Please sign in to comment.