v0.6.0: moved important usages of collections.shuffle into Random
This commit is contained in:
committed by
Evan Debenham
parent
75f9cd454b
commit
048b5e5f7b
+2
-2
@@ -74,7 +74,7 @@ public abstract class RegularLevel extends Level {
|
||||
|
||||
|
||||
ArrayList<Room> initRooms = initRooms();
|
||||
Collections.shuffle(initRooms);
|
||||
Random.shuffle(initRooms);
|
||||
|
||||
do {
|
||||
for (Room r : initRooms){
|
||||
@@ -340,7 +340,7 @@ public abstract class RegularLevel extends Level {
|
||||
}
|
||||
|
||||
protected Room randomRoom( Class<?extends Room> type ) {
|
||||
Collections.shuffle( rooms );
|
||||
Random.shuffle( rooms );
|
||||
for (Room r : rooms) {
|
||||
if (type.isInstance(r)
|
||||
//compatibility with pre-0.6.0 saves
|
||||
|
||||
+1
-1
@@ -274,7 +274,7 @@ public class ShopRoom extends SpecialRoom {
|
||||
if (itemsToSpawn.size() > 63)
|
||||
throw new RuntimeException("Shop attempted to carry more than 63 items!");
|
||||
|
||||
Collections.shuffle(itemsToSpawn);
|
||||
Random.shuffle(itemsToSpawn);
|
||||
}
|
||||
|
||||
private static void ChooseBag(Belongings pack){
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ public class SpecialRoom extends Room {
|
||||
}
|
||||
|
||||
guaranteedWellDepth = Random.IntRange( 6, 14 );
|
||||
Collections.shuffle(runSpecials);
|
||||
Random.shuffle(runSpecials);
|
||||
}
|
||||
|
||||
public static void initForFloor(){
|
||||
|
||||
Reference in New Issue
Block a user