Faction Test v1.0.1.0

This commit is contained in:
Regalis11
2023-02-16 15:01:28 +02:00
parent caa5a2f762
commit 2c5a7923b0
309 changed files with 7502 additions and 4335 deletions
@@ -109,15 +109,22 @@ namespace Barotrauma
return AccountId == other.AccountId && other.ClientAddress == ClientAddress;
}
public void Reset()
{
itemData = null;
healthData = null;
WalletData = null;
}
public void SpawnInventoryItems(Character character, Inventory inventory)
{
if (character == null)
{
throw new System.InvalidOperationException($"Failed to spawn inventory items. Character was null.");
throw new InvalidOperationException($"Failed to spawn inventory items. Character was null.");
}
if (itemData == null)
{
throw new System.InvalidOperationException($"Failed to spawn inventory items for the character \"{character.Name}\". No saved inventory data.");
throw new InvalidOperationException($"Failed to spawn inventory items for the character \"{character.Name}\". No saved inventory data.");
}
character.SpawnInventoryItems(inventory, itemData.FromPackage(null));
}