diff --git a/src/Tgstation.Server.Host/Components/Events/EventType.cs b/src/Tgstation.Server.Host/Components/Events/EventType.cs
index 711d6ca246..1dbfdb2b6f 100644
--- a/src/Tgstation.Server.Host/Components/Events/EventType.cs
+++ b/src/Tgstation.Server.Host/Components/Events/EventType.cs
@@ -173,5 +173,11 @@
///
[EventScript("EngineInstallComplete")]
EngineInstallComplete,
+
+ ///
+ /// Before game server process is created. No parameters.
+ ///
+ [EventScript("DreamDaemonPreLaunch")]
+ DreamDaemonPreLaunch,
}
}
diff --git a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
index 1573d4c48a..0785051b64 100644
--- a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
+++ b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
+using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
@@ -516,6 +517,14 @@ namespace Tgstation.Server.Host.Components.Session
? logFilePath
: null);
+ // If this isnt a staging DD (From a Deployment), fire off events
+ if (!apiValidate)
+ await eventConsumer.HandleEvent(
+ EventType.DreamDaemonPreLaunch,
+ Enumerable.Empty(),
+ false,
+ cancellationToken);
+
var process = await processExecutor.LaunchProcess(
engineLock.ServerExePath,
dmbProvider.Directory,
@@ -539,7 +548,6 @@ namespace Tgstation.Server.Host.Components.Session
if (!engineLock.HasStandardOutput)
networkPromptReaper.RegisterProcess(process);
- // If this isnt a staging DD (From a Deployment), fire off an event
if (!apiValidate)
await eventConsumer.HandleEvent(
EventType.DreamDaemonLaunch,