using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;
using On.RoR2.UI;
using RoR2;
using RoR2.UI;
using TMPro;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("FixEnemyItemCountFontSize")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FixEnemyItemCountFontSize")]
[assembly: AssemblyTitle("FixEnemyItemCountFontSize")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace FixEnemyItemCountFontSize
{
[BepInPlugin("top.sshh.FixEnemyItemCountFontSize", "FixEnemyItemCountFontSize", "1.0.0")]
public class FixEnemyItemCountFontSize : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static hook_SetItemIndex <>9__0_0;
internal void <Awake>b__0_0(orig_SetItemIndex orig, ItemIcon self, ItemIndex index, int count)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, index, count);
switch (((TMP_Text)self.stackText).text.Length)
{
case 2:
((TMP_Text)self.stackText).fontSize = 20f;
break;
case 3:
((TMP_Text)self.stackText).fontSize = 16f;
break;
case 4:
((TMP_Text)self.stackText).fontSize = 12f;
break;
case 5:
((TMP_Text)self.stackText).fontSize = 8f;
break;
default:
((TMP_Text)self.stackText).fontSize = 8f;
((TMP_Text)self.stackText).text = $"x{self.itemCount / 1000}K";
break;
}
}
}
public void Awake()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__0_0;
if (obj == null)
{
hook_SetItemIndex val = delegate(orig_SetItemIndex orig, ItemIcon self, ItemIndex index, int count)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, index, count);
switch (((TMP_Text)self.stackText).text.Length)
{
case 2:
((TMP_Text)self.stackText).fontSize = 20f;
break;
case 3:
((TMP_Text)self.stackText).fontSize = 16f;
break;
case 4:
((TMP_Text)self.stackText).fontSize = 12f;
break;
case 5:
((TMP_Text)self.stackText).fontSize = 8f;
break;
default:
((TMP_Text)self.stackText).fontSize = 8f;
((TMP_Text)self.stackText).text = $"x{self.itemCount / 1000}K";
break;
}
};
<>c.<>9__0_0 = val;
obj = (object)val;
}
ItemIcon.SetItemIndex += (hook_SetItemIndex)obj;
}
}
}