AprilFools.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using HarmonyLib;
  2. using SongCore.Utilities;
  3. namespace SongCore.HarmonyPatches
  4. {
  5. [HarmonyPatch(typeof(GamePause))]
  6. [HarmonyPatch("Pause")]
  7. class AprilFoolsPatch
  8. {
  9. static void Prefix()
  10. {
  11. System.DateTime time;
  12. bool bunbundai = false;
  13. try
  14. {
  15. var userID = 0;//BS_Utils.Gameplay.GetUserInfo.GetUserID();
  16. if (userID == 76561198182060577)
  17. bunbundai = true;
  18. }
  19. catch (System.Exception ex)
  20. {
  21. Logging.logger.Error("Error in Bunbundai Contingency");
  22. }
  23. if (IPA.Utilities.Utils.CanUseDateTimeNowSafely)
  24. time = System.DateTime.Now;
  25. else
  26. time = System.DateTime.UtcNow;
  27. // if (bunbundai)
  28. // BS_Utils.Gameplay.ScoreSubmission.DisableSubmission("Nice Pause bunbundai"); else
  29. if (time.Month == 4 && time.Day == 1)
  30. BS_Utils.Gameplay.ScoreSubmission.DisableSubmission("Nice Pause Idjot");
  31. }
  32. }
  33. }