Make bots trigger pressureplate just like Habbo

This commit is contained in:
Yordi 2023-01-28 02:02:08 +00:00 committed by John
parent 3e32159113
commit f51b50b0d7

View File

@ -82,13 +82,13 @@ public class InteractionPressurePlate extends InteractionDefault {
if (tiles == null) return; if (tiles == null) return;
for (RoomTile tile : tiles) { for (RoomTile tile : tiles) {
boolean hasHabbos = room.hasHabbosAt(tile.getX(), tile.getY()); THashSet<RoomUnit> tileHasHabboOrBot = room.getHabbosAndBotsAt(tile.getX(), tile.getY());
if (!hasHabbos && this.requiresAllTilesOccupied()) { if (tileHasHabboOrBot.isEmpty() && this.requiresAllTilesOccupied()) {
occupied = false; occupied = false;
break; break;
} }
if (hasHabbos) { if (!tileHasHabboOrBot.isEmpty()) {
occupied = true; occupied = true;
} }
} }