mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
Merge branch 'Hus274-7701' into develop
This commit is contained in:
commit
1484090d27
3 changed files with 15 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
"equipmentType" : "Type",
|
||||
"klass": "Class",
|
||||
"groupBy": "Group By <%= type %>",
|
||||
"classBonus": "(This item matches your class, so it gets an additional 1.5 stat multiplier.)",
|
||||
|
||||
"weapon": "weapon",
|
||||
"weaponCapitalized" : "Weapon",
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ habitrpg.controller("InventoryCtrl",
|
|||
var item = Content.gear.flat[key];
|
||||
|
||||
var bonusMultiplier = 1;
|
||||
if (item.klass === User.user.stats.class || item.specialClass === User.user.stats.class) {
|
||||
if (_isClassItem(item)) {
|
||||
bonusMultiplier = 1.5;
|
||||
}
|
||||
|
||||
|
|
@ -317,6 +317,12 @@ habitrpg.controller("InventoryCtrl",
|
|||
});
|
||||
};
|
||||
|
||||
$scope.classBonusNotes = function (item) {
|
||||
if (_isClassItem(item)) {
|
||||
return window.env.t('classBonus');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.hasAllTimeTravelerItems = function() {
|
||||
return ($scope.hasAllTimeTravelerItemsOfType('mystery') &&
|
||||
$scope.hasAllTimeTravelerItemsOfType('pets') &&
|
||||
|
|
@ -358,5 +364,11 @@ habitrpg.controller("InventoryCtrl",
|
|||
var selection = Math.floor(random);
|
||||
return env.t(kind + selection);
|
||||
}
|
||||
|
||||
function _isClassItem(item) {
|
||||
var userClass = user.stats.class;
|
||||
|
||||
return item.klass === userClass || item.specialClass === userClass;
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ mixin equipmentButton(type)
|
|||
button.customize-option(class='shop_{{::item.key}}',
|
||||
ng-class='{selectableInventory: user.items.gear.#{type}[item.type] == item.key}',
|
||||
ng-click='equip(item.key, "#{type}")',
|
||||
popover='{{::item.notes()}}', popover-title='{{::item.text()}}',
|
||||
popover='{{::item.notes()}} {{::classBonusNotes(item)}}', popover-title='{{::item.text()}}',
|
||||
popover-trigger='mouseenter', popover-placement='right',
|
||||
popover-append-to-body='true')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue