mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Added comments
This commit is contained in:
parent
8cbe5129ac
commit
0a09ff1f41
@ -43,17 +43,18 @@ public class InteractionGate extends HabboItem {
|
|||||||
if (client != null && !room.hasRights(client.getHabbo()) && !isWired)
|
if (client != null && !room.hasRights(client.getHabbo()) && !isWired)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If a Habbo is standing on a tile occupied by the gate, the gate shouldn't be triggered
|
// If a Habbo is standing on a tile occupied by the gate, the gate shouldn't open/close
|
||||||
if (!isWired) {
|
if (!isWired) {
|
||||||
for (RoomTile tile : room.getLayout().getTilesAt(room.getLayout().getTile(this.getX(), this.getY()), this.getBaseItem().getWidth(), this.getBaseItem().getLength(), this.getRotation()))
|
for (RoomTile tile : room.getLayout().getTilesAt(room.getLayout().getTile(this.getX(), this.getY()), this.getBaseItem().getWidth(), this.getBaseItem().getLength(), this.getRotation()))
|
||||||
if (room.hasHabbosAt(tile.x, tile.y))
|
if (room.hasHabbosAt(tile.x, tile.y))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Gate closed = 0, open = 1
|
||||||
if (this.getExtradata().length() == 0)
|
if (this.getExtradata().length() == 0)
|
||||||
this.setExtradata("0");
|
this.setExtradata("0");
|
||||||
|
|
||||||
this.setExtradata((Integer.valueOf(this.getExtradata()) + 1) % 2 + "");
|
this.setExtradata((Integer.parseInt(this.getExtradata()) + 1) % 2 + "");
|
||||||
room.updateTile(room.getLayout().getTile(this.getX(), this.getY()));
|
room.updateTile(room.getLayout().getTile(this.getX(), this.getY()));
|
||||||
this.needsUpdate(true);
|
this.needsUpdate(true);
|
||||||
room.updateItemState(this);
|
room.updateItemState(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user