mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 18:32:45 +00:00
bleh
This commit is contained in:
parent
0121a527e6
commit
c54fd1039e
@ -1,4 +1,5 @@
|
||||
using Steamworks;
|
||||
using HarmonyLib;
|
||||
using Steamworks;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
@ -63,20 +64,24 @@ public static class Program
|
||||
case 0:
|
||||
var owned = SteamApps.BIsDlcInstalled((AppId_t)1622100U);
|
||||
Log($"dlc owned: {owned}");
|
||||
|
||||
exitCode = owned ? 1 : 0;
|
||||
break;
|
||||
|
||||
// earn achievement
|
||||
case 1:
|
||||
Log("Earn " + type);
|
||||
if (!SteamUserStats.SetAchievement(Achievements.s_names[type]))
|
||||
var achievementType = (Achievements.Type)arg;
|
||||
Log("Earn " + achievementType);
|
||||
// for some reason even with unsafe code turned on it throws a FieldAccessException
|
||||
var s_names = (string[])AccessTools.Field(typeof(Achievements), "s_names").GetValue(null);
|
||||
if (!SteamUserStats.SetAchievement(s_names[(int)achievementType]))
|
||||
{
|
||||
LogError("Unable to grant achievement \"" + Achievements.s_names[type] + "\"");
|
||||
LogError("Unable to grant achievement \"" + s_names[(int)achievementType] + "\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
exitCode = 0;
|
||||
}
|
||||
SteamUserStats.StoreStats();
|
||||
|
||||
exitCode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,9 @@ public static class Interop
|
||||
});
|
||||
process!.WaitForExit();
|
||||
|
||||
Log($"output:\n{process.StandardOutput.ReadToEnd()}");
|
||||
LogError($"error:\n{process.StandardError.ReadToEnd()}");
|
||||
Log($"exit code: {process.ExitCode}");
|
||||
Log($"StandardOutput:\n{process.StandardOutput.ReadToEnd()}");
|
||||
LogError($"StandardError:\n{process.StandardError.ReadToEnd()}");
|
||||
Log($"ExitCode: {process.ExitCode}");
|
||||
|
||||
return process.ExitCode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user