mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
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:
commit
ae94bc4355
@ -85,15 +85,16 @@ 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.x, tile.y);
|
THashSet<RoomUnit> tileHasHabboOrBot = room.getHabbosAndBotsAt(tile.x, tile.y);
|
||||||
if (!hasHabbos && this.requiresAllTilesOccupied()) {
|
if (tileHasHabboOrBot.isEmpty() && this.requiresAllTilesOccupied()) {
|
||||||
occupied = false;
|
occupied = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasHabbos) {
|
if (!tileHasHabboOrBot.isEmpty()) {
|
||||||
occupied = true;
|
occupied = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setExtradata(occupied ? "1" : "0");
|
this.setExtradata(occupied ? "1" : "0");
|
||||||
|
Loading…
Reference in New Issue
Block a user