Decompiled source of TF2Reskins v1.0.1

Plugins/tf2.dll

Decompiled a week ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using GameData;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("gtfo")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("gtfo")]
[assembly: AssemblyTitle("gtfo")]
[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;
		}
	}
}
[BepInPlugin("HatsuneFucker.TF2.Reskins", "TF2 Reskins", "1.0.0")]
internal class Loader : BasePlugin
{
	private static Harmony? _harmony_pan;

	public override void Load()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Expected O, but got Unknown
		_harmony_pan = new Harmony("Pan");
		_harmony_pan.PatchAll();
	}
}
[HarmonyPatch]
internal static class TF2Pan
{
	[HarmonyPatch(typeof(GameDataInit), "Initialize")]
	[HarmonyPostfix]
	internal static void Pan()
	{
		GameDataBlockBase<GearMeleeHeadPartDataBlock>.GetBlock(11u).General.Model = "Assets/TF2/Intel/Briefcase.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(9u).GearJSON = "{\"Ver\":1,\"Name\":\"Teufort Sledgehammer\",\"Packet\":{\"Comps\":{\"Length\":8,\"a\":{\"c\":2,\"v\":14},\"b\":{\"c\":3,\"v\":100},\"c\":{\"c\":4,\"v\":13},\"d\":{\"c\":44,\"v\":11},\"e\":{\"c\":46,\"v\":12},\"f\":{\"c\":48,\"v\":6},\"g\":{\"c\":50,\"v\":4}},\"publicName\":{\"data\":\"Teufort Sledgehammer\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(5u).General.Model = "Assets/TF2/HHHH/HHHH.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(28u).GearJSON = "{\"Ver\":1,\"Name\":\"Headless Horseless Horsemann's Headtaker\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":14},\"b\":{\"c\":3,\"v\":100},\"c\":{\"c\":4,\"v\":13},\"d\":{\"c\":48,\"v\":5}},\"publicName\":{\"data\":\"HHHH\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(2u).General.Model = "Assets/TF2/Axetinguisher/Axetinguisher.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(26u).GearJSON = "{\"Ver\":1,\"Name\":\"Axtinguisher\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":14},\"b\":{\"c\":3,\"v\":100},\"c\":{\"c\":4,\"v\":13},\"d\":{\"c\":48,\"v\":2}},\"publicName\":{\"data\":\"Axtinguisher\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(10u).General.Model = "Assets/TF2/Equalizer/Equalizer.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(27u).GearJSON = "{\"Ver\":1,\"Name\":\"Equalizer\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":14},\"b\":{\"c\":3,\"v\":100},\"c\":{\"c\":4,\"v\":13},\"d\":{\"c\":48,\"v\":10}},\"publicName\":{\"data\":\"Equalizer\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(16u).General.Model = "Assets/TF2/Frying Pan/pan.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(55u).GearJSON = "{\"Ver\":1,\"Name\":\"Frying Pan\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":29},\"b\":{\"c\":3,\"v\":163},\"c\":{\"c\":4,\"v\":41},\"d\":{\"c\":48,\"v\":16}},\"publicName\":{\"data\":\"Frying Pan\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(17u).General.Model = "Assets/TF2/Sandman/sandman.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(69u).GearJSON = "{\"Ver\":1,\"Name\":\"Ball Fortress Bonk Machine\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":29},\"b\":{\"c\":3,\"v\":163},\"c\":{\"c\":4,\"v\":41},\"d\":{\"c\":48,\"v\":17}},\"publicName\":{\"data\":\"Ball Fortress Bonk Machine\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(14u).General.Model = "Assets/TF2/Knife/SpyKnife.prefab";
		GameDataBlockBase<GearMeleeHeadPartDataBlock>.GetBlock(12u).General.Model = "Assets/TF2/Knife/FestiveKnifeLights.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(53u).GearJSON = "{\"Ver\":1,\"Name\":\"Knife\",\"Packet\":{\"Comps\":{\"Length\":6,\"a\":{\"c\":2,\"v\":27},\"b\":{\"c\":3,\"v\":161},\"c\":{\"c\":4,\"v\":39},\"d\":{\"c\":44,\"v\":14},\"e\":{\"c\":48,\"v\":14}},\"publicName\":{\"data\":\"Knife\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(19u).General.Model = "Assets/TF2/Big Earner/Big Earner.prefab";
		GameDataBlockBase<GearMeleeHeadPartDataBlock>.GetBlock(14u).General.Model = "Assets/TF2/Big Earner/FestiveBigEarnerLights.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(68u).GearJSON = "{\"Ver\":1,\"Name\":\"Big Earner\",\"Packet\":{\"Comps\":{\"Length\":6,\"a\":{\"c\":2,\"v\":27},\"b\":{\"c\":3,\"v\":161},\"c\":{\"c\":4,\"v\":39},\"d\":{\"c\":44,\"v\":14},\"e\":{\"c\":48,\"v\":19}},\"publicName\":{\"data\":\"Big Earner\"}}}";
		GameDataBlockBase<GearMeleeHandlePartDataBlock>.GetBlock(15u).General.Model = "Assets/TF2/Huntsman/Arrow.prefab";
		GameDataBlockBase<PlayerOfflineGearDataBlock>.GetBlock(54u).GearJSON = "{\"Ver\":1,\"Name\":\"Huntsman Arrow\",\"Packet\":{\"Comps\":{\"Length\":5,\"a\":{\"c\":2,\"v\":28},\"b\":{\"c\":3,\"v\":162},\"c\":{\"c\":4,\"v\":40},\"d\":{\"c\":48,\"v\":15}},\"publicName\":{\"data\":\"Huntsman Arrow\"}}}";
	}
}