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

Enable bots to trigger pressure-plates

See merge request morningstar/Arcturus-Community!90
This commit is contained in:
ArpyAge 2024-10-17 16:12:40 +00:00
commit ae94bc4355

View File

@ -85,15 +85,16 @@ public class InteractionPressurePlate extends InteractionDefault {
if (tiles == null) return;
for (RoomTile tile : tiles) {
boolean hasHabbos = room.hasHabbosAt(tile.x, tile.y);
if (!hasHabbos && this.requiresAllTilesOccupied()) {
THashSet<RoomUnit> tileHasHabboOrBot = room.getHabbosAndBotsAt(tile.x, tile.y);
if (tileHasHabboOrBot.isEmpty() && this.requiresAllTilesOccupied()) {
occupied = false;
break;
}
if (hasHabbos) {
if (!tileHasHabboOrBot.isEmpty()) {
occupied = true;
}
}
this.setExtradata(occupied ? "1" : "0");