2024-12-23 14:40:57 -05:00
|
|
|
using Arrowgene.Ddon.Server.Scripting.modules;
|
|
|
|
|
using Arrowgene.Ddon.Shared.Scripting;
|
|
|
|
|
using Arrowgene.Logging;
|
|
|
|
|
|
|
|
|
|
namespace Arrowgene.Ddon.Server
|
|
|
|
|
{
|
|
|
|
|
public class Globals
|
|
|
|
|
{
|
|
|
|
|
// Currently no script globals are required
|
|
|
|
|
// but leave this class as a way to introduce
|
|
|
|
|
// globals if needed.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ServerScriptManager : ScriptManager<Globals>
|
|
|
|
|
{
|
|
|
|
|
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(ServerScriptManager));
|
|
|
|
|
|
|
|
|
|
private Globals Globals { get; set; }
|
|
|
|
|
|
2025-04-12 18:34:55 -04:00
|
|
|
public GameServerSettingsModule GameServerSettingsModule { get; private set; }
|
2024-12-26 22:26:23 -05:00
|
|
|
public ServerScriptManager(string assetsPath) : base(assetsPath, "")
|
2024-12-23 14:40:57 -05:00
|
|
|
{
|
|
|
|
|
Globals = new Globals();
|
|
|
|
|
|
2025-04-12 18:34:55 -04:00
|
|
|
GameServerSettingsModule = new GameServerSettingsModule(ScriptsRoot);
|
|
|
|
|
|
2024-12-23 14:40:57 -05:00
|
|
|
// Add modules to the list so the generic logic can iterate over all scripting modules
|
2025-02-25 00:52:52 -05:00
|
|
|
ScriptModules[GameServerSettingsModule.ModuleRoot] = GameServerSettingsModule;
|
2024-12-23 14:40:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
2025-02-25 00:52:52 -05:00
|
|
|
PathsToIgnore.Add(GameServerSettingsModule.TemplatesDirectory);
|
2024-12-23 14:40:57 -05:00
|
|
|
base.Initialize(Globals);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|