Skip to content

Commit

Permalink
Moved configs into config subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Byte-Nova committed Dec 28, 2024
1 parent 9c1f85e commit 89c9ea5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GameServer.Files
namespace GameServer.Core.Configs
{
public class BackupConfigFile
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GameServer.Files;
namespace GameServer.Core.Configs;

[Serializable]
public class ChatConfigFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GameServer.Files
namespace GameServer.Core.Configs
{
[Serializable]
public class DiscordConfigFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GameServer.Files
namespace GameServer.Core.Configs
{
[Serializable]
public class ServerConfigFile
Expand Down Expand Up @@ -32,7 +32,7 @@ public class ServerConfigFile
public int TemporalEventProtectionTime = 3600;

public bool TemporalAidProtection = false;

public int TemporalAidProtectionTime = 3600;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace GameServer.Files
namespace GameServer.Core.Configs
{
public class WhitelistFile
public class WhitelistConfigFile
{
public bool UseWhitelist = false;

Expand Down
6 changes: 3 additions & 3 deletions Source/Server/Core/Main.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Globalization;
using GameServer.Files;
using GameServer.Core.Configs;
using GameServer.Managers;
using GameServer.Managers.External;
using GameServer.Misc;
Expand Down Expand Up @@ -251,10 +251,10 @@ public static void LoadValueFile(ServerFileMode mode, bool broadcast = true)

case ServerFileMode.Whitelist:
pathToLoad = Path.Combine(Master.configsPath, "WhitelistConfig.json");
if (File.Exists(pathToLoad)) Master.whitelist = Serializer.SerializeFromFile<WhitelistFile>(pathToLoad);
if (File.Exists(pathToLoad)) Master.whitelist = Serializer.SerializeFromFile<WhitelistConfigFile>(pathToLoad);
else
{
Master.whitelist = new WhitelistFile();
Master.whitelist = new WhitelistConfigFile();
Serializer.SerializeToFile(pathToLoad, Master.whitelist);
}
break;
Expand Down
4 changes: 2 additions & 2 deletions Source/Server/Core/Master.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GameServer.Files;
using GameServer.Core.Configs;
using Shared;
using System.Reflection;

Expand Down Expand Up @@ -50,7 +50,7 @@ public static class Master

//References

public static WhitelistFile whitelist;
public static WhitelistConfigFile whitelist;

public static SiteValuesFile siteValues;

Expand Down

0 comments on commit 89c9ea5

Please sign in to comment.