Skip to content

immcrab/Lasting-Utilla

Ownership not verified 1
Open on GitHub

Viewing main at commit a6a25ac430“Add files via upload”· 11 months ago

32 lines · 1.0 KBRaw on GitHub
// Decompiled with JetBrains decompiler
// Type: Utilla.Patches.CustomJoinPatch
// Assembly: Utilla, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: FDD08D98-E155-49FA-85BC-1930928C3BAA
// Assembly location: C:\Program Files (x86)\Steam\steamapps\common\Gorilla Tag\BepInEx\plugins\Utilla\Utilla.dll

using GorillaNetworking;
using HarmonyLib;
using System;

#nullable disable
namespace Utilla.Patches;

[HarmonyPatch(typeof (PhotonNetworkController), "OnJoinedRoom")]
internal class CustomJoinPatch
{
  public static void Prefix(out string[] __state)
  {
    __state = GorillaComputer.instance.allowedMapsToJoin;
    string[] strArray1 = new string[__state.Length + 1];
    GorillaComputer.instance.allowedMapsToJoin.CopyTo((Array) strArray1, 0);
    string[] strArray2 = strArray1;
    strArray2[strArray2.Length - 1] = "MOD_";
    GorillaComputer.instance.allowedMapsToJoin = strArray1;
  }

  public static void Postfix(string[] __state)
  {
    GorillaComputer.instance.allowedMapsToJoin = __state;
  }
}

Code is shown from GitHub as-is. Linking a repository doesn’t prove that a release file on Canopy was built from it.