public static bool Prefix(GameAchievements.Id id) { try { if (typeof(GameAchievements).GetMethod("GetPlatformId", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, new object[] { id }) is string platformId) { PlatformUtils.main.GetServices().UnlockAchievement(platformId); Logger.Log($"[{QMod.assembly}] Force unlocked achievement {platformId}!", QMod.assembly); } } catch (Exception e) { Logger.Exception(e, LoggedWhen.InPatch, QMod.assembly); } return(false); }
internal static bool Prefix(GameAchievements.Id id) { PlatformUtils.main.GetServices().UnlockAchievement(id); return(false); }