mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 23:38:28 +07:00
Fixed layout bugs with two items occupying same bounds and not fitting within grid area
This commit is contained in:
@ -82,7 +82,9 @@ TopLevelSort:
|
||||
}
|
||||
|
||||
coords.set(x, y);
|
||||
return x < width && y < height;
|
||||
if (contains) return false;
|
||||
return x + item.base.invwidth - 1 < width
|
||||
&& y + item.base.invheight - 1 < height;
|
||||
}
|
||||
|
||||
private boolean placeMultibuyItem(GridPoint2 coords, Item item, Array<Item> placed) {
|
||||
@ -106,6 +108,8 @@ TopLevelSort:
|
||||
}
|
||||
|
||||
coords.set(x, y);
|
||||
return x < width && y < height;
|
||||
if (contains) return false;
|
||||
return x + item.base.invwidth - 1 < width
|
||||
&& y + item.base.invheight - 1 < height;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user