v0.9.2: fixed Heap.replace not merging stackable items

This commit is contained in:
Evan Debenham 2021-01-22 20:04:13 -05:00
parent 2553f655a9
commit 8abfa7a8c7

View File

@ -175,6 +175,12 @@ public class Heap implements Bundlable {
int index = items.indexOf( a );
if (index != -1) {
items.remove( index );
for (Item i : items) {
if (i.isSimilar( b )) {
i.merge( b );
return;
}
}
items.add( index, b );
}
}