Decompiled source of Formula 1 Company v1.1.1

formula1Company.dll

Decompiled 3 weeks ago
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 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("formula1Company")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+f943906db12047b36ad65ee36dce364d32ae1e7e")]
[assembly: AssemblyProduct("formula1Company")]
[assembly: AssemblyTitle("formula1Company")]
[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 formula1Company
{
	[BepInPlugin("filo.formula1Company", "Formula 1 Company", "0.2.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "filo.formula1Company";

		private const string NAME = "Formula 1 Company";

		private const string VERSION = "0.2.0";

		public static Plugin instance;

		private void Awake()
		{
			instance = this;
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "formula1companybundle");
			AssetBundle bundle = AssetBundle.LoadFromFile(text);
			RegisterSoft(bundle);
			RegisterMedium(bundle);
			RegisterHard(bundle);
			RegisterFerrari(bundle);
			RegisterMclaren(bundle);
			RegisterMercedes(bundle);
			RegisterRedbull(bundle);
			RegisterHelmet(bundle);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"\n\nGentlemen, a short view back to the past. Thirty years ago, Niki Lauda told us ‘take a monkey, place him into the cockpit and he is able to drive the car.’ Thirty years later, Sebastian told us ‘I had to start my car like a computer, it’s very complicated.’ And Nico Rosberg said that during the race – I don’t remember what race - he pressed the wrong button on the wheel. Question for you both: is Formula One driving today too complicated with twenty and more buttons on the wheel, are you too much under effort, under pressure? What are your wishes for the future concerning the technical programme during the race? Less buttons, more? Or less and more communication with your engineers?\n\nFormula 1 Company Successfully loaded!\n");
		}

		private void RegisterHelmet(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Helmet/HelmetScrap.asset");
			val.maxValue = 150;
			val.maxValue = 135;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}

		private void RegisterFerrari(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Cars/Ferrari/FerrariScrap.asset");
			val.maxValue = 100;
			val.maxValue = 75;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}

		private void RegisterRedbull(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Cars/Red Bull/RedbullScrap.asset");
			val.maxValue = 100;
			val.maxValue = 75;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}

		private void RegisterMercedes(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Cars/Mercedes/MercedesScrap.asset");
			val.maxValue = 100;
			val.maxValue = 75;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}

		private void RegisterMclaren(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Cars/McLaren/McLarenScrap.asset");
			val.maxValue = 75;
			val.maxValue = 100;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}

		private void RegisterSoft(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Tyres/TyreSoftItem.asset");
			val.maxValue = 135;
			val.minValue = 110;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 12, (LevelTypes)(-1));
		}

		private void RegisterHard(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Tyres/TyreHardItem.asset");
			val.maxValue = 125;
			val.minValue = 110;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 9, (LevelTypes)(-1));
		}

		private void RegisterMedium(AssetBundle bundle)
		{
			Item val = bundle.LoadAsset<Item>("Assets/formula1Company/Tyres/TyreMediumItem.asset");
			val.maxValue = 130;
			val.minValue = 110;
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			Utilities.FixMixerGroups(val.spawnPrefab);
			Items.RegisterScrap(val, 10, (LevelTypes)(-1));
		}
	}
}