Skip to content

Commit

Permalink
-Small string and variable modifications in Injector
Browse files Browse the repository at this point in the history
-Added null check to DebugReadout
  • Loading branch information
DragonFire47 committed Jun 8, 2021
1 parent 7a4f03e commit 316a46e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions PulsarInjector/Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ static void Main(string[] args)
File.Copy(targetAssemblyPath, backupPath, true);
}

Logger.Info("=== Creating Mods directory ===");
var libdir = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(targetAssemblyPath), "Libraries"));
Logger.Info("=== Creating directories ===");
DirectoryInfo libdir = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(targetAssemblyPath), "Libraries"));
Directory.CreateDirectory(Path.Combine(libdir.FullName, "Unmanaged"));
Directory.CreateDirectory(Path.Combine(libdir.FullName, "Managed"));
string pluginsdir = Path.Combine(Path.GetDirectoryName(targetAssemblyPath), "Plugins");
var modsdir = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(targetAssemblyPath), "Mods"));
DirectoryInfo modsdir = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(targetAssemblyPath), "Mods"));
if (Directory.Exists(pluginsdir))
{
Logger.Info("Replacing Old Plugins Directory");
Expand Down
2 changes: 1 addition & 1 deletion PulsarPluginLoader/Patches/DebugReadout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DebugReadout
{
static void Postfix(Text ___CurrentVersionLabel)
{
if (DebugModeCommand.DebugMode && PLServer.Instance != null && PLEncounterManager.Instance != null && PLNetworkManager.Instance != null)
if (DebugModeCommand.DebugMode && PLServer.Instance != null && PLEncounterManager.Instance != null && PLNetworkManager.Instance != null && ___CurrentVersionLabel != null)
{
PLPawn localPawn = PLNetworkManager.Instance.LocalPlayer.GetPawn();
Vector3 pos = localPawn != null ? localPawn.transform.position : Vector3.zero;
Expand Down
2 changes: 1 addition & 1 deletion PulsarPluginLoader/PulsarPluginLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<Message Importance="High" Text="PULSAR_PATH set but directory doesn't exist! PULSAR_PATH='$(PULSAR_PATH)'" />
</Target>
<PropertyGroup>
<PostBuildEvent>SET PLUGIN_DIR="F:\"
<PostBuildEvent>SET PLUGIN_DIR="D:\Program Files (x86)\Steam\steamapps\common\PULSARLostColony\PULSAR_LostColony_Data\Managed"

IF EXIST %25PLUGIN_DIR%25 (
ECHO Copying DLLs to Plugins directory...
Expand Down

0 comments on commit 316a46e

Please sign in to comment.