SuperReactionTweaks: Allow disabling Super Reactions (#2805)

This commit is contained in:
Nick Oates 2024-08-29 22:39:40 -07:00 committed by GitHub
parent e473a57c3d
commit 07e629d8d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,10 +22,10 @@ export const settings = definePluginSettings({
}, },
superReactionPlayingLimit: { superReactionPlayingLimit: {
description: "Max Super Reactions to play at once", description: "Max Super Reactions to play at once. 0 to disable playing Super Reactions",
type: OptionType.SLIDER, type: OptionType.SLIDER,
default: 20, default: 20,
markers: [5, 10, 20, 40, 60, 80, 100], markers: [0, 5, 10, 20, 40, 60, 80, 100],
stickToMarkers: true, stickToMarkers: true,
}, },
}, { }, {
@ -58,6 +58,7 @@ export default definePlugin({
shouldPlayBurstReaction(playingCount: number) { shouldPlayBurstReaction(playingCount: number) {
if (settings.store.unlimitedSuperReactionPlaying) return true; if (settings.store.unlimitedSuperReactionPlaying) return true;
if (settings.store.superReactionPlayingLimit === 0) return false;
if (playingCount <= settings.store.superReactionPlayingLimit) return true; if (playingCount <= settings.store.superReactionPlayingLimit) return true;
return false; return false;
}, },