Add a way to skip the equip prompt for API-based creation when it's not desired
This commit is contained in:
parent
08278655dc
commit
cc61a0c3ac
2 changed files with 6 additions and 4 deletions
|
|
@ -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}?`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue