Auto-equip weapons when embedded into Geist
This commit is contained in:
parent
e7ac049ae3
commit
d81d86ef47
1 changed files with 4 additions and 1 deletions
|
|
@ -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 });
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue