v0.9.1a: prevented shop item counts from influencing levelgen RNG
This commit is contained in:
+5
-1
@@ -273,7 +273,11 @@ public class ShopRoom extends SpecialRoom {
|
|||||||
if (itemsToSpawn.size() > 63)
|
if (itemsToSpawn.size() > 63)
|
||||||
throw new RuntimeException("Shop attempted to carry more than 63 items!");
|
throw new RuntimeException("Shop attempted to carry more than 63 items!");
|
||||||
|
|
||||||
Random.shuffle(itemsToSpawn);
|
//use a new generator here to prevent items in shop stock affecting levelgen RNG (e.g. sandbags)
|
||||||
|
Random.pushGenerator(Random.Long());
|
||||||
|
Random.shuffle(itemsToSpawn);
|
||||||
|
Random.popGenerator();
|
||||||
|
|
||||||
return itemsToSpawn;
|
return itemsToSpawn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user