Пример #1
0
 private static bool EnterPortalPatch(PortalInternal __instance)
 {
     try
     {
         if (Configuration.GetConfig().PortalSafety)
         {
             GeneralWrappers.AlertV2($"Portal: {__instance.field_Private_ApiWorld_0.name}", $"Instance: {(__instance.field_Private_ApiWorld_0.instanceId == null ? "Random Public Instance" : __instance.field_Private_ApiWorld_0.instanceId)}\nWorld Creator: {__instance.field_Private_ApiWorld_0.authorName}\nWho Dropped: {__instance.GetPlayer().GetAPIUser().displayName}",
                                     "Enter", new Action(() =>
             {
                 Networking.GoToRoom($"{__instance.field_Private_ApiWorld_0.id}{__instance.field_Private_ApiWorld_0.instanceId}");
             }), "Don't Enter", new Action(() =>
             {
                 GeneralWrappers.ClosePopup();
             }));
             return(false);
         }
     }
     catch (Exception) { }
     return(true);
 }