Unstable 1.8.4.0

This commit is contained in:
Markus Isberg
2025-03-12 12:56:27 +00:00
parent a4c3e868e4
commit a4a3427e4e
627 changed files with 29860 additions and 10018 deletions
@@ -15,6 +15,12 @@ namespace Barotrauma
#endif
public bool HasSpawned;
/// <summary>
/// Respawning via shuttle has been blocked from permanently dead characters, but it should be possible when the player
/// chooses a bot from the reserve bench and shuttles are enabled in the campaign.
/// </summary>
public bool ChosenNewBotViaShuttle;
public bool HasItemData
{
@@ -77,6 +83,7 @@ namespace Barotrauma
string accountIdStr = element.GetAttributeString("accountid", null)
?? element.GetAttributeString("steamid", "");
AccountId = Networking.AccountId.Parse(accountIdStr);
ChosenNewBotViaShuttle = element.GetAttributeBool("waitingforshuttle", false);
foreach (XElement subElement in element.Elements())
{
@@ -143,6 +150,7 @@ namespace Barotrauma
{
Reset();
CharacterInfo.PermanentlyDead = true;
GameMain.GameSession?.IncrementPermadeath(AccountId);
DebugConsole.NewMessage($"Permadeath applied on {Name}'s CharacterCampaignData.CharacterInfo.");
}
@@ -179,7 +187,8 @@ namespace Barotrauma
XElement element = new XElement("CharacterCampaignData",
new XAttribute("name", Name),
new XAttribute("address", ClientAddress),
new XAttribute("accountid", AccountId.TryUnwrap(out var accountId) ? accountId.StringRepresentation : ""));
new XAttribute("accountid", AccountId.TryUnwrap(out var accountId) ? accountId.StringRepresentation : ""),
new XAttribute("waitingforshuttle", ChosenNewBotViaShuttle));
CharacterInfo?.Save(element);
if (itemData != null) { element.Add(itemData); }
if (healthData != null) { element.Add(healthData); }