mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Fix global event scripts
This commit is contained in:
@@ -794,13 +794,20 @@ namespace Tgstation.Server.Host.Components.StaticFiles
|
||||
var tasks = directories.Select<string, ValueTask>(
|
||||
async scriptDirectory =>
|
||||
{
|
||||
var files = await ioManager.GetFilesWithExtension(scriptDirectory, platformIdentifier.ScriptFileExtension, false, cancellationToken);
|
||||
var resolvedScriptsDir = ioManager.ResolvePath(scriptDirectory);
|
||||
logger.LogTrace("Checking for scripts in {directory}...", scriptDirectory);
|
||||
var files = await ioManager.GetFilesWithExtension(scriptDirectory, platformIdentifier.ScriptFileExtension, false, cancellationToken);
|
||||
|
||||
var scriptFiles = files
|
||||
.Select(x => ioManager.ConcatPath(resolvedScriptsDir, ioManager.GetFileName(x)))
|
||||
.Select(ioManager.GetFileName)
|
||||
.Where(x => scriptNames.Any(
|
||||
scriptName => x.StartsWith(scriptName, StringComparison.Ordinal)));
|
||||
scriptName => x.StartsWith(scriptName, StringComparison.Ordinal)))
|
||||
.Select(x =>
|
||||
{
|
||||
var fullScriptPath = ioManager.ConcatPath(resolvedScriptsDir, x);
|
||||
logger.LogTrace("Found matching script: {scriptPath}", fullScriptPath);
|
||||
return fullScriptPath;
|
||||
});
|
||||
|
||||
lock (allScripts)
|
||||
allScripts.AddRange(scriptFiles);
|
||||
|
||||
@@ -19,6 +19,7 @@ General:
|
||||
OpenDreamGitUrl: https://github.com/OpenDreamProject/OpenDream # The repository to retrieve OpenDream from
|
||||
OpenDreamGitTagPrefix: v # The prefix to the OpenDream semver as tags appear in the git repository
|
||||
OpenDreamSuppressInstallOutput: false # Suppress the dotnet output of creating an OpenDream installation. Known to cause hangs in CI.
|
||||
AdditionalEventScriptsDirectories: # An array of directories that are considered to contain EventScripts alongside instance directories. Working directory will remain the instance EventScripts directory.
|
||||
Session:
|
||||
HighPriorityLiveDreamDaemon: false # If DreamDaemon instances should run as higher priority processes
|
||||
LowPriorityDeploymentProcesses: true # If TGS Deployments should run as lower priority processes
|
||||
|
||||
Reference in New Issue
Block a user