Merge pull request #193 from Crowns3bc/Allow-a-quantity-of-items-to-drop-from-chests

Allow a quantity of items to drop from chests
This commit is contained in:
Kaan Soral
2025-10-03 20:06:59 +03:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1903,13 +1903,13 @@ function drop_item_logic(drop, def, pvp) {
} else if (def[1] == "open") {
chest_exchange(drop, def[2]);
} else {
var item = create_new_item(def[1]);
var item = create_new_item(def[1], def[2]);
if (pvp) {
item.v = new Date();
}
for (var i = 0; i < drop.items.length; i++) {
if (can_stack(drop.items[i], item)) {
drop.items[i].q += 1;
drop.items[i].q += def[2] ?? 1;
added = true;
break;
}