Example #1
0
    public static void SendPBToSteam(FreshLevels.Type type, float speedruntime)
    {
        //Fail out, if:
        if (fa.dontConnectSteam)
        {
            return;
        }
        if (!SteamManager.Initialized)
        {
            return;
        }
        if (speedruntime < 2)
        {
            return;
        }                                        //less than 2 seconds is always impossible
        if (speedruntime < FreshLevels.GetImpossibleTimeForLevel(type))
        {
            return;
        }                                                                                  //time was impossible
        if (FreshLevels.NotALeaderboardLevel(type))
        {
            return;
        }                                                            //There are / should be no leaderboards for this level

        AddToQueue(type, speedruntime);
    }
Example #2
0
    public static void AddToQueue(FreshLevels.Type type, float speedruntime)
    {
        //Fail out, if:
        if (fa.dontConnectSteam)
        {
            return;
        }
        if (!SteamManager.Initialized)
        {
            return;
        }
        if (speedruntime < 2)
        {
            return;
        }                                        //less than 2 seconds is always impossible
        if (speedruntime < FreshLevels.GetImpossibleTimeForLevel(type))
        {
            return;
        }                                                                                  //time was impossible
        if (FreshLevels.DoNotSyncLevel(type))
        {
            return;
        }                                                      //don't sync this level if it's got a secret exit or other reason to not keep old scores

        Item a = new Item();

        a.leaderboard = FreshLevels.GetStrictLabelForType(type);
        a.score       = Mathf.FloorToInt(speedruntime * 1000);
        a.type        = type;
        queue.Add(a);
    }