Browse Source

Stackables can be stashed if matching stackable is in vault.

tags/v0.4^2
Luke 4 years ago
committed by Big Bad Waffle
parent
commit
844365a1d1
1 changed files with 12 additions and 10 deletions
  1. +12
    -10
      src/server/components/stash.js

+ 12
- 10
src/server/components/stash.js View File

@@ -58,16 +58,18 @@ module.exports = {
if (!this.active)
return;
else if (this.items.length >= 50) {
this.obj.instance.syncer.queue('onGetMessages', {
id: this.obj.id,
messages: [{
class: 'color-redA',
message: 'You do not have room in your stash to deposit that item',
type: 'info'
}]
}, [this.obj.serverId]);

return;
let isMaterial = this.items.some(stashedItem => item.name === stashedItem.name && item.quantity);
if (!isMaterial) {
this.obj.instance.syncer.queue('onGetMessages', {
id: this.obj.id,
messages: [{
class: 'color-redA',
message: 'You do not have room in your stash to deposit that item',
type: 'info'
}]
}, [this.obj.serverId]);
return;
}
}

this.getItem(item);


Loading…
Cancel
Save