mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
- Added Roslyn to the project. - Added an example of parsing game logic settings from a .csx file. - Made GameLogicSettings.csx hotloadable. - Adjusted exp point modifier settings for enemies and quests to be hotload friendly. - Implemented a ScriptModule interface for GameServer scripts. - Converted extended NPC facilities into scripting .csx files for each NPC and made directory hotloadable. New NPC options can be added after the server starts without a restart.
34 lines
984 B
C#
34 lines
984 B
C#
using Microsoft.CodeAnalysis.Scripting;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Scripting
|
|
{
|
|
public abstract class ScriptModule
|
|
{
|
|
public abstract string ModuleRoot { get; }
|
|
public abstract string Filter { get; }
|
|
public abstract bool ScanSubdirectories { get; }
|
|
public FileSystemWatcher Watcher { get; set; }
|
|
|
|
public HashSet<string> Scripts { get; set; }
|
|
|
|
public ScriptModule()
|
|
{
|
|
Scripts = new HashSet<string>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Options passed into the compilation unit.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public abstract ScriptOptions Options();
|
|
|
|
/// <summary>
|
|
/// Evaluates the result returned by the script.
|
|
/// </summary>
|
|
/// <param name="result"></param>
|
|
/// <returns></returns>
|
|
public abstract bool EvaluateResult(ScriptState<object> result);
|
|
}
|
|
}
|