Trait Items #72

Open
Oliver wants to merge 41 commits from feature/trait-items into main
Showing only changes of commit d81d86ef47 - Show all commits

View file

@ -49,10 +49,13 @@ export class WeaponData extends CommonItemData {
async _preCreate(item, options) {
const showEquipPrompt = options.showEquipPrompt ?? true;
if (showEquipPrompt && this.parent.isEmbedded && this._canEquip()) {
const shouldEquip = await DialogV2.confirm({
let shouldEquip = this.parent.parent.type === `geist`;
shouldEquip ||= await DialogV2.confirm({
window: { title: `Equip Item?` },
content: `Do you want to equip ${item.name}?`,
});
if (shouldEquip) {
this.updateSource({ "equipped": true });
};