Further separation of client-specific code
Still not done here, just gonna push a commit now so I can pull this from elsewhere.
This commit is contained in:
@@ -11,25 +11,69 @@ namespace Barotrauma
|
||||
{
|
||||
class GameMain
|
||||
{
|
||||
public static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
|
||||
public static World World;
|
||||
public static GameSettings Config;
|
||||
|
||||
public static GameServer Server;
|
||||
|
||||
public static GameSession GameSession;
|
||||
|
||||
public static GameClient Client
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public const GameClient Client = null;
|
||||
public static NetworkMember NetworkMember
|
||||
{
|
||||
get { return Server as NetworkMember; }
|
||||
}
|
||||
|
||||
public static Screen EditMapScreen
|
||||
public static GameSession GameSession;
|
||||
|
||||
public static GameMain Instance
|
||||
{
|
||||
get { return null; }
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
//only screens the server implements
|
||||
public static GameScreen GameScreen;
|
||||
public static NetLobbyScreen NetLobbyScreen;
|
||||
|
||||
//null screens because they are not implemented by the server,
|
||||
//but they're checked for all over the place
|
||||
//TODO: maybe clean up instead of having these constants
|
||||
public const Screen MainMenuScreen = null;
|
||||
public const Screen LobbyScreen = null;
|
||||
|
||||
public const Screen ServerListScreen = null;
|
||||
|
||||
public const Screen EditMapScreen = null;
|
||||
public const Screen EditCharacterScreen = null;
|
||||
|
||||
//
|
||||
|
||||
public static ContentPackage SelectedPackage
|
||||
{
|
||||
get { return Config.SelectedContentPackage; }
|
||||
}
|
||||
|
||||
public GameMain()
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
Config = new GameSettings("serverconfig.xml");
|
||||
if (Config.WasGameUpdated)
|
||||
{
|
||||
UpdaterUtil.CleanOldFiles();
|
||||
Config.WasGameUpdated = false;
|
||||
Config.Save("serverconfig.xml");
|
||||
}
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
//TODO: implement
|
||||
}
|
||||
|
||||
public CoroutineHandle ShowLoading(IEnumerable<object> loader, bool waitKeyHit = true)
|
||||
{
|
||||
return CoroutineManager.StartCoroutine(loader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user