Unstable 1.8.4.0
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Barotrauma.Networking;
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Networking;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
@@ -9,6 +11,7 @@ namespace Barotrauma
|
||||
partial class NetLobbyScreen : Screen
|
||||
{
|
||||
private SubmarineInfo selectedSub;
|
||||
private SubmarineInfo selectedEnemySub;
|
||||
private SubmarineInfo selectedShuttle;
|
||||
|
||||
public bool RadiationEnabled = true;
|
||||
@@ -26,6 +29,18 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MaybeNull, AllowNull]
|
||||
public SubmarineInfo SelectedEnemySub
|
||||
{
|
||||
get => selectedEnemySub;
|
||||
set
|
||||
{
|
||||
selectedEnemySub = value;
|
||||
lastUpdateID++;
|
||||
}
|
||||
}
|
||||
|
||||
public SubmarineInfo SelectedShuttle
|
||||
{
|
||||
get { return selectedShuttle; }
|
||||
@@ -81,31 +96,19 @@ namespace Barotrauma
|
||||
get { return GameModes[SelectedModeIndex]; }
|
||||
}
|
||||
|
||||
private MissionType missionType;
|
||||
public MissionType MissionType
|
||||
public IEnumerable<Identifier> MissionTypes
|
||||
{
|
||||
get { return missionType; }
|
||||
get { return GameMain.NetworkMember.ServerSettings.AllowedRandomMissionTypes; }
|
||||
set
|
||||
{
|
||||
lastUpdateID++;
|
||||
missionType = value;
|
||||
if (GameMain.NetworkMember?.ServerSettings != null)
|
||||
{
|
||||
GameMain.NetworkMember.ServerSettings.MissionType = missionType.ToString();
|
||||
GameMain.NetworkMember.ServerSettings.MissionTypes = string.Join(",", value.Select(t => t.ToIdentifier()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string MissionTypeName
|
||||
{
|
||||
get { return missionType.ToString(); }
|
||||
set
|
||||
{
|
||||
Enum.TryParse(value, out MissionType type);
|
||||
MissionType = type;
|
||||
}
|
||||
}
|
||||
|
||||
public NetLobbyScreen()
|
||||
{
|
||||
LevelSeed = ToolBox.RandomSeed(8);
|
||||
|
||||
Reference in New Issue
Block a user