mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
Added two handed message to weapons (#9839)
* Added two handed message to weapons * Added two handed message to content api * Fixed static notes text. Added support for RTL
This commit is contained in:
parent
78ad1cd8b0
commit
803f63d991
4 changed files with 46 additions and 3 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
div.clearfix(slot="modal-footer")
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import '~client/assets/scss/colors.scss';
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ div
|
|||
)
|
||||
slot(name="popoverContent", :item="item")
|
||||
equipmentAttributesPopover(
|
||||
v-if="item.purchaseType==='gear'",
|
||||
v-if="item.purchaseType === 'gear'",
|
||||
:item="item"
|
||||
)
|
||||
div.questPopover(v-else-if="item.purchaseType === 'quests'")
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@
|
|||
"weaponSpecialSkiText": "Ski-sassin Pole",
|
||||
"weaponSpecialSkiNotes": "A weapon capable of destroying hordes of enemies! It also helps the user make very nice parallel turns. Increases Strength by <%= str %>. Limited Edition 2013-2014 Winter Gear.",
|
||||
"weaponSpecialCandycaneText": "Candy Cane Staff",
|
||||
"weaponSpecialCandycaneNotes": "A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases Intelligence by <%= int %> and Perception by <%= per %>. Limited Edition 2013-2014 Winter Gear.",
|
||||
"weaponSpecialCandycaneNotes": "A powerful mage's staff. Powerfully DELICIOUS, we mean! Increases Intelligence by <%= int %> and Perception by <%= per %>. Limited Edition 2013-2014 Winter Gear.",
|
||||
"weaponSpecialSnowflakeText": "Snowflake Wand",
|
||||
"weaponSpecialSnowflakeNotes": "This wand sparkles with unlimited healing power. Increases Intelligence by <%= int %>. Limited Edition 2013-2014 Winter Gear.",
|
||||
|
||||
|
|
@ -1591,5 +1591,6 @@
|
|||
"eyewearMystery301703Notes": "Perfect for a fancy masquerade or for stealthily moving through a particularly well-dressed crowd. Confers no benefit. March 3017 Subscriber Item.",
|
||||
|
||||
"eyewearArmoirePlagueDoctorMaskText": "Plague Doctor Mask",
|
||||
"eyewearArmoirePlagueDoctorMaskNotes": "An authentic mask worn by the doctors who battle the Plague of Procrastination. Confers no benefit. Enchanted Armoire: Plague Doctor Set (Item 2 of 3)."
|
||||
"eyewearArmoirePlagueDoctorMaskNotes": "An authentic mask worn by the doctors who battle the Plague of Procrastination. Confers no benefit. Enchanted Armoire: Plague Doctor Set (Item 2 of 3).",
|
||||
"twoHandedItem": "Two-handed item."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import t from '../translation';
|
||||
|
||||
import {weapon as baseWeapon} from './sets/base';
|
||||
|
||||
import {weapon as healerWeapon} from './sets/healer';
|
||||
|
|
@ -22,4 +24,43 @@ let weapon = {
|
|||
armoire: armoireWeapon,
|
||||
};
|
||||
|
||||
// Add Two Handed message to all weapons
|
||||
const rtlLanguages = [
|
||||
'ae', /* Avestan */
|
||||
'ar', /* 'العربية', Arabic */
|
||||
'arc', /* Aramaic */
|
||||
'bcc', /* 'بلوچی مکرانی', Southern Balochi */
|
||||
'bqi', /* 'بختياري', Bakthiari */
|
||||
'ckb', /* 'Soranî / کوردی', Sorani */
|
||||
'dv', /* Dhivehi */
|
||||
'fa', /* 'فارسی', Persian */
|
||||
'glk', /* 'گیلکی', Gilaki */
|
||||
'he', /* 'עברית', Hebrew */
|
||||
'ku', /* 'Kurdî / كوردی', Kurdish */
|
||||
'mzn', /* 'مازِرونی', Mazanderani */
|
||||
'nqo', /* N'Ko */
|
||||
'pnb', /* 'پنجابی', Western Punjabi */
|
||||
'ps', /* 'پښتو', Pashto, */
|
||||
'sd', /* 'سنڌي', Sindhi */
|
||||
'ug', /* 'Uyghurche / ئۇيغۇرچە', Uyghur */
|
||||
'ur', /* 'اردو', Urdu */
|
||||
'yi', /* 'ייִדיש', Yiddish */
|
||||
];
|
||||
for (let key in weapon) {
|
||||
const set = weapon[key];
|
||||
for (let weaponKey in set) {
|
||||
const item = set[weaponKey];
|
||||
const oldnotes = item.notes;
|
||||
item.notes = (lang) => {
|
||||
const twoHandedText = item.twoHanded ? t('twoHandedItem')(lang) : '';
|
||||
|
||||
if (rtlLanguages.indexOf(lang) !== -1) {
|
||||
return `${twoHandedText} ${oldnotes(lang)}`;
|
||||
}
|
||||
|
||||
return `${oldnotes(lang)} ${twoHandedText}`;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = weapon;
|
||||
|
|
|
|||
Loading…
Reference in a new issue