v0.9.2: fixed Heap.replace not merging stackable items
This commit is contained in:
parent
2553f655a9
commit
8abfa7a8c7
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user