Decompiled source of RobloxCharacterScraps v1.0.0

RobloxCharacterScrap/LCRobloxCharacterScrap.dll

Decompiled 5 hours ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using LCRobloxCharacterScrap.Behaviours;
using LethalLib.Modules;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LCRobloxCharacterScrap")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCRobloxCharacterScrap")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("97a374e4-446e-4d08-bd6e-a7ef7d84ef00")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LCRobloxCharacterScrap
{
	[BepInPlugin("Choustie.LCRobloxCharacterScrap", "LCRobloxCharacterScrap", "0.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "Choustie.LCRobloxCharacterScrap";

		private const string NAME = "LCRobloxCharacterScrap";

		private const string VERSION = "0.0.1";

		public static Plugin Instance { get; private set; }

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			Debug.Log((object)"AssetBundle Loaded Successfully!");
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "itemmod");
			Debug.Log((object)("Loading AssetBundle from: " + text));
			AssetBundle val = AssetBundle.LoadFromFile(text);
			if ((Object)(object)val == (Object)null)
			{
				Debug.LogError((object)"Failed to load AssetBundle!");
				return;
			}
			Debug.Log((object)"AssetBundle Loaded Successfully!");
			Item val2 = val.LoadAsset<Item>("Assets/ItemTutorial/ChoustieItem.asset");
			UseItemLogic useItemLogic = val2.spawnPrefab.AddComponent<UseItemLogic>();
			((GrabbableObject)useItemLogic).grabbable = true;
			((GrabbableObject)useItemLogic).grabbableToEnemies = true;
			((GrabbableObject)useItemLogic).itemProperties = val2;
			if ((Object)(object)val2 == (Object)null)
			{
				Debug.LogError((object)"Failed to load asset: Assets/ItemTutorial/ChoustieItem.asset");
				return;
			}
			Debug.Log((object)"Item Loaded Successfully!");
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Utilities.FixMixerGroups(val2.spawnPrefab);
			Items.RegisterScrap(val2, 1, (LevelTypes)(-1));
			Item val3 = val.LoadAsset<Item>("Assets/ItemTutorial/KaganItem.asset");
			UseItemLogic useItemLogic2 = val3.spawnPrefab.AddComponent<UseItemLogic>();
			((GrabbableObject)useItemLogic2).grabbable = true;
			((GrabbableObject)useItemLogic2).grabbableToEnemies = true;
			((GrabbableObject)useItemLogic2).itemProperties = val3;
			if ((Object)(object)val3 == (Object)null)
			{
				Debug.LogError((object)"Failed to load asset: Assets/ItemTutorial/KaganItem.asset");
				return;
			}
			Debug.Log((object)"Item Loaded Successfully!");
			NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab);
			Utilities.FixMixerGroups(val3.spawnPrefab);
			Items.RegisterScrap(val3, 1, (LevelTypes)(-1));
			Item val4 = val.LoadAsset<Item>("Assets/ItemTutorial/Angry_AlvinItem.asset");
			UseItemLogic useItemLogic3 = val4.spawnPrefab.AddComponent<UseItemLogic>();
			((GrabbableObject)useItemLogic3).grabbable = true;
			((GrabbableObject)useItemLogic3).grabbableToEnemies = true;
			((GrabbableObject)useItemLogic3).itemProperties = val4;
			if ((Object)(object)val4 == (Object)null)
			{
				Debug.LogError((object)"Failed to load asset: Assets/ItemTutorial/KaganItem.asset");
				return;
			}
			Debug.Log((object)"Item Loaded Successfully!");
			NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab);
			Utilities.FixMixerGroups(val4.spawnPrefab);
			Items.RegisterScrap(val4, 1, (LevelTypes)(-1));
			Item val5 = val.LoadAsset<Item>("Assets/ItemTutorial/VILRIZZItem.asset");
			UseItemLogic useItemLogic4 = val5.spawnPrefab.AddComponent<UseItemLogic>();
			((GrabbableObject)useItemLogic4).grabbable = true;
			((GrabbableObject)useItemLogic4).grabbableToEnemies = true;
			((GrabbableObject)useItemLogic4).itemProperties = val5;
			if ((Object)(object)val5 == (Object)null)
			{
				Debug.LogError((object)"Failed to load asset: Assets/ItemTutorial/KaganItem.asset");
				return;
			}
			Debug.Log((object)"Item Loaded Successfully!");
			NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab);
			Utilities.FixMixerGroups(val5.spawnPrefab);
			Items.RegisterScrap(val5, 1, (LevelTypes)(-1));
			Item val6 = val.LoadAsset<Item>("Assets/ItemTutorial/StehnBumlingItem.asset");
			UseItemLogic useItemLogic5 = val6.spawnPrefab.AddComponent<UseItemLogic>();
			((GrabbableObject)useItemLogic5).grabbable = true;
			((GrabbableObject)useItemLogic5).grabbableToEnemies = true;
			((GrabbableObject)useItemLogic5).itemProperties = val6;
			if ((Object)(object)val6 == (Object)null)
			{
				Debug.LogError((object)"Failed to load asset: Assets/ItemTutorial/KaganItem.asset");
				return;
			}
			Debug.Log((object)"Item Loaded Successfully!");
			NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab);
			Utilities.FixMixerGroups(val6.spawnPrefab);
			Items.RegisterScrap(val6, 1, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Item Tutorial");
		}
	}
	internal class WAV
	{
		private byte[] fileData;

		public int SampleCount { get; internal set; }

		public int Frequency { get; internal set; }

		public float[] LeftChannel { get; internal set; }

		public WAV(byte[] fileData)
		{
			this.fileData = fileData;
		}
	}
}
namespace LCRobloxCharacterScrap.Behaviours
{
	internal class UseItemLogic : PhysicsProp
	{
		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (buttonDown && !((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null))
			{
			}
		}
	}
	[CreateAssetMenu(fileName = "NewSoundData", menuName = "Item Tutorial/SoundData")]
	public class SoundData : ScriptableObject
	{
		public AudioClip soundClip;

		public float weight;

		public string methodName;
	}
}