v2.3.0: fixed cases where picking up bags could result in multiple quickslot placeholders
This commit is contained in:
@@ -72,6 +72,11 @@ public class Bag extends Item implements Iterable<Item> {
|
|||||||
|
|
||||||
grabItems(container);
|
grabItems(container);
|
||||||
|
|
||||||
|
//if there are any quickslot placeholders that match items in this bag, assign them
|
||||||
|
for (Item item : items) {
|
||||||
|
Dungeon.quickslot.replacePlaceholder(item);
|
||||||
|
}
|
||||||
|
|
||||||
if (super.collect( container )) {
|
if (super.collect( container )) {
|
||||||
|
|
||||||
owner = container.owner;
|
owner = container.owner;
|
||||||
@@ -87,8 +92,9 @@ public class Bag extends Item implements Iterable<Item> {
|
|||||||
@Override
|
@Override
|
||||||
public void onDetach( ) {
|
public void onDetach( ) {
|
||||||
this.owner = null;
|
this.owner = null;
|
||||||
for (Item item : items)
|
for (Item item : items) {
|
||||||
Dungeon.quickslot.clearItem(item);
|
Dungeon.quickslot.clearItem(item);
|
||||||
|
}
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user