Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -300,7 +300,7 @@ namespace Barotrauma.Items.Components
var (x, y, z, w) = Parent.GrowthWeights;
float[] weights = { x, y, z, w };
value = pool.RandomElementByWeight(i => weights[i]);
value = pool.GetRandomByWeight(i => weights[i], Rand.RandSync.Unsynced);
}
return (TileSide) (1 << value);
@@ -416,8 +416,8 @@ namespace Barotrauma.Items.Components
set => health = Math.Clamp(value, 0, MaxHealth);
}
public bool Decayed;
public bool FullyGrown;
public bool Decayed { get; set; }
public bool FullyGrown { get; set; }
private const int maxProductDelay = 10,
maxVineGrowthDelay = 10;
@@ -562,7 +562,7 @@ namespace Barotrauma.Items.Components
if (spawnProduct && ProducedItems.Any())
{
SpawnItem(Item, ProducedItems.RandomElementByWeight(it => it.Probability), spawnPos);
SpawnItem(Item, ProducedItems.GetRandomByWeight(it => it.Probability, Rand.RandSync.Unsynced), spawnPos);
return;
}