mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
refactor(constant): Screaming camel MAX_LEVEL
This commit is contained in:
@@ -15,7 +15,7 @@ api.i18n = i18n;
|
|||||||
|
|
||||||
import * as statHelpers from './statHelpers';
|
import * as statHelpers from './statHelpers';
|
||||||
|
|
||||||
api.maxLevel = statHelpers.maxLevel;
|
api.maxLevel = statHelpers.MAX_LEVEL;
|
||||||
api.capByLevel = statHelpers.capByLevel;
|
api.capByLevel = statHelpers.capByLevel;
|
||||||
api.maxHealth = statHelpers.MAX_HEALTH;
|
api.maxHealth = statHelpers.MAX_HEALTH;
|
||||||
api.tnl = statHelpers.toNextLevel;
|
api.tnl = statHelpers.toNextLevel;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const maxLevel = 100;
|
export const MAX_LEVEL = 100;
|
||||||
|
|
||||||
export function capByLevel (lvl) {
|
export function capByLevel (lvl) {
|
||||||
if (lvl > maxLevel) {
|
if (lvl > MAX_LEVEL) {
|
||||||
return maxLevel;
|
return MAX_LEVEL;
|
||||||
} else {
|
} else {
|
||||||
return lvl;
|
return lvl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user