Пример #1
0
 public static void Postfix()
 {
     try
     {
         if (PlayablePets.enabled.Value)
         {
             PlayablePets.UpdatePets();
             PlayablePets.UpdatePlayers();
         }
     }
     catch (Exception e)
     {
         PlayablePets._logger.LogError(e);
     }
 }
Пример #2
0
 public static void Postfix()
 {
     try
     {
         HudManager hudManager = PlayablePets.getHudManager();
         if (PlayablePets.enabled.Value)
         {
             if (hudManager != null) //This might be null
             {
                 string creditPleaseDontRemoveThisKThx = $"{PlayablePets.PluginName} v{PlayablePets.PluginVersion}{PlayablePets.VersionEnding} Created by [00AAFFFF]@Tran_Foxxo[FFFF00FF]\r\nhttps://github.com/Tran-Foxxo/PlayablePets/\r\n\r\n[FFFFFFFF]";
                 if (!hudManager.GameSettings.Text.Contains(creditPleaseDontRemoveThisKThx))
                 {
                     hudManager.GameSettings.Text = creditPleaseDontRemoveThisKThx + hudManager.GameSettings.Text;
                 }
             }
         }
     }
     catch (Exception e)
     {
         PlayablePets._logger.LogError(e);
     }
 }