using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using SeansDumbMod.Behaviors;
using Unity.Netcode;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SeansDumbMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SeansDumbMod")]
[assembly: AssemblyTitle("SeansDumbMod")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace SeansDumbMod
{
[BepInPlugin("seanathonhooper.seansdumbmod", "Seans Silly Mod", "0.0.3")]
public class Plugin : BaseUnityPlugin
{
private const string GUID = "seanathonhooper.seansdumbmod";
private const string NAME = "Seans Silly Mod";
private const string VERSION = "0.0.3";
public static Plugin instance;
private void Awake()
{
instance = this;
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "seansdumbmod");
AssetBundle val = AssetBundle.LoadFromFile(text);
Item val2 = val.LoadAsset<Item>("Assets/Items/ActionFigureItem/StebioActionFigureItem.asset");
NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
Utilities.FixMixerGroups(val2.spawnPrefab);
Items.RegisterScrap(val2, 15, (LevelTypes)(-1));
Item val3 = val.LoadAsset<Item>("Assets/Items/DildoItem/DildoItem.asset");
NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab);
Utilities.FixMixerGroups(val3.spawnPrefab);
Items.RegisterScrap(val3, 8, (LevelTypes)(-1));
Item val4 = val.LoadAsset<Item>("Assets/Items/BrickItem/brickItem.asset");
Brick brick = val4.spawnPrefab.AddComponent<Brick>();
((GrabbableObject)brick).grabbable = true;
((GrabbableObject)brick).grabbableToEnemies = true;
((GrabbableObject)brick).itemProperties = val4;
NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
Utilities.FixMixerGroups(val4.spawnPrefab);
Items.RegisterScrap(val4, 33, (LevelTypes)(-1));
Item val5 = val.LoadAsset<Item>("Assets/Items/BowlingPinItem/BowlingPinItem.asset");
NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab);
Utilities.FixMixerGroups(val5.spawnPrefab);
Items.RegisterScrap(val5, 15, (LevelTypes)(-1));
Item val6 = val.LoadAsset<Item>("Assets/Items/BowlingBallItem/BowlingBallItem.asset");
NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab);
Utilities.FixMixerGroups(val6.spawnPrefab);
Items.RegisterScrap(val6, 12, (LevelTypes)(-1));
((BaseUnityPlugin)this).Logger.LogInfo((object)"Patched SeansSillyMod");
}
}
}
namespace SeansDumbMod.Behaviors
{
internal class Brick : PhysicsProp
{
public Ray brickThrowRay;
public RaycastHit brickHit;
private int brickMask = 87420;
public bool thrown = false;
public override void OnHitGround()
{
((GrabbableObject)this).OnHitGround();
thrown = false;
}
public override void ItemActivate(bool used, bool buttonDown = true)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
if (((NetworkBehaviour)this).IsOwner)
{
((GrabbableObject)this).playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetBrickThrowDestination(), true);
}
}
public Vector3 GetBrickThrowDestination()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
Vector3 position = ((Component)this).transform.position;
brickThrowRay = new Ray(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position, ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward);
position = ((!Physics.Raycast(brickThrowRay, ref brickHit, 12f, brickMask, (QueryTriggerInteraction)1)) ? ((Ray)(ref brickThrowRay)).GetPoint(10f) : ((Ray)(ref brickThrowRay)).GetPoint(((RaycastHit)(ref brickHit)).distance - 0.05f));
brickThrowRay = new Ray(position, Vector3.down);
if (Physics.Raycast(brickThrowRay, ref brickHit, 30f, brickMask, (QueryTriggerInteraction)1))
{
return ((RaycastHit)(ref brickHit)).point + Vector3.up * 0.05f;
}
return ((Ray)(ref brickThrowRay)).GetPoint(30f);
}
}
}