@@ -23,15 +23,7 @@ public class PolyTechMain : PolyTechMod
2323 public new const string
2424 PluginGuid = "polytech.polytechframework" ,
2525 PluginName = "PolyTech Framework" ,
26- < << << << HEAD
27- << << << < HEAD
28- PluginVersion = "0.8.0" ;
29- = == == ==
30- PluginVersion = "0.7.7.5" ;
31- > >>> >>> 4f 73842 ... Made it much harder to accidentally cheat
32- == == == =
33- PluginVersion = "0.8.0" ;
34- > >>> >>> 8632f 6 a . .. refactored harmony patches
26+ PluginVersion = "0.8.1" ;
3527 private static BindingList < PolyTechMod >
3628 noncheatMods = new BindingList < PolyTechMod > { } ,
3729 cheatMods = new BindingList < PolyTechMod > { } ;
@@ -675,28 +667,18 @@ private static bool PatchReplays()
675667 }
676668
677669
678- [ HarmonyPatch ( typeof ( GalleryUploadBody ) , MethodType . Constructor ) ]
670+ [ HarmonyPatch ( typeof ( Panel_ShareReplay ) , "CreateGalleryUploadBody" ) ]
679671 [ HarmonyPostfix ]
680- private static void PatchGallery ( GalleryUploadBody __instance , string build , string levelId , string itemId , bool win , float maxStress , int budget , byte [ ] video , byte [ ] videoPreview )
681- {
682- __instance . m_Build = build ;
683- __instance . m_LevelId = levelId ;
684- __instance . m_ItemId = itemId ;
685- __instance . m_Result = ( win ? "win" : "fail" ) ;
686- __instance . m_MaxStress = maxStress ;
687- __instance . m_BudgetUsed = budget ;
688- __instance . m_Video = video ;
689- __instance . m_VideoPreview = videoPreview ;
690-
691- if ( PolyTechMain . modEnabled . Value )
672+ private static void PatchGalleryUploadBody ( ref GalleryUploadBody __result )
673+ {
674+ //ptfInstance.ptfLogger.LogMessage($"Uploading video to gallery, modCheated = {ptfInstance.modCheated}");
675+ if ( ptfInstance . modCheated )
692676 {
693- __instance . m_MaxStress = - 42069 ;
694- __instance . m_BudgetUsed = int . MaxValue ;
677+ __result . m_MaxStress = 42069 ;
678+ __result . m_BudgetUsed = int . MaxValue ;
695679 }
696680 }
697681
698-
699-
700682 [ HarmonyPatch ( typeof ( SandboxLayoutData ) , "SerializePreBridgeBinary" ) ]
701683 [ HarmonyPrefix ]
702684 static void patchSerializerOne ( SandboxLayoutData __instance , List < byte > bytes )
0 commit comments