Files
LuaCsForBarotraumaEP/BarotraumaServer/Source/Screens/NetLobbyScreen.cs
T
juanjp600 fbe7dfc6fb Dedicated server actually works to some extent
Clients can connect and use chat, the sub list isn't synced properly and there's no way to start a game yet
2017-06-19 15:12:19 -03:00

75 lines
1.8 KiB
C#

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Barotrauma.Networking;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using System.ComponentModel;
namespace Barotrauma
{
partial class NetLobbyScreen : Screen
{
public Submarine SelectedSub;
public Submarine SelectedShuttle;
private GameModePreset[] GameModes;
public int SelectedModeIndex;
public GameModePreset SelectedMode
{
get { return GameModes[SelectedModeIndex]; }
}
public string ServerMessageText;
public int MissionTypeIndex;
public List<JobPrefab> JobPreferences
{
get
{
return null;
}
}
public override void Select()
{
List<Submarine> subsToShow = Submarine.SavedSubmarines.Where(s => !s.HasTag(SubmarineTag.HideInMenus)).ToList();
SelectedSub = subsToShow[0];
SelectedShuttle = subsToShow[0]; //TODO: don't use the same sub as a shuttle by default
DebugConsole.NewMessage("Selected sub: " + SelectedSub.Name, Color.White);
DebugConsole.NewMessage("Selected shuttle: " + SelectedShuttle.Name, Color.White);
}
private List<Submarine> subs = new List<Submarine>();
public List<Submarine> GetSubList()
{
return subs;
}
public string LevelSeed
{
get
{
return levelSeed;
}
set
{
if (levelSeed == value) return;
levelSeed = value;
}
}
public bool StartButtonEnabled
{
get { return true; }
set { /* do nothing */ }
}
}
}