immcrab/Lasting-Utilla
Ownership not verified 1
Viewing main at commit a6a25ac430“Add files via upload”· 11 months ago
33 lines · 1.1 KBRaw on GitHub
// Decompiled with JetBrains decompiler
// Type: Utilla.Patches.GameModeTextPatch
// 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 Utilla.Models;
using Utilla.Utils;
#nullable disable
namespace Utilla.Patches;
[HarmonyPatch(typeof (GorillaComputer), "UpdateGameModeText")]
internal class GameModeTextPatch
{
public static bool Prefix(GorillaComputer __instance)
{
if (NetworkSystem.Instance == null)
return true;
WatchableStringSO currentGameModeText = __instance.currentGameModeText;
if (!NetworkSystem.Instance.InRoom)
{
currentGameModeText.Value = "CURRENT MODE\n-NOT IN ROOM-";
return false;
}
Gamemode currentGamemode = GameModeUtils.CurrentGamemode;
currentGameModeText.Value = "CURRENT MODE\n" + (currentGamemode != null ? currentGamemode.DisplayName.ToUpper() : "ERROR");
return false;
}
}
Code is shown from GitHub as-is. Linking a repository doesn’t prove that a release file on Canopy was built from it.