Add a way to skip the equip prompt for API-based creation when it's not desired

This commit is contained in:
Eldritch-Oliver 2025-10-05 15:48:15 -06:00
parent 08278655dc
commit cc61a0c3ac
2 changed files with 6 additions and 4 deletions

View file

@ -46,8 +46,9 @@ export class WeaponData extends CommonItemData {
// #endregion Schema
// #region Lifecycle
async _preCreate(item) {
if (this.parent.isEmbedded && this._canEquip()) {
async _preCreate(item, options) {
const showEquipPrompt = options.showEquipPrompt ?? true;
if (showEquipPrompt && this.parent.isEmbedded && this._canEquip()) {
const shouldEquip = await DialogV2.confirm({
window: { title: `Equip Item?` },
content: `Do you want to equip ${item.name}?`,