2014-03-14 14:13:41 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "EngineSettingsPrivatePCH.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements the EngineSettings module.
|
|
|
|
|
*/
|
|
|
|
|
class FEngineSettingsModule
|
|
|
|
|
: public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
2014-06-12 23:22:18 -04:00
|
|
|
// IModuleInterface interface
|
2014-05-08 21:34:16 -04:00
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void StartupModule( ) override { }
|
|
|
|
|
virtual void ShutdownModule( ) override { }
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual bool SupportsDynamicReloading( ) override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2014-05-08 21:34:16 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/* Class constructors
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2014-06-11 12:03:52 -04:00
|
|
|
UConsoleSettings::UConsoleSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
2014-05-08 21:34:16 -04:00
|
|
|
UGameMapsSettings::UGameMapsSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
, bUseSplitscreen(true)
|
|
|
|
|
, TwoPlayerSplitscreenLayout(ETwoPlayerSplitScreenType::Horizontal)
|
|
|
|
|
, ThreePlayerSplitscreenLayout(EThreePlayerSplitScreenType::FavorTop)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
UGameNetworkManagerSettings::UGameNetworkManagerSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UGameSessionSettings::UGameSessionSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UGeneralEngineSettings::UGeneralEngineSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UGeneralProjectSettings::UGeneralProjectSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UHudSettings::UHudSettings( const class FPostConstructInitializeProperties& PCIP )
|
|
|
|
|
: Super(PCIP)
|
|
|
|
|
{ }
|
|
|
|
|
|
2014-05-08 21:34:16 -04:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/* Static functions
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
const FString& UGameMapsSettings::GetGameDefaultMap( )
|
|
|
|
|
{
|
|
|
|
|
return IsRunningDedicatedServer()
|
|
|
|
|
? GetDefault<UGameMapsSettings>()->ServerDefaultMap
|
|
|
|
|
: GetDefault<UGameMapsSettings>()->GameDefaultMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const FString& UGameMapsSettings::GetGlobalDefaultGameMode( )
|
|
|
|
|
{
|
2014-06-10 11:08:37 -04:00
|
|
|
UGameMapsSettings* GameMapsSettings = Cast<UGameMapsSettings>(UGameMapsSettings::StaticClass()->GetDefaultObject());
|
|
|
|
|
|
|
|
|
|
return IsRunningDedicatedServer() && GameMapsSettings->GlobalDefaultServerGameMode.IsValid()
|
2014-07-22 08:14:39 -04:00
|
|
|
? GameMapsSettings->GlobalDefaultServerGameMode.ToString()
|
|
|
|
|
: GameMapsSettings->GlobalDefaultGameMode.ToString();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UGameMapsSettings::SetGameDefaultMap( const FString& NewMap )
|
|
|
|
|
{
|
|
|
|
|
UGameMapsSettings* GameMapsSettings = Cast<UGameMapsSettings>(UGameMapsSettings::StaticClass()->GetDefaultObject());
|
|
|
|
|
|
|
|
|
|
if (IsRunningDedicatedServer())
|
|
|
|
|
{
|
|
|
|
|
GameMapsSettings->ServerDefaultMap = NewMap;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GameMapsSettings->GameDefaultMap = NewMap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-16 10:40:34 -04:00
|
|
|
void UGameMapsSettings::SetGlobalDefaultGameMode( const FString& NewGameMode )
|
|
|
|
|
{
|
|
|
|
|
UGameMapsSettings* GameMapsSettings = Cast<UGameMapsSettings>(UGameMapsSettings::StaticClass()->GetDefaultObject());
|
|
|
|
|
|
|
|
|
|
GameMapsSettings->GlobalDefaultGameMode = NewGameMode;
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FEngineSettingsModule, EngineSettings);
|