diff --git a/package-lock.json b/package-lock.json index 91c7f58fe..e9abae5fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6202,9 +6202,9 @@ } }, "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "version": "4.4.15", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.15.tgz", + "integrity": "sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA==", "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", diff --git a/src/game-engine/world/actor/player/dialogue-action.ts b/src/game-engine/world/actor/player/dialogue-action.ts index 9a25d40d7..cbb981a44 100644 --- a/src/game-engine/world/actor/player/dialogue-action.ts +++ b/src/game-engine/world/actor/player/dialogue-action.ts @@ -140,8 +140,7 @@ export class DialogueAction { this.p.interfaceState.openWidget(widgetId, { slot: 'chatbox' }) - - const sub = this.p.dialogueInteractionEvent.subscribe(action => { + const sub = this.p.interfaceState.closed.subscribe(action => { sub.unsubscribe(); this._action = action; resolve(this); diff --git a/src/plugins/objects/bank/bank.plugin.ts b/src/plugins/objects/bank/bank.plugin.ts index 2afc96771..34432164c 100644 --- a/src/plugins/objects/bank/bank.plugin.ts +++ b/src/plugins/objects/bank/bank.plugin.ts @@ -170,9 +170,7 @@ export const withdrawItem: itemInteractionActionHandler = (details) => { amount: removeFromContainer(playerBank, details.itemId, countToRemove) }; - for (let i = 0; i < itemToAdd.amount; i++) { - playerInventory.add({ itemId: itemIdToAdd, amount: 1 }); - } + playerInventory.add({ itemId: itemToAdd.itemId, amount: itemToAdd.amount }); updateBankingInterface(details.player); }; diff --git a/src/plugins/objects/doors/door.plugin.ts b/src/plugins/objects/doors/door.plugin.ts index cbf3ad3a1..5c9f3fac3 100644 --- a/src/plugins/objects/doors/door.plugin.ts +++ b/src/plugins/objects/doors/door.plugin.ts @@ -39,6 +39,11 @@ const doors = [ closed: 11993, open: 11994, hinge: 'RIGHT' + }, + { + closed: 13001, + open: 13002, + hinge: 'RIGHT' } ]; @@ -98,7 +103,7 @@ export default { { type: 'object_interaction', objectIds: [ 1530, 4465, 4467, 3014, 3017, 3018, - 3019, 1536, 1537, 1533, 1531, 1534, 12348, 11993, 11994 ], + 3019, 1536, 1537, 1533, 1531, 1534, 12348, 11993, 11994, 13001, 13002 ], options: [ 'open', 'close' ], walkTo: true, handler: action diff --git a/src/plugins/objects/ladders/ladder.plugin.ts b/src/plugins/objects/ladders/ladder.plugin.ts index 60ae576d7..a5b41158c 100644 --- a/src/plugins/objects/ladders/ladder.plugin.ts +++ b/src/plugins/objects/ladders/ladder.plugin.ts @@ -11,7 +11,6 @@ const validate: (level: number) => boolean = (level) => { export const action: objectInteractionActionHandler = (details) => { const { player, option } = details; - if (option === 'climb') { dialogueAction(player) .then(async d => d.options( @@ -22,20 +21,18 @@ export const action: objectInteractionActionHandler = (details) => { ])) .then(d => { d.close(); - switch (d.action) { + switch (d._action.data) { case 1: case 2: - action({ ...details, option: `climb-${(d.action === 1 ? 'up' : 'down')}` }); + action({ ...details, option: `climb-${(d._action.data === 1 ? 'up' : 'down')}` }); return; } }); return; } - const up = option === 'climb-up'; const { position } = player; const level = position.level + (up ? 1 : -1); - if (!validate(level)) return; if (!details.objectConfig.name.startsWith('Stair')) { player.playAnimation(up ? 828 : 827);