Files
RobustToolbox/Robust.Shared/ProgramShared.cs
T
Pieter-Jan Briers d945247f31 Add necessary infrastructure to allow content to launch game from itself.
This allows us to make Content.Client and Content.Server Exe projects so that they can be executed directly via your IDE. This'll help wtih not forgetting to do a full rebuild and such.
2020-01-22 20:16:29 +01:00

25 lines
590 B
C#

using System.IO;
using Robust.Shared.ContentPack;
namespace Robust.Shared
{
internal static class ProgramShared
{
#if !FULL_RELEASE
internal static string FindContentRootDir()
{
var contentPath = PathHelpers.ExecutableRelativeFile("Content.Shared.dll");
// If Content.Shared.dll is next to us,
// that means we've been executed from one of content's bin directories.
if (File.Exists(contentPath))
{
return "../../";
}
return "../../../";
}
#endif
}
}