Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Load Weight Restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Apr 4, 2023
1 parent c82c34f commit d77637c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/plugins/core-inventory/server/src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,22 +317,22 @@ const Internal = {
}

// Check Storage Capacity
const config = Athena.systems.inventory.config.get();
const maxWeight = openStoragesWeight[player.id];
let itemsToCheck: Array<StoredItem>;

if (info.startType === 'custom') {
if (info.startType === 'custom' && config.weight.enabled) {
itemsToCheck = complexSwap.from;

if (Athena.systems.inventory.weight.isWeightExceeded([complexSwap.to])) {
if ((Athena.systems.inventory.weight.isWeightExceeded([complexSwap.to]), config.weight.player)) {
InventoryView.storage.resync(player);
return;
}
}

if (info.endType === 'custom') {
if (info.endType === 'custom' && config.weight.enabled) {
itemsToCheck = complexSwap.to;

if (Athena.systems.inventory.weight.isWeightExceeded([complexSwap.from])) {
if ((Athena.systems.inventory.weight.isWeightExceeded([complexSwap.from]), config.weight.player)) {
InventoryView.storage.resync(player);
return;
}
Expand Down

0 comments on commit d77637c

Please sign in to comment.