mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-20 09:17:29 +07:00
Fixed layout bugs with two items occupying same bounds and not fitting within grid area
This commit is contained in:
parent
be0d08698b
commit
fe863584a4
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user