using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using IceCreamDrop.Patches;
using IceCreamDrop.Properties;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("IceCreamDrop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IceCreamDrop")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d1f990b0-d015-4425-bc33-0ccba0a9d24b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace IceCreamDrop
{
[BepInPlugin("Aries.IceCreamTruck", "Ice Cream Dropship", "1.0.0")]
public class ICDModBase : BaseUnityPlugin
{
private const string modGUID = "Aries.IceCreamTruck";
private const string modName = "Ice Cream Dropship";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("Aries.IceCreamTruck");
private static ICDModBase Instance;
internal ManualLogSource val;
public static AudioClip theSong;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
val = Logger.CreateLogSource("Aries.IceCreamTruck");
theSong = AssetBundle.LoadFromMemory(Resources.icecreamtruck).LoadAsset<AudioClip>("Assets/icesong.mp3");
val.LogWarning((object)"ICD is online!");
harmony.PatchAll(typeof(ICDModBase));
harmony.PatchAll(typeof(SoundPatch));
}
}
}
namespace IceCreamDrop.Properties
{
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resources
{
private static ResourceManager resourceMan;
private static CultureInfo resourceCulture;
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static ResourceManager ResourceManager
{
get
{
if (resourceMan == null)
{
resourceMan = new ResourceManager("IceCreamDrop.Properties.Resources", typeof(Resources).Assembly);
}
return resourceMan;
}
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
internal static byte[] icecreamtruck => (byte[])ResourceManager.GetObject("icecreamtruck", resourceCulture);
internal Resources()
{
}
}
[CompilerGenerated]
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
internal sealed class Settings : ApplicationSettingsBase
{
private static Settings defaultInstance = (Settings)(object)SettingsBase.Synchronized((SettingsBase)(object)new Settings());
public static Settings Default => defaultInstance;
}
}
namespace IceCreamDrop.Patches
{
[HarmonyPatch(typeof(ItemDropship))]
internal class SoundPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
private static void thePatch(ItemDropship __instance)
{
AudioClip theSong = ICDModBase.theSong;
AudioSource component = ((Component)((Component)__instance).transform.Find("Music")).gameObject.GetComponent<AudioSource>();
AudioSource component2 = ((Component)((Component)((Component)__instance).transform.Find("Music")).transform.Find("Music (1)")).gameObject.GetComponent<AudioSource>();
component.clip = theSong;
component2.clip = theSong;
}
}
}