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 BepInEx.Logging;
using Microsoft.CodeAnalysis;
using UnityEngine;
[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("mymorestuff")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: AssemblyProduct("MyMoreStuff")]
[assembly: AssemblyTitle("mymorestuff")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.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 mymorestuff
{
[BepInPlugin("mymorestuff", "MyMoreStuff", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
private GameObject mmspo;
private void Awake()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Plugin mymorestuff is loaded!");
mmspo = new GameObject("mymorestuff_plugin_object");
mmspo.AddComponent<MyMoreStuffComponent>();
Object.DontDestroyOnLoad((Object)(object)mmspo);
Logger.LogInfo((object)"MyMoreStuffComponent has been attached!");
}
public void DoWhateverCrazyStuffWhenGameIsLoadedAndOnEveryCardSelect()
{
GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
Holding[] array2 = (Holding[])(object)new Holding[array.Length];
foreach (Holding val in array2)
{
Gun gun = val.holdable.holder.weaponHandler.gun;
gun.bodyRecoil = 5f;
gun.knockback = 5f;
gun.bursts = 10;
}
}
}
public class MyMoreStuffComponent : MonoBehaviour
{
private bool hasModifiedGuns = false;
private void Start()
{
Plugin.Logger.LogInfo((object)"MyMoreStuffComponent started!");
}
private void Update()
{
GameObject[] playerGameObjects = GameObject.FindGameObjectsWithTag("Player");
DoWhateverCrazyStuffWhenGameIsLoadedAndOnEveryCardSelect(playerGameObjects);
}
private bool IsGameLoaded()
{
return GameObject.FindGameObjectsWithTag("Player").Length >= 1;
}
public void DoWhateverCrazyStuffWhenGameIsLoadedAndOnEveryCardSelect(GameObject[] playerGameObjects)
{
for (int i = 0; i < playerGameObjects.Length; i++)
{
Holding component = playerGameObjects[i].GetComponent<Holding>();
Gun gun = component.holdable.holder.weaponHandler.gun;
gun.bodyRecoil = 1000f;
gun.knockback = 1000f;
}
}
private bool CheckAllActive(GameObject[] objects)
{
foreach (GameObject val in objects)
{
if ((Object)(object)val == (Object)null || !val.activeInHierarchy)
{
return false;
}
}
return true;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "mymorestuff";
public const string PLUGIN_NAME = "MyMoreStuff";
public const string PLUGIN_VERSION = "1.0.1";
}
}