Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -31,6 +31,14 @@ namespace Barotrauma.Networking
|
||||
SomethingDifferent = 4
|
||||
}
|
||||
|
||||
public enum RespawnMode
|
||||
{
|
||||
MidRound,
|
||||
BetweenRounds,
|
||||
Permadeath,
|
||||
}
|
||||
|
||||
|
||||
internal enum LootedMoneyDestination
|
||||
{
|
||||
Bank,
|
||||
@@ -408,6 +416,13 @@ namespace Barotrauma.Networking
|
||||
set { tickRate = MathHelper.Clamp(value, 1, 60); }
|
||||
}
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes, description: "Do clients need to be authenticated (e.g. based on Steam ID or an EGS ownership token). Can be disabled if you for example want to play the game in a local network without a connection to external services.")]
|
||||
public bool RequireAuthentication
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
public bool RandomizeSeed
|
||||
{
|
||||
@@ -465,6 +480,27 @@ namespace Barotrauma.Networking
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
/// <summary>
|
||||
/// Are players allowed to take over bots when permadeath is enabled?
|
||||
/// </summary>
|
||||
public bool AllowBotTakeoverOnPermadeath
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes)]
|
||||
/// <summary>
|
||||
/// This is an optional setting for permadeath mode. When it's enabled, a player client whose character dies cannot
|
||||
/// respawn or get a new character in any way in that game (unlike in normal permadeath mode), and can only spectate.
|
||||
/// </summary>
|
||||
public bool IronmanMode
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize(60.0f, IsPropertySaveable.Yes)]
|
||||
public float AutoRestartInterval
|
||||
{
|
||||
@@ -607,15 +643,15 @@ namespace Barotrauma.Networking
|
||||
get; set;
|
||||
}
|
||||
|
||||
private bool allowRespawn;
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
public bool AllowRespawn
|
||||
private RespawnMode respawnMode;
|
||||
[Serialize(RespawnMode.MidRound, IsPropertySaveable.Yes)]
|
||||
public RespawnMode RespawnMode
|
||||
{
|
||||
get { return allowRespawn; }
|
||||
get { return respawnMode; }
|
||||
set
|
||||
{
|
||||
if (allowRespawn == value) { return; }
|
||||
allowRespawn = value;
|
||||
if (respawnMode == value) { return; }
|
||||
respawnMode = value;
|
||||
ServerDetailsChanged = true;
|
||||
}
|
||||
}
|
||||
@@ -696,6 +732,13 @@ namespace Barotrauma.Networking
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
public bool AllowDragAndDropGive
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes)]
|
||||
public bool DestructibleOutposts
|
||||
@@ -863,13 +906,28 @@ namespace Barotrauma.Networking
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The number of seconds a disconnected player's Character remains in the world until despawned (via "braindeath").
|
||||
/// </summary>
|
||||
[Serialize(300.0f, IsPropertySaveable.Yes)]
|
||||
public float KillDisconnectedTime
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of seconds a disconnected player's Character remains in the world until despawned, in permadeath mode.
|
||||
/// The Character is helpless and vulnerable, this should be short enough to avoid unintended permadeath, but
|
||||
/// also long enough to discourage disconnecting just to avoid a potential incoming permadeath.
|
||||
/// </summary>
|
||||
[Serialize(10.0f, IsPropertySaveable.Yes)]
|
||||
public float DespawnDisconnectedPermadeathTime
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize(600.0f, IsPropertySaveable.Yes)]
|
||||
public float KickAFKTime
|
||||
@@ -966,6 +1024,9 @@ namespace Barotrauma.Networking
|
||||
[Serialize(999999, IsPropertySaveable.Yes)]
|
||||
public int MaximumMoneyTransferRequest { get; set; }
|
||||
|
||||
[Serialize(0f, IsPropertySaveable.Yes)]
|
||||
public float NewCampaignDefaultSalary { get; set; }
|
||||
|
||||
public CampaignSettings CampaignSettings { get; set; } = CampaignSettings.Empty;
|
||||
|
||||
private bool allowSubVoting;
|
||||
@@ -1190,7 +1251,7 @@ namespace Barotrauma.Networking
|
||||
set("subselectionmode", SubSelectionMode);
|
||||
set("voicechatenabled", VoiceChatEnabled);
|
||||
set("allowspectating", AllowSpectating);
|
||||
set("allowrespawn", AllowRespawn);
|
||||
set("allowrespawn", RespawnMode is RespawnMode.MidRound or RespawnMode.BetweenRounds);
|
||||
set("traitors", TraitorProbability.ToString(CultureInfo.InvariantCulture));
|
||||
set("friendlyfireenabled", AllowFriendlyFire);
|
||||
set("karmaenabled", KarmaEnabled);
|
||||
|
||||
Reference in New Issue
Block a user