public static void LoadFake(DLCManager instance, string DLCName) { DLCManager.SetHostOwnedDLCs(GetOwnedDLCsFake()); // I don't remember if this is needed. DLCWebsiteInfo dlcInfo = DLCManager.NameToDLCInfo(DLCName); /*if (!SteamManager.IsSubscribedApp(dlcInfo.AppId)) * { * Chat.Log("You do not own DLC " + dlcInfo.Name + ". Cannot load.", Colour.red, ChatMessageType.Game, * false); * TTSUtilities.OpenURL("http://store.steampowered.com/app/" + dlcInfo.AppId.ToString()); * } * else * { * * }*/ Chat.Log(dlcInfo.Name + " has been haxed. Thanks & have fun.", Colour.Red, ChatMessageType.Game, false); instance.StartCoroutine(instance.LoadSaveFile(dlcInfo)); }
public static List <UIGridMenu.GridButtonDLC> GetDLCGridButtonsFake(UIGridMenuGames gridmenu, GameObject closeMenu) { Action <List <UIGridMenu.GridButtonDLC> > action; List <UIGridMenu.GridButtonDLC> list = new List <UIGridMenu.GridButtonDLC>(); List <DLCWebsiteInfo> dLCInfos = DLCManager.DLCInfos; for (int i = 0; i < dLCInfos.Count; i++) { DLCWebsiteInfo info = dLCInfos[i]; UIGridMenu.GridButtonDLC item = new UIGridMenu.GridButtonDLC { Name = string.IsNullOrEmpty(info.DisplayName) ? info.Name : info.DisplayName, LoadName = info.Name, ThumbnailURL = info.ThumbnailURL, AppId = info.AppId, DiscountPercent = info.DiscountPercent, New = info.New, Lock = false,//!SteamManager.IsSubscribedApp(info.AppId), Purchased = SteamManager.SubscribeDate(info.AppId), ButtonColor = gridmenu.DLCColor, BackgroundColor = gridmenu.DLCDarkColor, CloseMenu = closeMenu }; item.Tags.TryAdd <string>("dlc"); list.Add(item); } // Reflection Dictionary <string, System.Action <List <UIGridMenu.GridButtonDLC> > > DLCSorts = (Dictionary <string, Action <List <UIGridMenu.GridButtonDLC> > >)GetInstanceField(typeof(UIGridMenuGames), gridmenu, "DLCSorts"); // Didn't check if this changes string currentDLCSort = (string)GetInstanceField(typeof(UIGridMenuGames), gridmenu, "currentDLCSort"); if (DLCSorts.TryGetValue(currentDLCSort, out action) && (action != null)) { action(list); } list.Reverse(); return(list); }