mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
- Refactored code so implementation can be shared between Server and DdonGameServer. - Moved settings into settings module and implemented an example using a less structured scripting module interface. - Created new ScriptableSettings class to assist with interacting with non-structured settings module. - Created README.md files for suggestions and guidelines for module implementation.
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using Arrowgene.Ddon.Server;
|
|
using Arrowgene.Ddon.Shared.Scripting;
|
|
using Arrowgene.Logging;
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Scripting
|
|
{
|
|
public class GlobalVariables
|
|
{
|
|
public GlobalVariables(DdonGameServer server)
|
|
{
|
|
Server = server;
|
|
}
|
|
|
|
public DdonGameServer Server { get; }
|
|
};
|
|
|
|
public class GameServerScriptManager : ScriptManager<GlobalVariables>
|
|
{
|
|
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(GameServerScriptManager));
|
|
|
|
private DdonGameServer Server { get; }
|
|
private GlobalVariables Globals { get; }
|
|
public NpcExtendedFacilityModule NpcExtendedFacilityModule { get; private set; } = new NpcExtendedFacilityModule();
|
|
|
|
public GameServerScriptManager(DdonGameServer server) : base(server.AssetRepository.AssetsPath)
|
|
{
|
|
Server = server;
|
|
Globals = new GlobalVariables(Server);
|
|
|
|
// Add modules to the list so the generic logic can iterate over all scripting modules
|
|
ScriptModules[NpcExtendedFacilityModule.ModuleRoot] = NpcExtendedFacilityModule;
|
|
}
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize(Globals);
|
|
}
|
|
}
|
|
}
|