using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using OtherLoader;
using UnityEngine;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace cityrobo.DaedricWeapons
{
[BepInPlugin("cityrobo.DaedricWeapons", "DaedricWeapons", "1.0.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class DaedricWeaponsPlugin : BaseUnityPlugin
{
private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
internal static ManualLogSource Logger;
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
LoadAssets();
}
private void LoadAssets()
{
OtherLoader.RegisterDirectLoad(BasePath, "cityrobo.DaedricWeapons", "", "", "daedricweapons", "");
}
}
}
public class ProjectileExtractor : MonoBehaviour
{
public FVRFireArmRound Round;
public BallisticProjectile Projectile;
[ContextMenu("Extract")]
public void Extract()
{
if ((Object)(object)Round != (Object)null && (Object)(object)Projectile == (Object)null)
{
Projectile = Object.Instantiate<GameObject>(Round.BallisticProjectilePrefab).GetComponent<BallisticProjectile>();
}
if ((Object)(object)Projectile.ExtraDisplay != (Object)null)
{
Object.Instantiate<GameObject>(Projectile.ExtraDisplay);
}
foreach (Submunition submunition in Projectile.Submunitions)
{
foreach (GameObject prefab in submunition.Prefabs)
{
Object.Instantiate<GameObject>(prefab);
}
}
}
}
namespace cityrobo.DaedricWeapons
{
public class MeridiasCurse : MonoBehaviour
{
public AudioEvent Curse;
private bool _wasCursed = false;
public void OnEnable()
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
if (!_wasCursed)
{
FVRPooledAudioSource val = SM.PlayCoreSound((FVRPooledAudioType)12, Curse, ((Component)this).transform.parent.position);
val.FollowThisTransform(((Component)this).transform.parent);
_wasCursed = true;
}
}
}
public class MeridiasSmash : MonoBehaviour
{
public AudioEvent Smash;
public Collider Beacon;
public void OnCollisionEnter(Collision col)
{
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
bool flag = false;
for (int i = 0; i < col.contacts.Length; i++)
{
if ((Object)(object)((ContactPoint)(ref col.contacts[i])).thisCollider == (Object)(object)Beacon)
{
flag = true;
break;
}
}
if (flag && (Object)(object)((Component)col.collider).transform.parent != (Object)null)
{
SosigLink component = ((Component)((Component)col.collider).transform.parent).gameObject.GetComponent<SosigLink>();
if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)component.S.Links[0])
{
FVRPooledAudioSource val = SM.PlayCoreSound((FVRPooledAudioType)0, Smash, ((Component)this).transform.position);
val.FollowThisTransform(((Component)this).transform);
}
}
}
}
}