v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -123,6 +123,12 @@ namespace Barotrauma
public bool IsDuplicate(CharacterCampaignData other)
{
#if DEBUG
if (RequireClientNameMatch)
{
return AccountId == other.AccountId && other.ClientAddress == ClientAddress && Name == other.Name;
}
#endif
return AccountId == other.AccountId && other.ClientAddress == ClientAddress;
}
@@ -133,6 +139,13 @@ namespace Barotrauma
WalletData = null;
}
public void ApplyPermadeath()
{
Reset();
CharacterInfo.PermanentlyDead = true;
DebugConsole.NewMessage($"Permadeath applied on {Name}'s CharacterCampaignData.CharacterInfo.");
}
public void SpawnInventoryItems(Character character, Inventory inventory)
{
if (character == null)
@@ -158,7 +171,7 @@ namespace Barotrauma
public void ApplyWalletData(Character character)
{
character.Wallet = new Wallet(Option<Character>.Some(character), WalletData);
character.Wallet = new Wallet(Option.Some(character), WalletData);
}
public XElement Save()
@@ -167,7 +180,6 @@ namespace Barotrauma
new XAttribute("name", Name),
new XAttribute("address", ClientAddress),
new XAttribute("accountid", AccountId.TryUnwrap(out var accountId) ? accountId.StringRepresentation : ""));
CharacterInfo?.Save(element);
if (itemData != null) { element.Add(itemData); }
if (healthData != null) { element.Add(healthData); }