Exemple #1
0
 public void setCat8()
 {
     if (SteamApps.BIsDlcInstalled((AppId_t)863760))
     {
         PlayerPrefs.SetInt("CatChoice", 8);
         for (int i = 0; i < 8; i++)
         {
             GameObject.Find("catButt" + (i + 1)).GetComponent <Image>().color = Color.red;
         }
         GameObject.Find("catButt8").GetComponent <Image>().color = Color.green;
     }
     else
     {
         StartCoroutine(dlcNo());
     }
 }
Exemple #2
0
    // Token: 0x06000A0F RID: 2575 RVA: 0x00048D4C File Offset: 0x00046F4C
    private bool IsDLCInstalled(uint id)
    {
        AppId_t x        = new AppId_t(id);
        int     dlccount = SteamApps.GetDLCCount();

        for (int i = 0; i < dlccount; i++)
        {
            AppId_t appId_t;
            bool    flag;
            string  text;
            if (SteamApps.BGetDLCDataByIndex(i, out appId_t, out flag, out text, 200) && x == appId_t)
            {
                ZLog.Log("DLC installed:" + id);
                return(SteamApps.BIsDlcInstalled(appId_t));
            }
        }
        return(false);
    }
    public static void SteamInit()
    {
        if (fa.dontConnectSteam)
        {
            return;
        }
        if (SteamManager.Initialized)        //doesn't really need to call this, I guess
        {
            AppId_t appId2 = new AppId_t(1240750);
            xa.hasAlpDLC = SteamApps.BIsDlcInstalled(appId2);
            Debug.Log("Checking Alp DLC: " + xa.hasAlpDLC);

            AppId_t appId = new AppId_t(1121810);
            xa.hasBonusDLC = SteamApps.BIsDlcInstalled(appId);
            Debug.Log("Checking Gold Edition DLC: " + xa.hasBonusDLC);


            RawFuncs.self.SetDLCText();
        }
    }
Exemple #4
0
        private static bool TryAddMod(ModMetaData mod)
        {
            if (mod.Official && !mod.IsCoreMod && SteamManager.Initialized && mod.SteamAppId != 0)
            {
                bool flag = true;
                try
                {
                    flag = SteamApps.BIsDlcInstalled(new AppId_t((uint)mod.SteamAppId));
                }
                catch (Exception arg)
                {
                    Log.Error("Could not determine if a DLC is installed: " + arg);
                }
                if (!flag)
                {
                    return(false);
                }
            }
            ModMetaData modWithIdentifier = GetModWithIdentifier(mod.PackageId);

            if (modWithIdentifier != null)
            {
                if (mod.RootDir.FullName != modWithIdentifier.RootDir.FullName)
                {
                    if (mod.OnSteamWorkshop != modWithIdentifier.OnSteamWorkshop)
                    {
                        ModMetaData modMetaData = mod.OnSteamWorkshop ? mod : modWithIdentifier;
                        if (!modMetaData.appendPackageIdSteamPostfix)
                        {
                            modMetaData.appendPackageIdSteamPostfix = true;
                            return(TryAddMod(mod));
                        }
                    }
                    Log.Error("Tried loading mod with the same packageId multiple times: " + mod.PackageIdPlayerFacing + ". Ignoring the duplicates.\n" + mod.RootDir.FullName + "\n" + modWithIdentifier.RootDir.FullName);
                    return(false);
                }
                return(false);
            }
            mods.Add(mod);
            return(true);
        }
Exemple #5
0
 public override void OnEnter()
 {
     result.Value = SteamApps.BIsDlcInstalled((AppId_t)(uint)dlcAppID.Value);
     Finish();
 }
    public void RenderOnGUI()
    {
        GUILayout.Label("SteamApps.BIsSubscribed() : " + SteamApps.BIsSubscribed());
        GUILayout.Label("SteamApps.BIsLowViolence() : " + SteamApps.BIsLowViolence());
        GUILayout.Label("SteamApps.BIsCybercafe() : " + SteamApps.BIsCybercafe());
        GUILayout.Label("SteamApps.BIsVACBanned() : " + SteamApps.BIsVACBanned());
        GUILayout.Label("SteamApps.GetCurrentGameLanguage() : " + SteamApps.GetCurrentGameLanguage());
        GUILayout.Label("SteamApps.GetAvailableGameLanguages() : " + SteamApps.GetAvailableGameLanguages());
        GUILayout.Label("SteamApps.BIsSubscribedApp(SteamUtils.GetAppID()) : " + SteamApps.BIsSubscribedApp(SteamUtils.GetAppID()));
        GUILayout.Label("SteamApps.BIsDlcInstalled(110902) : " + SteamApps.BIsDlcInstalled((AppId_t)110902));         // pieterw test DLC
        GUILayout.Label("SteamApps.GetEarliestPurchaseUnixTime(SteamUtils.GetAppID()) : " + SteamApps.GetEarliestPurchaseUnixTime(SteamUtils.GetAppID()));
        GUILayout.Label("SteamApps.BIsSubscribedFromFreeWeekend() : " + SteamApps.BIsSubscribedFromFreeWeekend());
        GUILayout.Label("SteamApps.GetDLCCount() : " + SteamApps.GetDLCCount());

        for (int iDLC = 0; iDLC < SteamApps.GetDLCCount(); ++iDLC)
        {
            AppId_t AppID;
            bool    Available;
            string  Name;
            bool    ret = SteamApps.BGetDLCDataByIndex(iDLC, out AppID, out Available, out Name, 128);
            GUILayout.Label("SteamApps.BGetDLCDataByIndex(" + iDLC + ", out AppID, out Available, out Name, 128) : " + ret + " -- " + AppID + " -- " + Available + " -- " + Name);
        }

        if (GUILayout.Button("SteamApps.InstallDLC(110902)"))
        {
            SteamApps.InstallDLC((AppId_t)110902);             // pieterw test DLC
        }

        if (GUILayout.Button("SteamApps.UninstallDLC(110902)"))
        {
            SteamApps.UninstallDLC((AppId_t)110902);             // pieterw test DLC
        }

        if (GUILayout.Button("SteamApps.RequestAppProofOfPurchaseKey(SteamUtils.GetAppID())"))
        {
            SteamApps.RequestAppProofOfPurchaseKey(SteamUtils.GetAppID());
        }

        {
            string Name;
            bool   ret = SteamApps.GetCurrentBetaName(out Name, 128);
            if (Name == null)
            {
                Name = "";
            }
            GUILayout.Label("SteamApps.GetCurrentBetaName(out Name, 128) : " + ret + " -- " + Name);
        }

        if (GUILayout.Button("SteamApps.MarkContentCorrupt(true)"))
        {
            print("SteamApps.MarkContentCorrupt(true) : " + SteamApps.MarkContentCorrupt(true));
        }

        if (GUILayout.Button("SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32)"))
        {
            DepotId_t[] Depots = new DepotId_t[32];
            uint        ret    = SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32);
            for (int i = 0; i < ret; ++i)
            {
                print("SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32) : " + ret + " -- #" + i + " -- " + Depots[i]);
            }
        }

        {
            string Folder;
            uint   ret = SteamApps.GetAppInstallDir(SteamUtils.GetAppID(), out Folder, 260);
            if (Folder == null)
            {
                Folder = "";
            }

            GUILayout.Label("SteamApps.GetAppInstallDir(480, out Folder, 260) : " + ret + " -- " + Folder);
        }

        GUILayout.Label("SteamApps.BIsAppInstalled(480) : " + SteamApps.BIsAppInstalled(SteamUtils.GetAppID()));
        GUILayout.Label("SteamApps.GetAppOwner() : " + SteamApps.GetAppOwner());

        // Run the test and then use steam://run/480//?test=testing;param2=value2; in your browser to try this out
        GUILayout.Label("SteamApps.GetLaunchQueryParam(\"test\") : " + SteamApps.GetLaunchQueryParam("test"));

        {
            ulong BytesDownloaded;
            ulong BytesTotal;
            bool  ret = SteamApps.GetDlcDownloadProgress((AppId_t)110902, out BytesDownloaded, out BytesTotal);
            GUILayout.Label("SteamApps.GetDlcDownloadProgress((AppId_t)110902, out BytesDownloaded, out BytesTotal): " + ret + " -- " + BytesDownloaded + " -- " + BytesTotal);
        }

        GUILayout.Label("SteamApps.GetAppBuildId(): " + SteamApps.GetAppBuildId());
#if _PS3
        if (GUILayout.Button("SteamApps.RegisterActivationCode(\"???\")"))
        {
            SteamAPICall_t handle = SteamApps.RegisterActivationCode("???");
            new CallResult <RegisterActivationCodeResponse_t>(OnRegisterActivationCodeResponse, handle);
            new CallResult <AppProofOfPurchaseKeyResponse_t>(OnAppProofOfPurchaseKeyResponse, handle);
        }
#endif
    }
Exemple #7
0
    public void RenderOnGUI()
    {
        GUILayout.BeginVertical("box");
        m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33));

        GUILayout.Label("BIsSubscribed() : " + SteamApps.BIsSubscribed());

        GUILayout.Label("BIsLowViolence() : " + SteamApps.BIsLowViolence());

        GUILayout.Label("BIsCybercafe() : " + SteamApps.BIsCybercafe());

        GUILayout.Label("BIsVACBanned() : " + SteamApps.BIsVACBanned());

        GUILayout.Label("GetCurrentGameLanguage() : " + SteamApps.GetCurrentGameLanguage());

        GUILayout.Label("GetAvailableGameLanguages() : " + SteamApps.GetAvailableGameLanguages());

        GUILayout.Label("BIsSubscribedApp(SteamUtils.GetAppID()) : " + SteamApps.BIsSubscribedApp(SteamUtils.GetAppID()));

        GUILayout.Label("BIsDlcInstalled(TestConstants.Instance.k_AppId_PieterwTestDLC) : " + SteamApps.BIsDlcInstalled(TestConstants.Instance.k_AppId_PieterwTestDLC));

        GUILayout.Label("GetEarliestPurchaseUnixTime(SteamUtils.GetAppID()) : " + SteamApps.GetEarliestPurchaseUnixTime(SteamUtils.GetAppID()));

        GUILayout.Label("BIsSubscribedFromFreeWeekend() : " + SteamApps.BIsSubscribedFromFreeWeekend());

        GUILayout.Label("GetDLCCount() : " + SteamApps.GetDLCCount());

        for (int iDLC = 0; iDLC < SteamApps.GetDLCCount(); ++iDLC)
        {
            AppId_t AppID;
            bool    Available;
            string  Name;
            bool    ret = SteamApps.BGetDLCDataByIndex(iDLC, out AppID, out Available, out Name, 128);
            GUILayout.Label("BGetDLCDataByIndex(" + iDLC + ", out AppID, out Available, out Name, 128) : " + ret + " -- " + AppID + " -- " + Available + " -- " + Name);
        }

        if (GUILayout.Button("InstallDLC(TestConstants.Instance.k_AppId_PieterwTestDLC)"))
        {
            SteamApps.InstallDLC(TestConstants.Instance.k_AppId_PieterwTestDLC);
            print("SteamApps.InstallDLC(" + TestConstants.Instance.k_AppId_PieterwTestDLC + ")");
        }

        if (GUILayout.Button("UninstallDLC(TestConstants.Instance.k_AppId_PieterwTestDLC)"))
        {
            SteamApps.UninstallDLC(TestConstants.Instance.k_AppId_PieterwTestDLC);
            print("SteamApps.UninstallDLC(" + TestConstants.Instance.k_AppId_PieterwTestDLC + ")");
        }

        if (GUILayout.Button("RequestAppProofOfPurchaseKey(SteamUtils.GetAppID())"))
        {
            SteamApps.RequestAppProofOfPurchaseKey(SteamUtils.GetAppID());
            print("SteamApps.RequestAppProofOfPurchaseKey(" + SteamUtils.GetAppID() + ")");
        }

        {
            string Name;
            bool   ret = SteamApps.GetCurrentBetaName(out Name, 128);
            if (Name == null)
            {
                Name = "";
            }
            GUILayout.Label("GetCurrentBetaName(out Name, 128) : " + ret + " -- " + Name);
        }

        if (GUILayout.Button("MarkContentCorrupt(true)"))
        {
            bool ret = SteamApps.MarkContentCorrupt(true);
            print("SteamApps.MarkContentCorrupt(" + true + ") : " + ret);
        }

        if (GUILayout.Button("SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32)"))
        {
            DepotId_t[] Depots = new DepotId_t[32];
            uint        ret    = SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32);
            for (int i = 0; i < ret; ++i)
            {
                print("SteamApps.GetInstalledDepots(SteamUtils.GetAppID(), Depots, 32) : " + ret + " -- #" + i + " -- " + Depots[i]);
            }
        }

        {
            string Folder;
            uint   ret = SteamApps.GetAppInstallDir(SteamUtils.GetAppID(), out Folder, 260);
            if (Folder == null)
            {
                Folder = "";
            }
            GUILayout.Label("GetAppInstallDir(SteamUtils.GetAppID(), out Folder, 260) : " + ret + " -- " + Folder);
        }

        GUILayout.Label("BIsAppInstalled(SteamUtils.GetAppID()) : " + SteamApps.BIsAppInstalled(SteamUtils.GetAppID()));

        GUILayout.Label("GetAppOwner() : " + SteamApps.GetAppOwner());

        {
            // Run the test and then use steam://run/480//?test=testing;param2=value2; in your browser to try this out
            string ret = SteamApps.GetLaunchQueryParam("test");
            GUILayout.Label("GetLaunchQueryParam(\"test\") : " + ret);
        }

        {
            ulong BytesDownloaded;
            ulong BytesTotal;
            bool  ret = SteamApps.GetDlcDownloadProgress(TestConstants.Instance.k_AppId_PieterwTestDLC, out BytesDownloaded, out BytesTotal);
            GUILayout.Label("GetDlcDownloadProgress(TestConstants.Instance.k_AppId_PieterwTestDLC, out BytesDownloaded, out BytesTotal) : " + ret + " -- " + BytesDownloaded + " -- " + BytesTotal);
        }

        GUILayout.Label("GetAppBuildId() : " + SteamApps.GetAppBuildId());

        if (GUILayout.Button("RequestAllProofOfPurchaseKeys()"))
        {
            SteamApps.RequestAllProofOfPurchaseKeys();
            print("SteamApps.RequestAllProofOfPurchaseKeys()");
        }

        if (GUILayout.Button("GetFileDetails(\"steam_api.dll\")"))
        {
            SteamAPICall_t handle = SteamApps.GetFileDetails("steam_api.dll");
            OnFileDetailsResultCallResult.Set(handle);
            print("SteamApps.GetFileDetails(" + "\"steam_api.dll\"" + ") : " + handle);
        }

        {
            string CommandLine;
            int    ret = SteamApps.GetLaunchCommandLine(out CommandLine, 260);
            if (CommandLine == null)
            {
                CommandLine = "";
            }
            GUILayout.Label("GetLaunchCommandLine(out CommandLine, 260) : " + ret + " -- " + CommandLine);
        }

        GUILayout.Label("BIsSubscribedFromFamilySharing() : " + SteamApps.BIsSubscribedFromFamilySharing());

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
    }
Exemple #8
0
 /// <summary>
 /// DEPRICATED: Call isValidApp instead.
 /// </summary>
 /// <param name="DLC"></param>
 /// <returns></returns>
 public static bool ownsDLC(uint DLC)
 {
     return(SteamApps.BIsDlcInstalled((AppId_t)DLC));
 }
Exemple #9
0
 /// <summary>
 /// Updates the IsDlcInstalled member and Checks with Steam to get the current Installed state of the DLC
 /// </summary>
 /// <returns></returns>
 public bool GetIsInstalled()
 {
     IsDlcInstalled = SteamApps.BIsDlcInstalled(AppId);
     return(IsDlcInstalled);
 }