Merge branch 'activate-pressureplate-on-bot' into 'ms4/dev'

Make bots trigger pressureplate just like Habbo

See merge request morningstar/Arcturus-Community!56
This commit is contained in:
John 2023-01-28 02:02:08 +00:00
commit dac0a187cc

View File

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