use of com.nyrds.pixeldungeon.levels.objects.Barrel in project pixel-dungeon-remix by NYRDS.
the class WarehousePainter method paint.
public static void paint(Level level, Room room) {
fill(level, room, Terrain.WALL);
fill(level, room, 1, Terrain.EMPTY_SP);
Room.Door entrance = room.entrance();
entrance.set(Room.Door.Type.HIDDEN);
for (int i = room.left + 1; i < room.right; i++) {
for (int j = room.top + 1; j < room.bottom; j++) {
if (Math.random() < 0.5) {
level.addLevelObject(new Barrel(level.cell(i, j)));
} else {
Item prize = Random.oneOf(Generator.random(Generator.Category.BULLETS), Generator.random(Generator.Category.THROWABLE));
level.drop(prize, level.cell(i, j));
}
}
}
}