@@ -67,32 +67,32 @@ private static bool CheckSignatures(Action<int, BaseEventData> action, int id, B
6767 [ HarmonyPatch ( typeof ( StartScreen ) , nameof ( StartScreen . Start ) ) ]
6868 private static void StartScreen_Start ( )
6969 {
70- Version incompatibilityWarningLastVersion = Plugin . POLYTOPIA_VERSION . CutRevision ( ) ;
71- try
72- {
73- incompatibilityWarningLastVersion = new ( File . ReadAllText ( Plugin . INCOMPATIBILITY_WARNING_LAST_VERSION_PATH ) ) ;
74- }
75- catch ( FileNotFoundException ) { }
76- if ( VersionManager . SemanticVersion . Cast ( ) . CutRevision ( ) > incompatibilityWarningLastVersion )
77- {
78- File . WriteAllText (
79- Plugin . INCOMPATIBILITY_WARNING_LAST_VERSION_PATH ,
80- VersionManager . SemanticVersion . Cast ( ) . CutRevision ( ) . ToString ( )
81- ) ;
82- PopupManager . GetBasicPopup ( new (
83- Localization . Get ( "polymod.version.mismatch" ) ,
84- Localization . Get ( "polymod.version.mismatch.description" ) ,
85- new ( new PopupBase . PopupButtonData [ ] {
86- new ( "buttons.stay" , customColorStates : ColorConstants . redButtonColorStates ) ,
87- new (
88- "buttons.exitgame" ,
89- PopupBase . PopupButtonData . States . None ,
90- ( Il2CppSystem . Action ) Application . Quit ,
91- closesPopup : false
92- )
93- } ) )
94- ) . Show ( ) ;
95- }
70+ // Version incompatibilityWarningLastVersion = Plugin.POLYTOPIA_VERSION.CutRevision();
71+ // try
72+ // {
73+ // incompatibilityWarningLastVersion = new(File.ReadAllText(Plugin.INCOMPATIBILITY_WARNING_LAST_VERSION_PATH));
74+ // }
75+ // catch (FileNotFoundException) { }
76+ // if (VersionManager.SemanticVersion.Cast().CutRevision() > incompatibilityWarningLastVersion)
77+ // {
78+ // File.WriteAllText(
79+ // Plugin.INCOMPATIBILITY_WARNING_LAST_VERSION_PATH,
80+ // VersionManager.SemanticVersion.Cast().CutRevision().ToString()
81+ // );
82+ // PopupManager.GetBasicPopup(new(
83+ // Localization.Get("polymod.version.mismatch"),
84+ // Localization.Get("polymod.version.mismatch.description"),
85+ // new(new PopupBase.PopupButtonData[] {
86+ // new("buttons.stay", customColorStates: ColorConstants.redButtonColorStates),
87+ // new(
88+ // "buttons.exitgame",
89+ // PopupBase.PopupButtonData.States.None,
90+ // (UIButtonBase.ButtonAction )Application.Quit,
91+ // closesPopup: false
92+ // )
93+ // }))
94+ // ).Show();
95+ // }
9696 }
9797
9898 [ HarmonyPrefix ]
@@ -102,12 +102,12 @@ private static bool GameInfoPopup_OnMainButtonClicked(GameInfoPopup __instance,
102102 return CheckSignatures ( __instance . OnMainButtonClicked , id , eventData , __instance . gameId ) ;
103103 }
104104
105- [ HarmonyPrefix ]
106- [ HarmonyPatch ( typeof ( StartScreen ) , nameof ( StartScreen . OnResumeButtonClick ) ) ]
107- private static bool StartScreen_OnResumeButtonClick ( StartScreen __instance , int id , BaseEventData eventData )
108- {
109- return CheckSignatures ( __instance . OnResumeButtonClick , id , eventData , ClientBase . GetSinglePlayerSessions ( ) [ 0 ] ) ;
110- }
105+ // [HarmonyPrefix]
106+ // [HarmonyPatch(typeof(StartScreen), nameof(StartScreen.OnResumeButtonClick))]
107+ // private static bool StartScreen_OnResumeButtonClick(StartScreen __instance, int id, BaseEventData eventData)
108+ // {
109+ // return CheckSignatures(__instance.OnResumeButtonClick, id, eventData, ClientBase.GetSinglePlayerSessions()[0]);
110+ // }
111111
112112 [ HarmonyPostfix ]
113113 [ HarmonyPatch ( typeof ( GameInfoPopup ) , nameof ( GameInfoPopup . DeletePaPGame ) ) ]
@@ -120,10 +120,10 @@ private static void ClientBase_DeletePassAndPlayGame(GameInfoPopup __instance)
120120 [ HarmonyPatch ( typeof ( ClientBase ) , nameof ( ClientBase . DeleteSinglePlayerGames ) ) ]
121121 private static void ClientBase_DeleteSinglePlayerGames ( )
122122 {
123- foreach ( var gameId in ClientBase . GetSinglePlayerSessions ( ) )
124- {
125- File . Delete ( Path . Combine ( Application . persistentDataPath , $ "{ gameId } .signatures") ) ;
126- }
123+ // foreach (var gameId in ClientBase.GetSinglePlayerSessions())
124+ // {
125+ // File.Delete(Path.Combine(Application.persistentDataPath, $"{gameId}.signatures"));
126+ // }
127127 }
128128
129129 [ HarmonyPrefix ]
@@ -133,8 +133,8 @@ private static void GameManager_MatchEnded(bool localPlayerIsWinner, ScoreDetail
133133 File . Delete ( Path . Combine ( Application . persistentDataPath , $ "{ GameManager . Client . gameId } .signatures") ) ;
134134 }
135135
136- [ HarmonyPostfix ]
137- [ HarmonyPatch ( typeof ( ClientBase ) , nameof ( ClientBase . CreateSession ) , typeof ( GameSettings ) , typeof ( Il2CppSystem . Guid ) ) ]
136+ // [HarmonyPostfix]
137+ // [HarmonyPatch(typeof(ClientBase), nameof(ClientBase.CreateSession), typeof(GameSettings), typeof(Il2CppSystem.Guid))]
138138 private static void ClientBase_CreateSession ( GameSettings settings , Il2CppSystem . Guid gameId )
139139 {
140140 File . WriteAllLinesAsync (
0 commit comments