@@ -80,32 +80,6 @@ private static bool CheckSignatures(Action<int, BaseEventData> action, int id, B
8080 return true ;
8181 }
8282
83- /// <summary>
84- /// Restores removed polytopia method which lets you get all guids of single player sessions.
85- /// </summary>
86- private static Il2CppSystem . Guid [ ] GetSinglePlayerSessions ( ) // CHECKMATE MIDJIWAN
87- {
88- string saveDirectoryPath = Paths . GetSaveDirectoryPath ( "Singleplayer" ) ;
89- if ( PolytopiaDirectory . Exists ( saveDirectoryPath ) )
90- {
91- string [ ] files = PolytopiaDirectory . GetFiles ( saveDirectoryPath , "*.state" ) ;
92- if ( files != null && files . Length != 0 )
93- {
94- List < Il2CppSystem . Guid > list = new List < Il2CppSystem . Guid > ( files . Length ) ;
95- for ( int i = 0 ; i < files . Length ; i ++ )
96- {
97- Il2CppSystem . Guid guid ;
98- if ( Il2CppSystem . Guid . TryParse ( Path . GetFileNameWithoutExtension ( files [ i ] ) , out guid ) )
99- {
100- list . Add ( guid ) ;
101- }
102- }
103- return list . ToArray ( ) ;
104- }
105- }
106- return new Il2CppSystem . Guid [ ] { } ;
107- }
108-
10983 /// <summary>
11084 /// Performs compatibility checks when the start screen is shown.
11185 /// </summary>
@@ -173,7 +147,7 @@ private static bool GameInfoPopup_OnMainButtonClicked(GameInfoPopup __instance,
173147 [ HarmonyPatch ( typeof ( StartScreen ) , nameof ( StartScreen . OnResumeButtonClick ) ) ]
174148 private static bool StartScreen_OnResumeButtonClick ( StartScreen __instance , int id , BaseEventData eventData )
175149 {
176- return CheckSignatures ( __instance . OnResumeButtonClick , id , eventData , GetSinglePlayerSessions ( ) [ 0 ] ) ;
150+ return CheckSignatures ( __instance . OnResumeButtonClick , id , eventData , LocalSaveFileUtils . GetSaveFiles ( PolytopiaBackendBase . Game . GameType . SinglePlayer ) [ 0 ] ) ;
177151 }
178152
179153 /// <summary>
0 commit comments