Added check for PC/NPC to ignore army items
This commit is contained in:
@@ -160,7 +160,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
||||||
// actor dual trigger...
|
// actor dual trigger...
|
||||||
if (item?.documentName !== "Actor") {
|
if (item?.documentName !== "Actor") {
|
||||||
console.warn("L5R5E | Wrong item type", item?.data?.type, item);
|
console.warn("L5R5E | Characters items are not allowed", item?.data?.type, item);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,6 +198,11 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
// Item subtype specific
|
// Item subtype specific
|
||||||
switch (itemData.type) {
|
switch (itemData.type) {
|
||||||
|
case "army_cohort":
|
||||||
|
case "army_fortification":
|
||||||
|
console.warn("L5R5E | Army items are not allowed", item?.data?.type, item);
|
||||||
|
return;
|
||||||
|
|
||||||
case "advancement":
|
case "advancement":
|
||||||
// Specific advancements, remove 1 to selected ring/skill
|
// Specific advancements, remove 1 to selected ring/skill
|
||||||
await this.actor.addBonus(item);
|
await this.actor.addBonus(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user