Decompiled source of Dusted v1.0.0

Dusted.dll

Decompiled 2 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using MrovLib;
using MrovLib.Events;
using WeatherRegistry;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Dusted")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Dusted")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("92d6b539-78e8-425c-9dff-330a63e02587")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Dusted;

[BepInPlugin("ZetaArcade.Dusted", "Dusted", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class DustedBase : BaseUnityPlugin
{
	private const string modGUID = "ZetaArcade.Dusted";

	private const string modName = "Dusted";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("ZetaArcade.Dusted");

	private void Awake()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		((CustomEvent)EventManager.SetupFinished).AddListener(new Event(OnSetupFinished));
		ConfigManager.Init(((BaseUnityPlugin)this).Config);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin is loaded!");
		harmony.PatchAll(typeof(DustedBase));
	}

	private void OnSetupFinished()
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: 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_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Injecting weathers!");
		SelectableLevel[] value = ((ConfigHandler<SelectableLevel[], string>)(object)ConfigManager.DustCloudsLevels).Value;
		foreach (SelectableLevel val in value)
		{
			RandomWeatherWithVariables val2 = new RandomWeatherWithVariables
			{
				weatherType = (LevelWeatherType)0,
				weatherVariable = 0,
				weatherVariable2 = 0
			};
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Injecting into " + (object)val));
			WeatherController.AddRandomWeather(val, val2);
		}
	}
}
public class ConfigManager
{
	public static ConfigFile config;

	public static LevelListConfigHandler DustCloudsLevels = new LevelListConfigHandler("", true);

	public static void Init(ConfigFile configFile)
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Expected O, but got Unknown
		config = configFile;
		((ConfigHandler<SelectableLevel[], string>)(object)DustCloudsLevels).ConfigFile = config;
		((ConfigHandler<SelectableLevel[], string>)(object)DustCloudsLevels).SetConfigEntry("DustClouds", "Dust Clouds Levels", new ConfigDescription("Levels to inject DustClouds weather into, in a semi-colon seperated list. E.g. Experimentation;Assurance;Gloom;", (AcceptableValueBase)null, Array.Empty<object>()));
	}
}