Build 0.17.13.0

This commit is contained in:
Markus Isberg
2022-04-22 21:48:04 +09:00
parent 6cc100d98c
commit 7a09cf3260
58 changed files with 506 additions and 184 deletions
@@ -154,10 +154,14 @@ namespace Barotrauma
public void GiveItems(Character character, Submarine submarine, Rand.RandSync randSync = Rand.RandSync.Unsynced, bool createNetworkEvents = true)
{
if (ItemSets == null || !ItemSets.Any()) { return; }
var spawnItems = ToolBox.SelectWeightedRandom(ItemSets.Keys.ToList(), ItemSets.Values.ToList(), randSync);
foreach (XElement itemElement in spawnItems.GetChildElements("item"))
if (spawnItems != null)
{
InitializeItem(character, itemElement, submarine, this, createNetworkEvents: createNetworkEvents);
foreach (XElement itemElement in spawnItems.GetChildElements("item"))
{
InitializeItem(character, itemElement, submarine, this, createNetworkEvents: createNetworkEvents);
}
}
}