Decompiled source of One Piece Hakis v1.0.1

Haki.dll

Decompiled a year ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using Jotunn.Utils;
using ModdingUtils.Utils;
using UnboundLib.Cards;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyVersion("0.0.0.0")]
public class CardHolder : MonoBehaviour
{
	public List<GameObject> Cards;

	public List<GameObject> HiddenCards;

	internal void RegisterCards()
	{
		foreach (GameObject card in Cards)
		{
			CustomCard.RegisterUnityCard(card, Haki.modInitials, card.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
		}
		foreach (GameObject hiddenCard in HiddenCards)
		{
			CustomCard.RegisterUnityCard(hiddenCard, Haki.modInitials, hiddenCard.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
			Cards.instance.AddHiddenCard(hiddenCard.GetComponent<CardInfo>());
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("7490345", "Haki", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Haki : BaseUnityPlugin
{
	internal static string modInitials = "H";

	private AssetBundle assets;

	private void Awake()
	{
		assets = AssetUtils.LoadAssetBundleFromResources("haki", typeof(Haki).Assembly);
		assets.LoadAsset<GameObject>("ModCards").GetComponent<CardHolder>().RegisterCards();
	}
}