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 DefaultNamespace;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
[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("ChargeStation")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("My first plugin")]
[assembly: AssemblyTitle("ChargeStation")]
[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;
}
}
}
[BepInPlugin("com.atomic.chargeship", "Charge Ship Plugin", "1.0.0")]
public class ChargeStationPlugin : BaseUnityPlugin
{
private void Awake()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
GameObject val = GameObject.CreatePrimitive((PrimitiveType)3);
val.gameObject.transform.position = new Vector3(100f, 100f, 100f);
((Object)val).name = "Placeholder Cube";
((Object)val).hideFlags = (HideFlags)61;
val.AddComponent<MainPlugin>();
Object.DontDestroyOnLoad((Object)(object)val);
}
}
public class MainPlugin : MonoBehaviour
{
private void OnEnable()
{
SceneManager.sceneLoaded += OnSceneLoaded;
Debug.LogError((object)"New Scene");
}
private void OnDisable()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
Debug.LogError((object)"Something Scene");
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_008c: 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_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
if (!(((Scene)(ref scene)).name != "NewMainMenu"))
{
return;
}
GameObject[] array = Object.FindObjectsOfType<GameObject>();
GameObject[] array2 = array;
foreach (GameObject val in array2)
{
if (((Object)val).name.Contains("DiveBell") && val.activeInHierarchy && (Object)(object)val.GetComponent<DiveBellParent>() == (Object)null)
{
BatteryRechargeStation val2 = val.AddComponent<BatteryRechargeStation>();
val2.rechargeRate = 0.5f;
MainModule main = (val2.part = val.AddComponent<ParticleSystem>()).main;
((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0f);
((MainModule)(ref main)).duration = 0f;
Transform transform = new GameObject("DummyField").transform;
val2.field = transform;
}
}
}
}
namespace ChargeStation
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "ChargeStation";
public const string PLUGIN_NAME = "My first plugin";
public const string PLUGIN_VERSION = "1.0.0";
}
}