mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Config value added for amount of users to roll - hotel.room.rollers.roll_avatars.max
This commit is contained in:
parent
973f918c2e
commit
f6f1897ab8
@ -114,6 +114,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
public static int IDLE_CYCLES = 240;
|
public static int IDLE_CYCLES = 240;
|
||||||
public static int IDLE_CYCLES_KICK = 480;
|
public static int IDLE_CYCLES_KICK = 480;
|
||||||
public static String PREFIX_FORMAT = "[<font color=\"%color%\">%prefix%</font>] ";
|
public static String PREFIX_FORMAT = "[<font color=\"%color%\">%prefix%</font>] ";
|
||||||
|
public static int ROLLERS_MAXIMUM_ROLL_AVATARS = 1;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
for (int i = 1; i <= 3; i++) {
|
for (int i = 1; i <= 3; i++) {
|
||||||
@ -1409,9 +1410,13 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
HabboItem nextTileChair = this.getLowestChair(tileInFront);
|
HabboItem nextTileChair = this.getLowestChair(tileInFront);
|
||||||
|
|
||||||
|
THashSet<Integer> usersRolledThisTile = new THashSet<>();
|
||||||
|
|
||||||
for (RoomUnit unit : unitsOnTile) {
|
for (RoomUnit unit : unitsOnTile) {
|
||||||
if (rolledUnitIds.contains(unit.getId())) continue;
|
if (rolledUnitIds.contains(unit.getId())) continue;
|
||||||
|
|
||||||
|
if(usersRolledThisTile.size() >= Room.ROLLERS_MAXIMUM_ROLL_AVATARS) break;
|
||||||
|
|
||||||
if (stackContainsRoller && !allowFurniture && !(topItem != null && topItem.isWalkable()))
|
if (stackContainsRoller && !allowFurniture && !(topItem != null && topItem.isWalkable()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1446,6 +1451,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usersRolledThisTile.add(unit.getId());
|
||||||
rolledUnitIds.add(unit.getId());
|
rolledUnitIds.add(unit.getId());
|
||||||
updatedUnit.remove(unit);
|
updatedUnit.remove(unit);
|
||||||
messages.add(new RoomUnitOnRollerComposer(unit, roller, unit.getCurrentLocation(), unit.getZ() + (isRiding ? 1 : 0), tile, tile.getStackHeight() + (isRiding ? 1 : 0) + (nextTileChair != null ? -1 : 0), room));
|
messages.add(new RoomUnitOnRollerComposer(unit, roller, unit.getCurrentLocation(), unit.getZ() + (isRiding ? 1 : 0), tile, tile.getStackHeight() + (isRiding ? 1 : 0) + (nextTileChair != null ? -1 : 0), room));
|
||||||
@ -1469,7 +1475,6 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (unit.hasStatus(RoomUnitStatus.SIT)) {
|
if (unit.hasStatus(RoomUnitStatus.SIT)) {
|
||||||
unit.sitUpdate = true;
|
unit.sitUpdate = true;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,7 @@ public class PluginManager {
|
|||||||
Room.HAND_ITEM_TIME = Emulator.getConfig().getInt("hotel.rooms.handitem.time");
|
Room.HAND_ITEM_TIME = Emulator.getConfig().getInt("hotel.rooms.handitem.time");
|
||||||
Room.IDLE_CYCLES = Emulator.getConfig().getInt("hotel.roomuser.idle.cycles", 240);
|
Room.IDLE_CYCLES = Emulator.getConfig().getInt("hotel.roomuser.idle.cycles", 240);
|
||||||
Room.IDLE_CYCLES_KICK = Emulator.getConfig().getInt("hotel.roomuser.idle.cycles.kick", 480);
|
Room.IDLE_CYCLES_KICK = Emulator.getConfig().getInt("hotel.roomuser.idle.cycles.kick", 480);
|
||||||
|
Room.ROLLERS_MAXIMUM_ROLL_AVATARS = Emulator.getConfig().getInt("hotel.room.rollers.roll_avatars.max", 1);
|
||||||
RoomManager.MAXIMUM_ROOMS_VIP = Emulator.getConfig().getInt("hotel.max.rooms.vip");
|
RoomManager.MAXIMUM_ROOMS_VIP = Emulator.getConfig().getInt("hotel.max.rooms.vip");
|
||||||
RoomManager.MAXIMUM_ROOMS_USER = Emulator.getConfig().getInt("hotel.max.rooms.user");
|
RoomManager.MAXIMUM_ROOMS_USER = Emulator.getConfig().getInt("hotel.max.rooms.user");
|
||||||
RoomManager.HOME_ROOM_ID = Emulator.getConfig().getInt("hotel.home.room");
|
RoomManager.HOME_ROOM_ID = Emulator.getConfig().getInt("hotel.home.room");
|
||||||
|
Loading…
Reference in New Issue
Block a user