Unstable 1.2.1.0

This commit is contained in:
Markus Isberg
2023-11-10 17:45:19 +02:00
parent 2ea58c58a7
commit 8a2e2ea0ae
268 changed files with 4076 additions and 1843 deletions
@@ -6,6 +6,14 @@ namespace Barotrauma
{
partial class CharacterCampaignData
{
#if DEBUG
/// <summary>
/// If enabled, client names must match the name of the character. Useful for testing the campaign with multiple clients running locally:
/// without this, the clients would all get assigned the same character due to all of them having the same AccountId or Address.
/// </summary>
public static bool RequireClientNameMatch = false;
#endif
public bool HasSpawned;
public bool HasItemData
@@ -76,7 +84,7 @@ namespace Barotrauma
{
case "character":
case "characterinfo":
CharacterInfo = new CharacterInfo(subElement);
CharacterInfo = new CharacterInfo(new ContentXElement(contentPackage: null, subElement));
break;
case "inventory":
itemData = subElement;
@@ -103,6 +111,12 @@ namespace Barotrauma
}
else
{
#if DEBUG
if (RequireClientNameMatch)
{
return ClientAddress == client.Connection.Endpoint.Address && client.Name == Name;
}
#endif
return ClientAddress == client.Connection.Endpoint.Address;
}
}