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

49 lines · 1.6 KBRaw on GitHub
// Decompiled with JetBrains decompiler
// Type: Utilla.Models.Gamemode
// 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 GorillaGameModes;
using System;
using Utilla.Tools;
using Utilla.Utils;

#nullable disable
namespace Utilla.Models;

public class Gamemode
{
  public string DisplayName { get; }

  public string ID { get; }

  public GameModeType? BaseGamemode { get; }

  public Type GameManager { get; }

  internal Gamemode(GameModeType gameModeType)
  {
    this.BaseGamemode = new GameModeType?(gameModeType);
    this.ID = gameModeType.ToString();
    this.DisplayName = GameModeUtils.GetGameModeName(gameModeType);
    Logging.Message((object) $"Replicated base gamemode: based on {gameModeType} type");
  }

  public Gamemode(string id, string displayName, GameModeType? game_mode_type = null)
  {
    this.BaseGamemode = game_mode_type;
    this.ID = !game_mode_type.HasValue || id.EndsWith(game_mode_type.Value.ToString()) ? id : id + (object) game_mode_type;
    this.DisplayName = displayName;
    Logging.Message((object) $"Constructed custom gamemode: {id} based on {(game_mode_type.HasValue ? (object) game_mode_type.Value : (object) "no")} type");
  }

  public Gamemode(string id, string displayName, Type gameManager)
  {
    this.ID = id;
    this.DisplayName = displayName;
    this.GameManager = gameManager;
    Logging.Message((object) $"Constructed custom gamemode: {id} with {gameManager.GetType()} manager");
  }
}

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