Display Rarity in Compendiums for Items, Armors and Weapons
This commit is contained in:
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,10 +1,20 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.1.2 - Compendiums Update
|
||||||
|
- Added compendiums (Thanks to Stéfano Fara for the English version !) Partial for French as PoW and CR are not translated yet
|
||||||
|
- Shadowlands
|
||||||
|
- Emerald Empire
|
||||||
|
- Courts of Stone
|
||||||
|
- Path of Waves
|
||||||
|
- Celestial Realms
|
||||||
|
- Fix js error when Advancement is not embed in a actor
|
||||||
|
- Display Rarity in Compendiums for Items, Armors and Weapons
|
||||||
|
- Other minors fix
|
||||||
|
|
||||||
## 1.1.1 - The Huns War
|
## 1.1.1 - The Huns War
|
||||||
- Fix Minion initiative
|
- Fix Minion initiative
|
||||||
- Fix textarea ninjo/giri
|
- Fix textarea ninjo/giri
|
||||||
|
|
||||||
|
|
||||||
## 1.1.0 - Initiative first !
|
## 1.1.0 - Initiative first !
|
||||||
- Added initiative system :
|
- Added initiative system :
|
||||||
- Now use the score rule (the real one if you prefer)
|
- Now use the score rule (the real one if you prefer)
|
||||||
@@ -22,7 +32,7 @@
|
|||||||
- PC/NPC Sheet :
|
- PC/NPC Sheet :
|
||||||
- Added a visual indicator for equipped / readied
|
- Added a visual indicator for equipped / readied
|
||||||
- Now only equipped armor / weapon will show in conflict tab, and all armors/weapons now show in inventory tab
|
- Now only equipped armor / weapon will show in conflict tab, and all armors/weapons now show in inventory tab
|
||||||
- Xp not in curriculum are now rounded up (down before)
|
- Xp not in curriculum are now rounded up (down before, due to a translation error)
|
||||||
- No more automation in stats for Npc (these cheaters !)
|
- No more automation in stats for Npc (these cheaters !)
|
||||||
- 20Q Pushed the step3 item's limit to 20 (10 previous)
|
- 20Q Pushed the step3 item's limit to 20 (10 previous)
|
||||||
- Added System migration stuff
|
- Added System migration stuff
|
||||||
|
|||||||
@@ -151,15 +151,19 @@ export default class HooksL5r5e {
|
|||||||
* Compendium display
|
* Compendium display
|
||||||
*/
|
*/
|
||||||
static async renderCompendium(app, html, data) {
|
static async renderCompendium(app, html, data) {
|
||||||
// Add Rank & Ring in the compendium
|
// templates "item" : add Rarity
|
||||||
|
// Techniques / Peculiarities : add Ring / Rank
|
||||||
if (app.entity === "Item") {
|
if (app.entity === "Item") {
|
||||||
const content = await app.getContent();
|
const content = await app.getContent();
|
||||||
content.forEach((item) => {
|
content.forEach((item) => {
|
||||||
if (!!item.data.data.ring || !!item.data.data.rank) {
|
if (["weapon", "armor", "item", "peculiarity", "technique", "peculiarity"].includes(item.type)) {
|
||||||
html.find(`[data-entry-id="${item._id}"]`).append(
|
html.find(`[data-entry-id="${item._id}"]`).append(
|
||||||
`<i` +
|
`<i` +
|
||||||
(item.data.data.ring ? ` class="i_${item.data.data.ring}"` : ``) +
|
(item.data.data.ring ? ` class="i_${item.data.data.ring}"` : ``) +
|
||||||
`>` +
|
`>` +
|
||||||
|
(item.data.data.rarity
|
||||||
|
? `${game.i18n.localize("l5r5e.rarity")} ${item.data.data.rarity}`
|
||||||
|
: "") +
|
||||||
(item.data.data.rank ? game.i18n.localize("l5r5e.rank") + " " + item.data.data.rank : "") +
|
(item.data.data.rank ? game.i18n.localize("l5r5e.rank") + " " + item.data.data.rank : "") +
|
||||||
`</i>`
|
`</i>`
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user