Decompiled source of MakeSweetBreadGreatAgain v1.0.0

MakeSweetBreadGreatAgain.dll

Decompiled 3 weeks ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
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("MakeSweetBreadGreatAgain")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MakeSweetBreadGreatAgain")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c46f1b5a-09eb-4c05-8573-5a6f1847cf60")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MakeSweetBreadGreat;

[BepInPlugin("com.Navi24.MakeSweetBreadGreat", "MakeSweetBreadGreat", "1.0.0")]
public class MakeSweetBreadGreat : BaseUnityPlugin
{
	private void Awake()
	{
		Harmony.CreateAndPatchAll(typeof(MakeSweetBreadGreat), (string)null);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"MakeSweetBreadGreat has been loaded");
	}

	[HarmonyPatch(typeof(ObjectDB), "Awake")]
	[HarmonyPostfix]
	public static void EditFoodParameters(ObjectDB __instance)
	{
		GameObject itemPrefab = __instance.GetItemPrefab("VikingCupcake");
		if ((Object)(object)itemPrefab != (Object)null)
		{
			ItemDrop component = itemPrefab.GetComponent<ItemDrop>();
			if ((Object)(object)component != (Object)null)
			{
				component.m_itemData.m_shared.m_food = 43f;
				component.m_itemData.m_shared.m_foodStamina = 43f;
				component.m_itemData.m_shared.m_foodEitr = 43f;
				component.m_itemData.m_shared.m_foodBurnTime = 1800f;
				component.m_itemData.m_shared.m_foodRegen = 4f;
			}
		}
	}
}