v1.5.7.0 (Summer Update)
This commit is contained in:
+14
-2
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user