Skip to content

Commit e59385d

Browse files
authored
Merge branch 'runejs:develop' into no-zero-items
2 parents 0149cef + b465995 commit e59385d

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/game-engine/world/actor/player/dialogue-action.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ export class DialogueAction {
140140
this.p.interfaceState.openWidget(widgetId, {
141141
slot: 'chatbox'
142142
})
143-
144-
const sub = this.p.dialogueInteractionEvent.subscribe(action => {
143+
const sub = this.p.interfaceState.closed.subscribe(action => {
145144
sub.unsubscribe();
146145
this._action = action;
147146
resolve(this);

src/plugins/objects/bank/bank.plugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ export const withdrawItem: itemInteractionActionHandler = (details) => {
170170
amount: removeFromContainer(playerBank, details.itemId, countToRemove)
171171
};
172172

173-
for (let i = 0; i < itemToAdd.amount; i++) {
174-
playerInventory.add({ itemId: itemIdToAdd, amount: 1 });
175-
}
173+
playerInventory.add({ itemId: itemToAdd.itemId, amount: itemToAdd.amount });
176174

177175
updateBankingInterface(details.player);
178176
};

src/plugins/objects/doors/door.plugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ const doors = [
3939
closed: 11993,
4040
open: 11994,
4141
hinge: 'RIGHT'
42+
},
43+
{
44+
closed: 13001,
45+
open: 13002,
46+
hinge: 'RIGHT'
4247
}
4348
];
4449

@@ -98,7 +103,7 @@ export default {
98103
{
99104
type: 'object_interaction',
100105
objectIds: [ 1530, 4465, 4467, 3014, 3017, 3018,
101-
3019, 1536, 1537, 1533, 1531, 1534, 12348, 11993, 11994 ],
106+
3019, 1536, 1537, 1533, 1531, 1534, 12348, 11993, 11994, 13001, 13002 ],
102107
options: [ 'open', 'close' ],
103108
walkTo: true,
104109
handler: action

src/plugins/objects/ladders/ladder.plugin.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const validate: (level: number) => boolean = (level) => {
1111

1212
export const action: objectInteractionActionHandler = (details) => {
1313
const { player, option } = details;
14-
1514
if (option === 'climb') {
1615
dialogueAction(player)
1716
.then(async d => d.options(
@@ -22,20 +21,18 @@ export const action: objectInteractionActionHandler = (details) => {
2221
]))
2322
.then(d => {
2423
d.close();
25-
switch (d.action) {
24+
switch (d._action.data) {
2625
case 1:
2726
case 2:
28-
action({ ...details, option: `climb-${(d.action === 1 ? 'up' : 'down')}` });
27+
action({ ...details, option: `climb-${(d._action.data === 1 ? 'up' : 'down')}` });
2928
return;
3029
}
3130
});
3231
return;
3332
}
34-
3533
const up = option === 'climb-up';
3634
const { position } = player;
3735
const level = position.level + (up ? 1 : -1);
38-
3936
if (!validate(level)) return;
4037
if (!details.objectConfig.name.startsWith('Stair')) {
4138
player.playAnimation(up ? 828 : 827);

0 commit comments

Comments
 (0)