Fix asteroid UI determinism (#23661)
This commit is contained in:
@@ -28,7 +28,6 @@ public abstract partial class SharedSalvageSystem
|
||||
if (seed % 2 == 0)
|
||||
{
|
||||
var config = _asteroidConfigs[rand.Next(_asteroidConfigs.Count)];
|
||||
var layerRand = new System.Random(seed);
|
||||
var configProto = _proto.Index(config);
|
||||
var layers = new Dictionary<string, int>();
|
||||
|
||||
@@ -37,10 +36,13 @@ public abstract partial class SharedSalvageSystem
|
||||
{
|
||||
switch (layer)
|
||||
{
|
||||
case BiomePostGen:
|
||||
rand.Next();
|
||||
break;
|
||||
case BiomeMarkerLayerPostGen marker:
|
||||
for (var i = 0; i < marker.Count; i++)
|
||||
{
|
||||
var proto = _proto.Index(marker.MarkerTemplate).Pick(layerRand);
|
||||
var proto = _proto.Index(marker.MarkerTemplate).Pick(rand);
|
||||
var layerCount = layers.GetOrNew(proto);
|
||||
layerCount++;
|
||||
layers[proto] = layerCount;
|
||||
|
||||
Reference in New Issue
Block a user