source code checkin

This commit is contained in:
Brett Hewitson 2021-01-07 16:23:23 +10:00
parent 5f8fb2c825
commit 7e57b72e35
675 changed files with 168433 additions and 0 deletions

View file

@ -0,0 +1,13 @@
using ServerManagerTool.Common.Attibutes;
using ServerManagerTool.Enums;
namespace ServerManagerTool.Lib
{
public class IniFileEntryAttribute : BaseIniFileEntryAttribute
{
public IniFileEntryAttribute(IniFiles file, IniSections section, ServerProfileCategory category, string key = "")
: base(file, section, category, key)
{
}
}
}

View file

@ -0,0 +1,9 @@
namespace ServerManagerTool.Lib
{
public enum IniFiles
{
Engine,
Game,
GameUserSettings,
}
}

View file

@ -0,0 +1,20 @@
namespace ServerManagerTool.Lib
{
public enum IniSections
{
// GameUserSettings.ini
GUS_ServerSettings,
GUS_ShooterGameUserSettings,
GUS_ScalabilityGroups,
GUS_SessionSettings,
GUS_GameSession,
GUS_MultiHome,
GUS_MessageOfTheDay,
// Game.ini
Game_ShooterGameMode,
// Misc
Custom,
}
}

View file

@ -0,0 +1,44 @@
using ServerManagerTool.Common.Serialization;
using System;
using System.Collections.Generic;
namespace ServerManagerTool.Lib
{
public class SystemIniFile : BaseSystemIniFile
{
public static readonly Dictionary<Enum, string> IniFileNames = new Dictionary<Enum, string>
{
{ IniFiles.GameUserSettings, Config.Default.ServerGameUserSettingsConfigFile },
{ IniFiles.Game, Config.Default.ServerGameConfigFile },
{ IniFiles.Engine, Config.Default.ServerEngineConfigFile },
};
public static readonly Dictionary<Enum, string> IniSectionNames = new Dictionary<Enum, string>
{
// GameUserSettings sections, used by the server manager
{ IniSections.GUS_ServerSettings, "ServerSettings" },
{ IniSections.GUS_ShooterGameUserSettings, "/Script/ShooterGame.ShooterGameUserSettings" },
{ IniSections.GUS_ScalabilityGroups, "ScalabilityGroups" },
{ IniSections.GUS_SessionSettings, "SessionSettings" },
{ IniSections.GUS_GameSession, "/Script/Engine.GameSession"},
{ IniSections.GUS_MultiHome, "MultiHome" },
{ IniSections.GUS_MessageOfTheDay, "MessageOfTheDay" },
// GameUserSettings sections, not used by server manager
// Game sections, used by the server manager
{ IniSections.Game_ShooterGameMode, "/script/shootergame.shootergamemode" },
// Game sections, not used by server manager
};
public override Dictionary<Enum, string> FileNames => IniFileNames;
public override Dictionary<Enum, string> SectionNames => IniSectionNames;
public SystemIniFile(string iniPath)
: base(iniPath)
{
}
}
}