mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-19 07:56:26 +01:00
Allow placing stack helpers on users, bots and pets
This commit is contained in:
parent
b8d52b08d3
commit
09114ba977
@ -4366,6 +4366,8 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (!this.layout.fitsOnMap(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))
|
if (!this.layout.fitsOnMap(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))
|
||||||
return FurnitureMovementError.INVALID_MOVE;
|
return FurnitureMovementError.INVALID_MOVE;
|
||||||
|
|
||||||
|
if (item instanceof InteractionStackHelper) return FurnitureMovementError.NONE;
|
||||||
|
|
||||||
THashSet<RoomTile> occupiedTiles = this.layout.getTilesAt(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation);
|
THashSet<RoomTile> occupiedTiles = this.layout.getTilesAt(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation);
|
||||||
for (RoomTile t : occupiedTiles) {
|
for (RoomTile t : occupiedTiles) {
|
||||||
|
|
||||||
@ -4374,9 +4376,6 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (this.hasPetsAt(t.x, t.y)) return FurnitureMovementError.TILE_HAS_PETS;
|
if (this.hasPetsAt(t.x, t.y)) return FurnitureMovementError.TILE_HAS_PETS;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean magicTile = item instanceof InteractionStackHelper;
|
|
||||||
|
|
||||||
if (!magicTile) {
|
|
||||||
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
||||||
for (RoomTile t : occupiedTiles) {
|
for (RoomTile t : occupiedTiles) {
|
||||||
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
||||||
@ -4390,7 +4389,6 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (!item.canStackAt(this, tileFurniList)) {
|
if (!item.canStackAt(this, tileFurniList)) {
|
||||||
return FurnitureMovementError.CANT_STACK;
|
return FurnitureMovementError.CANT_STACK;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return FurnitureMovementError.NONE;
|
return FurnitureMovementError.NONE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user