Unstable v0.1300.0.0 (February 19th 2021)

This commit is contained in:
Joonas Rikkonen
2021-02-25 13:44:23 +02:00
parent b772654326
commit 24cbef485a
441 changed files with 21343 additions and 8562 deletions
@@ -25,11 +25,12 @@ namespace Barotrauma
subs.ForEach(s => s.Info.InitialSuppliesSpawned = true);
}
foreach (var wreck in Submarine.Loaded)
foreach (var sub in Submarine.Loaded)
{
if (wreck.Info.IsWreck)
if (sub.Info.Type == SubmarineType.Wreck ||
sub.Info.Type == SubmarineType.BeaconStation)
{
Place(wreck.ToEnumerable());
Place(sub.ToEnumerable());
}
}
@@ -195,11 +196,12 @@ namespace Barotrauma
int amount = Rand.Range(validContainer.Value.MinAmount, validContainer.Value.MaxAmount + 1, Rand.RandSync.Server);
for (int i = 0; i < amount; i++)
{
if (validContainer.Key.Inventory.IsFull())
if (validContainer.Key.Inventory.IsFull(takeStacksIntoAccount: true))
{
containers.Remove(validContainer.Key);
break;
}
if (!validContainer.Key.Inventory.CanBePut(itemPrefab)) { break; }
var item = new Item(itemPrefab, validContainer.Key.Item.Position, validContainer.Key.Item.Submarine)
{
SpawnedInOutpost = validContainer.Key.Item.SpawnedInOutpost,