Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn the multiplier on/off added. #295

Merged
merged 12 commits into from
Aug 12, 2017
5 changes: 3 additions & 2 deletions lib/combo-renderer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
@observe 'exclamationEvery'
@observe 'activationThreshold'
@observe 'exclamationTexts'
@observe 'multiplier'
@subscriptions.add atom.commands.add "atom-workspace",
"activate-power-mode:reset-max-combo": => @resetMaxStreak()

Expand Down Expand Up @@ -101,7 +102,7 @@ module.exports =
@lastStreak = performance.now()
@debouncedEndStreak()

n = n * (@level + 1) if n > 0
n = n * (@level + 1) if n > 0 and @conf['multiplier']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check with this config on the checkLevel function as well to avoid triggering the multiplier exclamations (those 2x, 3x).

Copy link
Contributor Author

@Jerajo Jerajo Aug 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


oldStreak = @currentStreak
@currentStreak += n
Expand Down Expand Up @@ -148,7 +149,7 @@ module.exports =
if level != @level
@container.classList.remove "level-#{@level}"
@container.classList.add "level-#{level}"
@showExclamation "#{level+1}x", 'level', false
@showExclamation "#{level+1}x", 'level', false if @conf['multiplier']
@pluginManager.runOnComboLevelChange(level, @level)
@level = level
return true
Expand Down
7 changes: 7 additions & 0 deletions lib/config-schema.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ module.exports =
default: true
order: 1

multiplier:
title: "Combo Mode - Multiplier"
description: "Turn the multiplier on/off. (multiplier = streak * current level)."
type: "boolean"
default: true
order: 2

activationThreshold:
title: "Combo Mode - Activation Threshold"
description: "Streak threshold to activate the power mode and levels."
Expand Down
8 changes: 8 additions & 0 deletions menus/activate-power-mode.cson
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
{
'label': 'Toggle'
'command': 'activate-power-mode:toggle'
},
{
'label': 'Select Effects'
'command': 'activate-power-mode:select-flow'
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 2, one with the select-effect and another with the select-flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realise it, I'll fix it now.

{
'label': 'Reset Max Combo'
'command': 'activate-power-mode:reset-max-combo'
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add the disable and enable commands as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All commands added on ccaf0ad

image

]
]
Expand Down