Ejemplo n.º 1
0
 private static bool CheckSeveralPlayersAction(AchievementData ach, object o)
 {
     if (BoltNetwork.isRunning && Scene.SceneTracker.allPlayerEntities.Count > 0)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 private static bool CheckSpendings(AchievementData ach, object o)
 {
     if (LocalPlayer.Achievements.BoughtSoda && LocalPlayer.Achievements.BoughtSnacks)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 private static bool CheckMpAction(AchievementData ach, object o)
 {
     if (BoltNetwork.isRunning)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 private static bool CheckBuildGazebo(AchievementData ach, object o)
 {
     if ((BuildingTypes)o == BuildingTypes.Gazeebo)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 5
0
 private static bool CheckVegan(AchievementData ach, object o)
 {
     if (!AchievementsManager.FailedVegan)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 6
0
 private static bool CheckHangingCutScene(AchievementData ach, object o)
 {
     GameStats.StoryElements storyElements = (GameStats.StoryElements)o;
     if (storyElements == GameStats.StoryElements.HangingScene)
     {
         AccountInfo.UnlockAchievement(ach);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 7
0
        private static bool CheckBuildTreeHouse(AchievementData ach, object o)
        {
            BuildingTypes buildingTypes = (BuildingTypes)o;

            if (buildingTypes == BuildingTypes.TreeHouse || buildingTypes == BuildingTypes.TreeHouseAnchor || buildingTypes == BuildingTypes.TreeHouseChatel || buildingTypes == BuildingTypes.TreeHouseChatelAnchor)
            {
                AccountInfo.UnlockAchievement(ach);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 8
0
 public void Unlock(object o)
 {
     try
     {
         if (this.CustomAction != null)
         {
             if (Achievements.ShowLogs)
             {
                 Debug.Log("# Doing custom unlock action for [" + this.Key + "]");
             }
             if (!this.CustomAction(this, o))
             {
                 return;
             }
         }
         else
         {
             if (Achievements.ShowLogs)
             {
                 Debug.Log("# Unlocked [" + this.Key + "]");
             }
             AccountInfo.UnlockAchievement(this);
         }
         if (this.Completed || AccountInfo.IsAchievementUnlocked(this))
         {
             this.Completed = true;
             this.Clear();
         }
     }
     catch (Exception exception)
     {
         if (Achievements.ShowExceptions)
         {
             Debug.LogException(exception);
         }
     }
 }