Decompiled source of LoxMilkMod v1.0.9

plugins/loxmilkmod/LoxMilkMod.dll

Decompiled 2 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Jotunn;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
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("LoxMilkMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LoxMilkMod")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9b8b76d8-a423-44e1-80d0-104d6058d5d1")]
[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 LoxMilkMod;

[BepInPlugin("Jax.LoxMilkMod", "Lox Milk Mod", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class LoxMilkMod : BaseUnityPlugin
{
	public class SE_CheeseSatiated : StatusEffect
	{
		public override void UpdateStatusEffect(float dt)
		{
			((StatusEffect)this).UpdateStatusEffect(dt);
		}

		public override bool IsDone()
		{
			return base.m_time > base.m_ttl;
		}
	}

	public class MobileLoxWorkbench : MonoBehaviour
	{
		public static readonly List<MobileLoxWorkbench> Instances = new List<MobileLoxWorkbench>();

		private void OnEnable()
		{
			if (!Instances.Contains(this))
			{
				Instances.Add(this);
			}
		}

		private void OnDisable()
		{
			Instances.Remove(this);
		}
	}

	public class LoxWheelAnimator : MonoBehaviour
	{
		public string LeftWheelName = "WheelLeft";

		public string RightWheelName = "WheelRight";

		public string LeftGearName = "GearLeft";

		public string RightGearName = "GearRight";

		public float WheelRadius = 0.5f;

		public float GearSpeed = 80f;

		private Transform _leftWheel;

		private Transform _rightWheel;

		private Transform _leftGear;

		private Transform _rightGear;

		private Rigidbody _body;

		private void Awake()
		{
			_body = ((Component)this).GetComponent<Rigidbody>();
			if ((Object)(object)_body == (Object)null)
			{
				_body = ((Component)this).GetComponentInParent<Rigidbody>();
			}
			Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(true);
			foreach (Transform val in componentsInChildren)
			{
				if (((Object)val).name == LeftWheelName)
				{
					_leftWheel = val;
				}
				else if (((Object)val).name == RightWheelName)
				{
					_rightWheel = val;
				}
				else if (((Object)val).name == LeftGearName)
				{
					_leftGear = val;
				}
				else if (((Object)val).name == RightGearName)
				{
					_rightGear = val;
				}
			}
		}

		private void Update()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			float deltaTime = Time.deltaTime;
			if ((Object)(object)_body != (Object)null && WheelRadius > 0f)
			{
				Vector3 velocity = _body.velocity;
				float num = Vector3.Dot(velocity, ((Component)this).transform.forward);
				if (Mathf.Abs(num) >= 0.01f)
				{
					float num2 = num * deltaTime;
					float angleDeg = num2 / ((float)Math.PI * 2f * WheelRadius) * 360f;
					RotateWheel(_leftWheel, angleDeg);
					RotateWheel(_rightWheel, angleDeg);
				}
			}
			if ((Object)(object)_leftGear != (Object)null)
			{
				_leftGear.Rotate(GearSpeed * deltaTime, 0f, 0f, (Space)1);
			}
			if ((Object)(object)_rightGear != (Object)null)
			{
				_rightGear.Rotate((0f - GearSpeed) * deltaTime, 0f, 0f, (Space)1);
			}
		}

		private void RotateWheel(Transform wheel, float angleDeg)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)wheel == (Object)null))
			{
				Vector3 right = Vector3.right;
				wheel.Rotate(right, angleDeg, (Space)1);
			}
		}
	}

	public class ButterChurnAnimator : MonoBehaviour
	{
		public string RotorTag = "churnrotor";

		public string PlungerTag = "plunger";

		public float RotorSpeed = 90f;

		public float PlungerAmplitude = 0.1f;

		public float PlungerSpeed = 1.5f;

		private Transform _rotor;

		private Transform _plunger;

		private Vector3 _plungerStartPos;

		private Fermenter _fermenter;

		private ZNetView _znv;

		private void Awake()
		{
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			_fermenter = ((Component)this).GetComponent<Fermenter>();
			_znv = ((Component)this).GetComponent<ZNetView>();
			Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(true);
			foreach (Transform val in componentsInChildren)
			{
				string text = ((Object)val).name.ToLowerInvariant();
				if ((Object)(object)_rotor == (Object)null && text.Contains(RotorTag))
				{
					_rotor = val;
				}
				if ((Object)(object)_plunger == (Object)null && text.Contains(PlungerTag))
				{
					_plunger = val;
				}
			}
			if ((Object)(object)_plunger != (Object)null)
			{
				_plungerStartPos = _plunger.localPosition;
			}
		}

		private bool IsWorking()
		{
			if ((Object)(object)_fermenter == (Object)null || (Object)(object)_znv == (Object)null || !_znv.IsValid())
			{
				return false;
			}
			ZDO zDO = _znv.GetZDO();
			if (zDO == null)
			{
				return false;
			}
			string @string = zDO.GetString("Content", "");
			return !string.IsNullOrEmpty(@string);
		}

		private void Update()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			if (IsWorking())
			{
				float deltaTime = Time.deltaTime;
				if ((Object)(object)_rotor != (Object)null)
				{
					_rotor.Rotate(Vector3.right, RotorSpeed * deltaTime, (Space)1);
				}
				if ((Object)(object)_plunger != (Object)null)
				{
					float num = Mathf.Sin(Time.time * PlungerSpeed) * PlungerAmplitude;
					Vector3 plungerStartPos = _plungerStartPos;
					plungerStartPos.y += num;
					_plunger.localPosition = plungerStartPos;
				}
			}
		}
	}

	public class SE_StrongBones : StatusEffect
	{
		public override void UpdateStatusEffect(float dt)
		{
			((StatusEffect)this).UpdateStatusEffect(dt);
		}
	}

	public class SE_Skyr : StatusEffect
	{
		private float checkTimer = 0f;

		public override void UpdateStatusEffect(float dt)
		{
			((StatusEffect)this).UpdateStatusEffect(dt);
			checkTimer += dt;
			if (checkTimer < 1f)
			{
				return;
			}
			checkTimer = 0f;
			Player localPlayer = Player.m_localPlayer;
			if ((Object)(object)localPlayer == (Object)null)
			{
				return;
			}
			SEMan sEMan = ((Character)localPlayer).GetSEMan();
			if (sEMan == null)
			{
				return;
			}
			int stableHashCode = StringExtensionMethods.GetStableHashCode("Rested");
			if (!sEMan.HaveStatusEffect(stableHashCode))
			{
				StatusEffect val = sEMan.AddStatusEffect(stableHashCode, false, 0, 0f);
				if ((Object)(object)val != (Object)null)
				{
					val.m_ttl = 120f;
				}
			}
		}
	}

	public class RequireNearbyPiece : MonoBehaviour
	{
		public string RequiredPieceName;

		public float RequiredDistance = 5f;

		private Piece _piece;

		private void Awake()
		{
			_piece = ((Component)this).GetComponent<Piece>();
			if (!IsRequiredPieceNearby())
			{
				ZNetView component = ((Component)this).GetComponent<ZNetView>();
				if ((Object)(object)component != (Object)null && component.IsValid())
				{
					component.Destroy();
				}
				else
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
			}
		}

		private bool IsRequiredPieceNearby()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			Vector3 position = ((Component)this).transform.position;
			Piece[] array = Object.FindObjectsOfType<Piece>();
			foreach (Piece val in array)
			{
				if (!((Object)(object)val == (Object)null) && ((Object)val).name == RequiredPieceName && Vector3.Distance(position, ((Component)val).transform.position) <= RequiredDistance)
				{
					return true;
				}
			}
			return false;
		}
	}

	public const string ModGUID = "Jax.LoxMilkMod";

	public const string ModName = "Lox Milk Mod";

	public const string Version = "1.0.0";

	public static LoxMilkMod Instance;

	private AssetBundle _bundle;

	private GameObject _skyrModel;

	private GameObject _cheesePlateModel;

	private GameObject _milkBottleModel;

	private GameObject _soupModel;

	private GameObject _breadDoughModel;

	private GameObject _breadModel;

	private GameObject _goudaModel;

	private GameObject _lazurModel;

	private GameObject _sernikModel;

	private GameObject _meltCheeseModel;

	private GameObject _twarogModel;

	private GameObject _milkerModel;

	private GameObject _butterChurnModel;

	private GameObject _butterModel;

	private GameObject _buttermilkModel;

	private GameObject _bearSoupModel;

	private GameObject _fulingDelicacyModel;

	private GameObject _rennetModel;

	private GameObject _buttermilkTankModel;

	private const string ButtermilkTankPieceName = "piece_buttermilktank";

	private GameObject _cheesemachineModel;

	private const string CheeseMachinePieceName = "CheeseMachine";

	private GameObject _milkCrateModel;

	private GameObject _buttermilkCrateModel;

	private GameObject _butterBucketModel;

	private GameObject _goudaDecorModel;

	private GameObject _goudaDecor2Model;

	private GameObject _goudaDecor3Model;

	private GameObject _lazurDecorModel;

	private GameObject _lazurDecor2Model;

	private GameObject _lazurDecor3Model;

	private GameObject _twarogBowl1Model;

	private GameObject _twarogBowl2Model;

	private GameObject _twarogBowl3Model;

	private Sprite _iconSkyr;

	private Sprite _iconCheesePlate;

	private Sprite _iconButter;

	private Sprite _iconButterMilk;

	private Sprite _iconBearSoup;

	private Sprite _iconFulingDelicacy;

	private Sprite _iconMilkerPiece;

	private Sprite _iconWhiteCheese;

	private Sprite _iconMeltCheese;

	private Sprite _iconCheeseCake;

	private Sprite _iconLazur;

	private Sprite _iconGouda;

	private Sprite _iconMilkBread;

	private Sprite _iconMilkBreadDough;

	private Sprite _iconMilkSoup;

	private Sprite _iconLoxMilk;

	private Sprite _iconRennet;

	private Sprite _iconMaselnica;

	private Sprite _iconZbiornik;

	private Sprite _iconGouda1;

	private Sprite _iconGouda2;

	private Sprite _iconGouda3;

	private Sprite _iconLazur1;

	private Sprite _iconLazur2;

	private Sprite _iconLazur3;

	private Sprite _iconButter1;

	private Sprite _iconMleko1;

	private Sprite _iconMaslanka1;

	private Sprite _iconTwarog1;

	private Sprite _iconTwarog2;

	private Sprite _iconTwarog3;

	private Sprite _iconSerowar;

	private GameObject _basetwarogModel;

	private GameObject _basemeltModel;

	private GameObject _basegoudaModel;

	private GameObject _baselazurModel;

	private Sprite _iconbasetwarog;

	private Sprite _iconbasemelt;

	private Sprite _iconbasegouda;

	private Sprite _iconbaselazur;

	private const string MobileWorkbenchPieceName = "piece_mobile_loxworkbench";

	private const string ButterChurnPieceName = "piece_butterchurn";

	private const float MilkCooldown = 1260f;

	private const int MilkPerLox = 5;

	private readonly Dictionary<int, float> _loxNextMilkTime = new Dictionary<int, float>();

	private Harmony _harmony;

	private void Awake()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		_harmony = new Harmony("Jax.LoxMilkMod");
		_harmony.PatchAll();
		PrefabManager.OnVanillaPrefabsAvailable += OnVanillaPrefabsAvailable;
		LoadAssetBundle();
		Logger.LogInfo((object)"[LoxMilkMod] Start");
		Instance = this;
	}

	private void OnVanillaPrefabsAvailable()
	{
		CreateCheeseMachine();
		RegisterCheeseConversions();
		RegisterItems();
		FixItemIcons();
		RegisterDecorItems();
	}

	private void RegisterCheeseConversions()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Expected O, but got Unknown
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Expected O, but got Unknown
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Expected O, but got Unknown
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Expected O, but got Unknown
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Expected O, but got Unknown
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Expected O, but got Unknown
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: Expected O, but got Unknown
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Expected O, but got Unknown
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0140: Expected O, but got Unknown
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0145: Expected O, but got Unknown
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Lazur",
			ToItem = "LazurCheese",
			Station = "CheeseMachine",
			ProducedItems = 3
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_SerTopiony",
			ToItem = "SerTopionyItem",
			Station = "CheeseMachine",
			ProducedItems = 3
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Twarog",
			ToItem = "TwarogItem",
			Station = "CheeseMachine",
			ProducedItems = 3
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Gouda",
			ToItem = "GoudaCheese",
			Station = "CheeseMachine",
			ProducedItems = 3
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Skyr",
			ToItem = "skyrItem",
			Station = "piece_buttermilktank",
			ProducedItems = 3
		}));
	}

	public static void ShowSatiatedEffect(Player player, Sprite icon, float duration)
	{
		if (!((Object)(object)player == (Object)null))
		{
			SE_Stats val = ScriptableObject.CreateInstance<SE_Stats>();
			((Object)val).name = "SE_SatiatedVisual";
			((StatusEffect)val).m_name = "Stuffed";
			((StatusEffect)val).m_tooltip = "You will feel full longer.";
			((StatusEffect)val).m_ttl = duration;
			((StatusEffect)val).m_icon = icon;
			((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)val, false, 0, 0f);
		}
	}

	private void OnDestroy()
	{
		PrefabManager.OnVanillaPrefabsAvailable -= OnVanillaPrefabsAvailable;
	}

	private void LoadAssetBundle()
	{
		string text = Path.Combine(Paths.PluginPath, "LoxMilkMod", "loxmilkitem");
		Logger.LogInfo((object)("[LoxMilkMod] loading assetbundle: " + text));
		_bundle = AssetBundle.LoadFromFile(text);
		if ((Object)(object)_bundle == (Object)null)
		{
			Logger.LogError((object)"[LoxMilkMod] Nie udało się wczytać assetbundla!");
			return;
		}
		_skyrModel = LoadPrefabFromBundle("skyrModel");
		_cheesePlateModel = LoadPrefabFromBundle("cheeseplateModel");
		_milkBottleModel = LoadPrefabFromBundle("LoxMilkBottleModel");
		_soupModel = LoadPrefabFromBundle("zupa mleczna");
		_breadDoughModel = LoadPrefabFromBundle("LoxMilkBreadDoughModel");
		_breadModel = LoadPrefabFromBundle("LoxMilkBreadModel");
		_goudaModel = LoadPrefabFromBundle("GoudaModel");
		_lazurModel = LoadPrefabFromBundle("LazurModel");
		_sernikModel = LoadPrefabFromBundle("SernikModel");
		_meltCheeseModel = LoadPrefabFromBundle("SerTopionyModel");
		_twarogModel = LoadPrefabFromBundle("TwarogModel");
		_milkerModel = LoadPrefabFromBundle("LoxMilkerModel");
		_butterChurnModel = LoadPrefabFromBundle("MaselnicaModel");
		_butterModel = LoadPrefabFromBundle("MasloModel");
		_buttermilkModel = LoadPrefabFromBundle("MaslankaModel");
		_bearSoupModel = LoadPrefabFromBundle("BearSoupModel");
		_fulingDelicacyModel = LoadPrefabFromBundle("FulingDelicacyModel");
		_rennetModel = LoadPrefabFromBundle("PodpuszczkaModel");
		_buttermilkTankModel = LoadPrefabFromBundle("ZbiornikModel");
		_cheesemachineModel = LoadPrefabFromBundle("serowarModel");
		_milkCrateModel = LoadPrefabFromBundle("milkCrateModel");
		_buttermilkCrateModel = LoadPrefabFromBundle("buttermilkCrateModel");
		_butterBucketModel = LoadPrefabFromBundle("butterBucketModel");
		_goudaDecorModel = LoadPrefabFromBundle("goudaDecorModel");
		_goudaDecor2Model = LoadPrefabFromBundle("goudaDecor2Model");
		_goudaDecor3Model = LoadPrefabFromBundle("goudaDecor3Model");
		_lazurDecorModel = LoadPrefabFromBundle("lazurDecorModel");
		_lazurDecor2Model = LoadPrefabFromBundle("lazurDecor2Model");
		_lazurDecor3Model = LoadPrefabFromBundle("lazurDecor3Model");
		_twarogBowl1Model = LoadPrefabFromBundle("twarogBowl1Model");
		_twarogBowl2Model = LoadPrefabFromBundle("twarogBowl2Model");
		_twarogBowl3Model = LoadPrefabFromBundle("twarogBowl3Model");
		_iconSkyr = _bundle.LoadAsset<Sprite>("icon_skyr");
		_iconCheesePlate = _bundle.LoadAsset<Sprite>("icon_cheeseplate");
		_iconButter = _bundle.LoadAsset<Sprite>("icon_butter");
		_iconButterMilk = _bundle.LoadAsset<Sprite>("icon_buttermilk");
		_iconBearSoup = _bundle.LoadAsset<Sprite>("icon_bearsoup");
		_iconFulingDelicacy = _bundle.LoadAsset<Sprite>("icon_fulingdelicacy");
		_iconCheeseCake = _bundle.LoadAsset<Sprite>("icon_cheesecake");
		_iconGouda = _bundle.LoadAsset<Sprite>("icon_gouda");
		_iconLazur = _bundle.LoadAsset<Sprite>("icon_lazur");
		_iconMeltCheese = _bundle.LoadAsset<Sprite>("icon_meltcheese");
		_iconLoxMilk = _bundle.LoadAsset<Sprite>("icon_loxmilk");
		_iconMilkerPiece = _bundle.LoadAsset<Sprite>("icon_milker");
		_iconMilkSoup = _bundle.LoadAsset<Sprite>("icon_milksoup");
		_iconWhiteCheese = _bundle.LoadAsset<Sprite>("icon_whitecheese");
		_iconMilkBreadDough = _bundle.LoadAsset<Sprite>("icon_milkbreaddough");
		_iconMilkBread = _bundle.LoadAsset<Sprite>("icon_milkbread");
		_iconRennet = _bundle.LoadAsset<Sprite>("icon_rennet");
		_iconMaselnica = _bundle.LoadAsset<Sprite>("icon_maselnica");
		_iconZbiornik = _bundle.LoadAsset<Sprite>("icon_zbiornik");
		_iconSerowar = _bundle.LoadAsset<Sprite>("icon_serowar");
		_iconButter1 = _bundle.LoadAsset<Sprite>("icon_maslostack");
		_iconGouda1 = _bundle.LoadAsset<Sprite>("icon_gouda1");
		_iconGouda2 = _bundle.LoadAsset<Sprite>("icon_gouda2");
		_iconGouda3 = _bundle.LoadAsset<Sprite>("icon_gouda3");
		_iconLazur1 = _bundle.LoadAsset<Sprite>("icon_lazur1");
		_iconLazur2 = _bundle.LoadAsset<Sprite>("icon_lazur2");
		_iconLazur3 = _bundle.LoadAsset<Sprite>("icon_lazur3");
		_iconMaslanka1 = _bundle.LoadAsset<Sprite>("icon_maslankastack");
		_iconMleko1 = _bundle.LoadAsset<Sprite>("icon_mlekostack");
		_iconTwarog1 = _bundle.LoadAsset<Sprite>("icon_twarog1");
		_iconTwarog2 = _bundle.LoadAsset<Sprite>("icon_twarog2");
		_iconTwarog3 = _bundle.LoadAsset<Sprite>("icon_twarog3");
		_basetwarogModel = LoadPrefabFromBundle("bazatwarogModel");
		_basemeltModel = LoadPrefabFromBundle("bazatopionyModel");
		_baselazurModel = LoadPrefabFromBundle("bazalazurModel");
		_basegoudaModel = LoadPrefabFromBundle("bazagoudaModel");
		_iconbasetwarog = _bundle.LoadAsset<Sprite>("icon_bazatwarog");
		_iconbasegouda = _bundle.LoadAsset<Sprite>("icon_bazagouda");
		_iconbaselazur = _bundle.LoadAsset<Sprite>("icon_bazalazur");
		_iconbasemelt = _bundle.LoadAsset<Sprite>("icon_bazatopiony");
		if ((Object)(object)_iconZbiornik == (Object)null)
		{
			Logger.LogWarning((object)"[LoxMilkMod] icon_zbiornik not found");
		}
	}

	private void SetupDecorVisual(GameObject parent, GameObject model, float scale, float yOffset)
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)model == (Object)null))
		{
			GameObject val = Object.Instantiate<GameObject>(model, parent.transform);
			val.transform.localRotation = Quaternion.identity;
			val.transform.localScale = Vector3.one * scale;
			Vector3 zero = Vector3.zero;
			zero.y = yOffset;
			val.transform.localPosition = zero;
		}
	}

	private string GetRelativePath(Transform root, Transform target)
	{
		List<string> list = new List<string>();
		while ((Object)(object)target != (Object)(object)root)
		{
			list.Insert(0, ((Object)target).name);
			target = target.parent;
		}
		return string.Join("/", list);
	}

	private void EnableServingTray(ItemDrop drop)
	{
		if ((Object)(object)drop == (Object)null)
		{
			return;
		}
		SharedData val = drop.m_itemData?.m_shared;
		if (val != null)
		{
			FieldInfo field = ((object)val).GetType().GetField("m_canBePlacedOnTable");
			if (field != null)
			{
				field.SetValue(val, true);
			}
		}
	}

	private void FixDropCollider(GameObject dropGO, float height)
	{
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		Collider[] componentsInChildren = dropGO.GetComponentsInChildren<Collider>(true);
		foreach (Collider val in componentsInChildren)
		{
			Object.Destroy((Object)(object)val);
		}
		BoxCollider val2 = dropGO.AddComponent<BoxCollider>();
		val2.size = new Vector3(0.35f, height, 0.35f);
		val2.center = new Vector3(0f, height / 2f, 0f);
		((Collider)val2).isTrigger = false;
		Rigidbody component = dropGO.GetComponent<Rigidbody>();
		if ((Object)(object)component != (Object)null)
		{
			component.constraints = (RigidbodyConstraints)112;
			component.drag = 5f;
			component.angularDrag = 999f;
		}
	}

	private void RegisterDecorPiece(string pieceName, string displayName, GameObject model, Sprite icon, float scale, float yOffset, float boxHeight, params RequirementConfig[] requirements)
	{
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0201: Unknown result type (might be due to invalid IL or missing references)
		//IL_0209: Unknown result type (might be due to invalid IL or missing references)
		//IL_0215: Unknown result type (might be due to invalid IL or missing references)
		//IL_0221: Unknown result type (might be due to invalid IL or missing references)
		//IL_022c: Expected O, but got Unknown
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_015f: Unknown result type (might be due to invalid IL or missing references)
		//IL_026b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0275: Expected O, but got Unknown
		GameObject prefab = PrefabManager.Instance.GetPrefab("piece_chair");
		if ((Object)(object)prefab == (Object)null)
		{
			Logger.LogError((object)"[LoxMilkMod] piece_chair not found");
			return;
		}
		GameObject val = PrefabManager.Instance.CreateClonedPrefab(pieceName, prefab);
		MeshRenderer[] componentsInChildren = val.GetComponentsInChildren<MeshRenderer>(true);
		foreach (MeshRenderer val2 in componentsInChildren)
		{
			((Renderer)val2).enabled = false;
		}
		Collider[] componentsInChildren2 = val.GetComponentsInChildren<Collider>(true);
		foreach (Collider val3 in componentsInChildren2)
		{
			Object.DestroyImmediate((Object)(object)val3);
		}
		Object.DestroyImmediate((Object)(object)val.GetComponent<Chair>());
		WearNTear component = val.GetComponent<WearNTear>();
		if ((Object)(object)component != (Object)null)
		{
			component.m_health = 50f;
			component.m_noRoofWear = true;
			component.m_noSupportWear = true;
		}
		Piece component2 = val.GetComponent<Piece>();
		component2.m_groundOnly = false;
		component2.m_groundPiece = false;
		component2.m_clipEverything = false;
		component2.m_canBeRemoved = true;
		component2.m_blockRadius = 0f;
		if ((Object)(object)model != (Object)null)
		{
			GameObject val4 = Object.Instantiate<GameObject>(model, val.transform);
			val4.transform.localRotation = Quaternion.identity;
			val4.transform.localScale = Vector3.one * scale;
			Vector3 zero = Vector3.zero;
			zero.y = yOffset;
			val4.transform.localPosition = zero;
			Collider[] componentsInChildren3 = val4.GetComponentsInChildren<Collider>(true);
			foreach (Collider val5 in componentsInChildren3)
			{
				Object.DestroyImmediate((Object)(object)val5);
			}
		}
		BoxCollider val6 = val.AddComponent<BoxCollider>();
		val6.size = new Vector3(1f, boxHeight, 1f);
		val6.center = new Vector3(0f, boxHeight / 2f, 0f);
		((Collider)val6).isTrigger = false;
		component2.m_name = displayName;
		component2.m_description = "Dairy decoration.";
		PieceConfig val7 = new PieceConfig
		{
			PieceTable = "Hammer",
			Name = displayName,
			Description = "Dairy decoration.",
			Category = "Misc",
			Icon = icon
		};
		foreach (RequirementConfig val8 in requirements)
		{
			val7.AddRequirement(val8.Item, val8.Amount, true);
		}
		PieceManager.Instance.AddPiece(new CustomPiece(val, false, val7));
		Logger.LogInfo((object)("[LoxMilkMod] Dairy decoration added: " + displayName));
	}

	private void RegisterDecorItems()
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Expected O, but got Unknown
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Expected O, but got Unknown
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Expected O, but got Unknown
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Expected O, but got Unknown
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Expected O, but got Unknown
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_013b: Expected O, but got Unknown
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_0180: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Expected O, but got Unknown
		//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d7: Expected O, but got Unknown
		//IL_020b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0210: Unknown result type (might be due to invalid IL or missing references)
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Expected O, but got Unknown
		//IL_0259: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: Unknown result type (might be due to invalid IL or missing references)
		//IL_026a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0273: Expected O, but got Unknown
		//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c1: Expected O, but got Unknown
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0306: Unknown result type (might be due to invalid IL or missing references)
		//IL_030f: Expected O, but got Unknown
		//IL_0343: Unknown result type (might be due to invalid IL or missing references)
		//IL_0348: Unknown result type (might be due to invalid IL or missing references)
		//IL_0354: Unknown result type (might be due to invalid IL or missing references)
		//IL_035d: Expected O, but got Unknown
		//IL_0391: Unknown result type (might be due to invalid IL or missing references)
		//IL_0396: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ac: Expected O, but got Unknown
		//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03fb: Expected O, but got Unknown
		RegisterDecorPiece("piece_loxmilk_crate", "Crate of lox milk", _milkCrateModel, _iconMleko1, 1.2f, 0f, 0.45f, new RequirementConfig
		{
			Item = "LoxMilkItem",
			Amount = 4
		}, new RequirementConfig
		{
			Item = "Wood",
			Amount = 2
		});
		RegisterDecorPiece("piece_buttermilk_crate", "Crate of lox buttermilk", _buttermilkCrateModel, _iconMaslanka1, 1f, 0f, 0.25f, new RequirementConfig
		{
			Item = "ButtermilkItem",
			Amount = 9
		}, new RequirementConfig
		{
			Item = "Wood",
			Amount = 2
		});
		RegisterDecorPiece("piece_butter_bucket", "Bucket of butter", _butterBucketModel, _iconButter1, 1.6f, 0f, 0.5f, new RequirementConfig
		{
			Item = "ButterItem",
			Amount = 10
		}, new RequirementConfig
		{
			Item = "Wood",
			Amount = 2
		});
		RegisterDecorPiece("piece_gouda_single", "Gouda cheese", _goudaDecorModel, _iconGouda1, 2.3f, -0.01f, 0.3f, new RequirementConfig
		{
			Item = "GoudaCheese",
			Amount = 1
		});
		RegisterDecorPiece("piece_gouda_double1", "Two gouda cheeses", _goudaDecor2Model, _iconGouda2, 2f, -0.01f, 0.48f, new RequirementConfig
		{
			Item = "GoudaCheese",
			Amount = 2
		});
		RegisterDecorPiece("piece_gouda_double2", "Two gouda cheeses", _goudaDecor3Model, _iconGouda3, 2f, -0.01f, 0.55f, new RequirementConfig
		{
			Item = "GoudaCheese",
			Amount = 2
		});
		RegisterDecorPiece("piece_lazur_single", "Blue cheese", _lazurDecorModel, _iconLazur1, 2f, 0f, 0.3f, new RequirementConfig
		{
			Item = "LazurCheese",
			Amount = 1
		});
		RegisterDecorPiece("piece_lazur_double1", "Two blue cheeses", _lazurDecor2Model, _iconLazur2, 2f, 0f, 0.5f, new RequirementConfig
		{
			Item = "LazurCheese",
			Amount = 2
		});
		RegisterDecorPiece("piece_lazur_double2", "Two blue cheeses", _lazurDecor3Model, _iconLazur3, 2f, 0f, 0.6f, new RequirementConfig
		{
			Item = "LazurCheese",
			Amount = 2
		});
		RegisterDecorPiece("piece_twarog_bowl1", "Small bowl of cottage cheese", _twarogBowl1Model, _iconTwarog1, 2f, -0.01f, 0.22f, new RequirementConfig
		{
			Item = "TwarogItem",
			Amount = 1
		});
		RegisterDecorPiece("piece_twarog_bowl2", "Medium bowl of cottage cheese", _twarogBowl2Model, _iconTwarog2, 1.3f, -0.02f, 0.15f, new RequirementConfig
		{
			Item = "TwarogItem",
			Amount = 10
		});
		RegisterDecorPiece("piece_twarog_bowl3", "Large bowl of cottage cheese", _twarogBowl3Model, _iconTwarog3, 1.7f, 0.28f, 0.4f, new RequirementConfig
		{
			Item = "TwarogItem",
			Amount = 20
		});
	}

	protected GameObject LoadPrefabFromBundle(string prefabName)
	{
		if ((Object)(object)_bundle == (Object)null)
		{
			return null;
		}
		GameObject val = _bundle.LoadAsset<GameObject>(prefabName);
		if ((Object)(object)val == (Object)null)
		{
			Logger.LogWarning((object)("[LoxMilkMod] prefab not found: " + prefabName));
		}
		else
		{
			Logger.LogInfo((object)("[LoxMilkMod] prefab added: " + prefabName));
		}
		return val;
	}

	private void OverrideDropModel(GameObject targetPrefab, GameObject sourcePrefab)
	{
		if (!((Object)(object)targetPrefab == (Object)null) && !((Object)(object)sourcePrefab == (Object)null))
		{
			MeshFilter componentInChildren = sourcePrefab.GetComponentInChildren<MeshFilter>(true);
			MeshRenderer componentInChildren2 = sourcePrefab.GetComponentInChildren<MeshRenderer>(true);
			MeshFilter componentInChildren3 = targetPrefab.GetComponentInChildren<MeshFilter>(true);
			MeshRenderer componentInChildren4 = targetPrefab.GetComponentInChildren<MeshRenderer>(true);
			if ((Object)(object)componentInChildren != (Object)null && (Object)(object)componentInChildren3 != (Object)null)
			{
				componentInChildren3.sharedMesh = componentInChildren.sharedMesh;
			}
			if ((Object)(object)componentInChildren2 != (Object)null && (Object)(object)componentInChildren4 != (Object)null)
			{
				((Renderer)componentInChildren4).sharedMaterials = ((Renderer)componentInChildren2).sharedMaterials;
			}
		}
	}

	private void EnsureItemHasIcon(ItemDrop itemDrop, Sprite fallback)
	{
		if ((Object)(object)itemDrop == (Object)null)
		{
			return;
		}
		SharedData val = itemDrop.m_itemData?.m_shared;
		if (val != null && (val.m_icons == null || val.m_icons.Length == 0))
		{
			if ((Object)(object)fallback != (Object)null)
			{
				val.m_icons = (Sprite[])(object)new Sprite[1] { fallback };
				Logger.LogInfo((object)("[LoxMilkMod] fallback icon added: " + ((Object)itemDrop).name));
			}
			else
			{
				val.m_icons = (Sprite[])(object)new Sprite[1];
				Logger.LogWarning((object)("[LoxMilkMod] fallback icon not found " + ((Object)itemDrop).name + " — placeholder (null)."));
			}
		}
	}

	private void FixItemIcons()
	{
		FixItemIcon("RennetItem", _iconRennet);
		FixItemIcon("BoneFragments", null);
	}

	private void FixItemIcon(string itemName, Sprite fallback)
	{
		if ((Object)(object)ObjectDB.instance == (Object)null)
		{
			return;
		}
		GameObject itemPrefab = ObjectDB.instance.GetItemPrefab(itemName);
		if ((Object)(object)itemPrefab == (Object)null)
		{
			Logger.LogWarning((object)("[LoxMilkMod] FixItemIcon: prefab " + itemName + " not found"));
			return;
		}
		ItemDrop component = itemPrefab.GetComponent<ItemDrop>();
		if (!((Object)(object)component == (Object)null))
		{
			EnsureItemHasIcon(component, fallback);
		}
	}

	private void ReplaceDropVisual(GameObject dropGO, GameObject modelPrefab, float scale)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)dropGO == (Object)null || (Object)(object)modelPrefab == (Object)null)
		{
			return;
		}
		foreach (Transform item in dropGO.transform)
		{
			Transform val = item;
			Object.Destroy((Object)(object)((Component)val).gameObject);
		}
		GameObject val2 = Object.Instantiate<GameObject>(modelPrefab, dropGO.transform);
		val2.transform.localPosition = Vector3.zero;
		val2.transform.localRotation = Quaternion.identity;
		val2.transform.localScale = Vector3.one * scale;
		Collider[] componentsInChildren = val2.GetComponentsInChildren<Collider>(true);
		foreach (Collider val3 in componentsInChildren)
		{
			Object.Destroy((Object)(object)val3);
		}
	}

	private void SetupCheeseBaseVisual(CustomItem item, GameObject model, Sprite icon, float scale)
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		if (item == null)
		{
			return;
		}
		ItemDrop itemDrop = item.ItemDrop;
		if (!((Object)(object)itemDrop == (Object)null))
		{
			SharedData shared = itemDrop.m_itemData.m_shared;
			shared.m_itemType = (ItemType)1;
			shared.m_food = 0f;
			shared.m_foodStamina = 0f;
			shared.m_foodBurnTime = 0f;
			shared.m_foodRegen = 0f;
			if ((Object)(object)icon != (Object)null)
			{
				shared.m_icons = (Sprite[])(object)new Sprite[1] { icon };
			}
			ReplaceDropVisual(((Component)itemDrop).gameObject, model, scale);
			FixDropCollider(((Component)itemDrop).gameObject, 0.25f);
		}
	}

	private void FixDropScale(GameObject drop, float scale)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		MeshFilter componentInChildren = drop.GetComponentInChildren<MeshFilter>(true);
		if (!((Object)(object)componentInChildren == (Object)null))
		{
			((Component)componentInChildren).transform.localScale = Vector3.one * scale;
		}
	}

	private void RegisterItems()
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected O, but got Unknown
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Expected O, but got Unknown
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Expected O, but got Unknown
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Expected O, but got Unknown
		//IL_0248: Unknown result type (might be due to invalid IL or missing references)
		//IL_024f: Expected O, but got Unknown
		//IL_0289: Unknown result type (might be due to invalid IL or missing references)
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_029a: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a3: Expected O, but got Unknown
		//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bf: Expected O, but got Unknown
		//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02db: Expected O, but got Unknown
		//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f7: Expected O, but got Unknown
		//IL_0308: Unknown result type (might be due to invalid IL or missing references)
		//IL_0312: Expected O, but got Unknown
		//IL_032b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0330: Unknown result type (might be due to invalid IL or missing references)
		//IL_033c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0348: Unknown result type (might be due to invalid IL or missing references)
		//IL_0352: Expected O, but got Unknown
		//IL_035e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0365: Expected O, but got Unknown
		//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0414: Unknown result type (might be due to invalid IL or missing references)
		//IL_041b: Expected O, but got Unknown
		//IL_045e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0463: Unknown result type (might be due to invalid IL or missing references)
		//IL_046f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0478: Expected O, but got Unknown
		//IL_047a: Unknown result type (might be due to invalid IL or missing references)
		//IL_047f: Unknown result type (might be due to invalid IL or missing references)
		//IL_048b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0495: Expected O, but got Unknown
		//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b0: Expected O, but got Unknown
		//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d8: Expected O, but got Unknown
		//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_04eb: Expected O, but got Unknown
		//IL_05a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d7: Expected O, but got Unknown
		//IL_05de: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e8: Expected O, but got Unknown
		//IL_05e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0606: Unknown result type (might be due to invalid IL or missing references)
		//IL_0610: Expected O, but got Unknown
		//IL_061c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0623: Expected O, but got Unknown
		//IL_0708: Unknown result type (might be due to invalid IL or missing references)
		//IL_070d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0719: Unknown result type (might be due to invalid IL or missing references)
		//IL_0725: Unknown result type (might be due to invalid IL or missing references)
		//IL_072f: Expected O, but got Unknown
		//IL_073b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0742: Expected O, but got Unknown
		//IL_0833: Unknown result type (might be due to invalid IL or missing references)
		//IL_0838: Unknown result type (might be due to invalid IL or missing references)
		//IL_0844: Unknown result type (might be due to invalid IL or missing references)
		//IL_0850: Unknown result type (might be due to invalid IL or missing references)
		//IL_085a: Expected O, but got Unknown
		//IL_0866: Unknown result type (might be due to invalid IL or missing references)
		//IL_086d: Expected O, but got Unknown
		//IL_0922: Unknown result type (might be due to invalid IL or missing references)
		//IL_0929: Expected O, but got Unknown
		//IL_0963: Unknown result type (might be due to invalid IL or missing references)
		//IL_0968: Unknown result type (might be due to invalid IL or missing references)
		//IL_0974: Unknown result type (might be due to invalid IL or missing references)
		//IL_097d: Expected O, but got Unknown
		//IL_097f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0984: Unknown result type (might be due to invalid IL or missing references)
		//IL_0990: Unknown result type (might be due to invalid IL or missing references)
		//IL_0999: Expected O, but got Unknown
		//IL_099b: Unknown result type (might be due to invalid IL or missing references)
		//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_09ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_09b5: Expected O, but got Unknown
		//IL_09c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d0: Expected O, but got Unknown
		//IL_09d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_09e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_09ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_09f8: Expected O, but got Unknown
		//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a0b: Expected O, but got Unknown
		//IL_0af0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0af5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b01: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b17: Expected O, but got Unknown
		//IL_0b23: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b2a: Expected O, but got Unknown
		//IL_0c19: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c1e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c2a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c3b: Expected O, but got Unknown
		//IL_0c36: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c3d: Expected O, but got Unknown
		//IL_0c98: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d20: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d27: Expected O, but got Unknown
		//IL_0d54: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d59: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d65: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d6e: Expected O, but got Unknown
		//IL_0d70: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d75: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d81: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d8a: Expected O, but got Unknown
		//IL_0d8c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d91: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d9d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0da6: Expected O, but got Unknown
		//IL_0dae: Unknown result type (might be due to invalid IL or missing references)
		//IL_0db8: Expected O, but got Unknown
		//IL_0dc3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dd4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0de5: Expected O, but got Unknown
		//IL_0de0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0de7: Expected O, but got Unknown
		//IL_0e42: Unknown result type (might be due to invalid IL or missing references)
		//IL_0eca: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ed1: Expected O, but got Unknown
		//IL_0efe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f03: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f0f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f18: Expected O, but got Unknown
		//IL_0f1a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f1f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f2b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f34: Expected O, but got Unknown
		//IL_0f36: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f3b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f47: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f50: Expected O, but got Unknown
		//IL_0f58: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f62: Expected O, but got Unknown
		//IL_0f6d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f72: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f7e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f8f: Expected O, but got Unknown
		//IL_0f8a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f91: Expected O, but got Unknown
		//IL_0fec: Unknown result type (might be due to invalid IL or missing references)
		//IL_1074: Unknown result type (might be due to invalid IL or missing references)
		//IL_107b: Expected O, but got Unknown
		//IL_10a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_10ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_10b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_10c2: Expected O, but got Unknown
		//IL_10c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_10c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_10d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_10de: Expected O, but got Unknown
		//IL_10e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_10e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_10f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_10fa: Expected O, but got Unknown
		//IL_1102: Unknown result type (might be due to invalid IL or missing references)
		//IL_110c: Expected O, but got Unknown
		//IL_1117: Unknown result type (might be due to invalid IL or missing references)
		//IL_111c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1128: Unknown result type (might be due to invalid IL or missing references)
		//IL_1139: Expected O, but got Unknown
		//IL_1134: Unknown result type (might be due to invalid IL or missing references)
		//IL_113b: Expected O, but got Unknown
		//IL_1196: Unknown result type (might be due to invalid IL or missing references)
		//IL_121e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1225: Expected O, but got Unknown
		//IL_1252: Unknown result type (might be due to invalid IL or missing references)
		//IL_1257: Unknown result type (might be due to invalid IL or missing references)
		//IL_1263: Unknown result type (might be due to invalid IL or missing references)
		//IL_126c: Expected O, but got Unknown
		//IL_126e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1273: Unknown result type (might be due to invalid IL or missing references)
		//IL_127f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1288: Expected O, but got Unknown
		//IL_128a: Unknown result type (might be due to invalid IL or missing references)
		//IL_128f: Unknown result type (might be due to invalid IL or missing references)
		//IL_129b: Unknown result type (might be due to invalid IL or missing references)
		//IL_12a4: Expected O, but got Unknown
		//IL_12ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_12b6: Expected O, but got Unknown
		//IL_12c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_12c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_12d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_12e3: Expected O, but got Unknown
		//IL_12de: Unknown result type (might be due to invalid IL or missing references)
		//IL_12e5: Expected O, but got Unknown
		//IL_1308: Unknown result type (might be due to invalid IL or missing references)
		//IL_132a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1331: Expected O, but got Unknown
		//IL_135e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1363: Unknown result type (might be due to invalid IL or missing references)
		//IL_136f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1378: Expected O, but got Unknown
		//IL_137a: Unknown result type (might be due to invalid IL or missing references)
		//IL_137f: Unknown result type (might be due to invalid IL or missing references)
		//IL_138b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1394: Expected O, but got Unknown
		//IL_139c: Unknown result type (might be due to invalid IL or missing references)
		//IL_13a6: Expected O, but got Unknown
		//IL_13ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_13b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_13bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_13ce: Expected O, but got Unknown
		//IL_13c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_13d3: Expected O, but got Unknown
		//IL_13d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_13de: Unknown result type (might be due to invalid IL or missing references)
		//IL_13ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_13fb: Expected O, but got Unknown
		//IL_13f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_1400: Expected O, but got Unknown
		//IL_1406: Unknown result type (might be due to invalid IL or missing references)
		//IL_140b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1417: Unknown result type (might be due to invalid IL or missing references)
		//IL_1428: Expected O, but got Unknown
		//IL_1423: Unknown result type (might be due to invalid IL or missing references)
		//IL_142d: Expected O, but got Unknown
		//IL_1433: Unknown result type (might be due to invalid IL or missing references)
		//IL_1438: Unknown result type (might be due to invalid IL or missing references)
		//IL_1444: Unknown result type (might be due to invalid IL or missing references)
		//IL_1455: Expected O, but got Unknown
		//IL_1450: Unknown result type (might be due to invalid IL or missing references)
		//IL_145a: Expected O, but got Unknown
		//IL_145b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1460: Unknown result type (might be due to invalid IL or missing references)
		//IL_146c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1478: Unknown result type (might be due to invalid IL or missing references)
		//IL_1482: Expected O, but got Unknown
		//IL_148e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1495: Expected O, but got Unknown
		//IL_14a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_14a9: Expected O, but got Unknown
		//IL_14e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_14e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_14f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_14fd: Expected O, but got Unknown
		//IL_14ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_1504: Unknown result type (might be due to invalid IL or missing references)
		//IL_1510: Unknown result type (might be due to invalid IL or missing references)
		//IL_1519: Expected O, but got Unknown
		//IL_152a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1534: Expected O, but got Unknown
		//IL_1586: Unknown result type (might be due to invalid IL or missing references)
		//IL_16af: Unknown result type (might be due to invalid IL or missing references)
		//IL_16b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_16c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_16cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_16d6: Expected O, but got Unknown
		//IL_16e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_16e9: Expected O, but got Unknown
		//IL_1774: Unknown result type (might be due to invalid IL or missing references)
		//IL_17eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_17f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_17fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_1808: Unknown result type (might be due to invalid IL or missing references)
		//IL_1812: Expected O, but got Unknown
		//IL_181e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1825: Expected O, but got Unknown
		//IL_1747: Unknown result type (might be due to invalid IL or missing references)
		//IL_1751: Unknown result type (might be due to invalid IL or missing references)
		//IL_1631: Unknown result type (might be due to invalid IL or missing references)
		//IL_164d: Unknown result type (might be due to invalid IL or missing references)
		//IL_198b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1681: Unknown result type (might be due to invalid IL or missing references)
		//IL_168b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a38: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a3d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a49: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a55: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a5f: Expected O, but got Unknown
		//IL_1a6b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a72: Expected O, but got Unknown
		//IL_1bd8: Unknown result type (might be due to invalid IL or missing references)
		//IL_18c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_18e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_1c93: Unknown result type (might be due to invalid IL or missing references)
		//IL_1c98: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ca4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1cb0: Unknown result type (might be due to invalid IL or missing references)
		//IL_1cba: Expected O, but got Unknown
		//IL_1cc6: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ccd: Expected O, but got Unknown
		//IL_1914: Unknown result type (might be due to invalid IL or missing references)
		//IL_191e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b11: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b2d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d39: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d43: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b61: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b6b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e21: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e35: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e3c: Expected O, but got Unknown
		//IL_1e76: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e7b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e87: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e90: Expected O, but got Unknown
		//IL_1e92: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e97: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ea3: Unknown result type (might be due to invalid IL or missing references)
		//IL_1eac: Expected O, but got Unknown
		//IL_1eae: Unknown result type (might be due to invalid IL or missing references)
		//IL_1eb3: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ebf: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ec8: Expected O, but got Unknown
		//IL_1ed9: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ee3: Expected O, but got Unknown
		//IL_1ee4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ee9: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ef5: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f01: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f0b: Expected O, but got Unknown
		//IL_1f17: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f1e: Expected O, but got Unknown
		//IL_200e: Unknown result type (might be due to invalid IL or missing references)
		//IL_2015: Expected O, but got Unknown
		//IL_204f: Unknown result type (might be due to invalid IL or missing references)
		//IL_2054: Unknown result type (might be due to invalid IL or missing references)
		//IL_2060: Unknown result type (might be due to invalid IL or missing references)
		//IL_2069: Expected O, but got Unknown
		//IL_206b: Unknown result type (might be due to invalid IL or missing references)
		//IL_2070: Unknown result type (might be due to invalid IL or missing references)
		//IL_207c: Unknown result type (might be due to invalid IL or missing references)
		//IL_2085: Expected O, but got Unknown
		//IL_2087: Unknown result type (might be due to invalid IL or missing references)
		//IL_208c: Unknown result type (might be due to invalid IL or missing references)
		//IL_2098: Unknown result type (might be due to invalid IL or missing references)
		//IL_20a1: Expected O, but got Unknown
		//IL_20b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_20bc: Expected O, but got Unknown
		//IL_20bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_20c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_20ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_20da: Unknown result type (might be due to invalid IL or missing references)
		//IL_20e4: Expected O, but got Unknown
		//IL_20f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_20f7: Expected O, but got Unknown
		//IL_1f8a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f94: Unknown result type (might be due to invalid IL or missing references)
		//IL_2231: Unknown result type (might be due to invalid IL or missing references)
		//IL_2238: Expected O, but got Unknown
		//IL_2272: Unknown result type (might be due to invalid IL or missing references)
		//IL_2277: Unknown result type (might be due to invalid IL or missing references)
		//IL_2283: Unknown result type (might be due to invalid IL or missing references)
		//IL_228c: Expected O, but got Unknown
		//IL_228e: Unknown result type (might be due to invalid IL or missing references)
		//IL_2293: Unknown result type (might be due to invalid IL or missing references)
		//IL_229f: Unknown result type (might be due to invalid IL or missing references)
		//IL_22a8: Expected O, but got Unknown
		//IL_22aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_22af: Unknown result type (might be due to invalid IL or missing references)
		//IL_22bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_22c4: Expected O, but got Unknown
		//IL_22d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_22df: Expected O, but got Unknown
		//IL_217e: Unknown result type (might be due to invalid IL or missing references)
		//IL_2188: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)_bundle == (Object)null)
		{
			Logger.LogError((object)"[LoxMilkMod] assetbundle not found.");
			return;
		}
		ItemConfig val = new ItemConfig
		{
			Name = "Lox milk",
			Description = "Fresh milk from a lox.",
			Enabled = true
		};
		CustomItem val2 = new CustomItem("LoxMilkItem", "QueensJam", val);
		ItemManager.Instance.AddItem(val2);
		EnableServingTray(val2.ItemDrop);
		SharedData shared = val2.ItemDrop.m_itemData.m_shared;
		shared.m_itemType = (ItemType)2;
		shared.m_maxStackSize = 20;
		shared.m_food = 10f;
		shared.m_foodStamina = 80f;
		shared.m_foodBurnTime = 1800f;
		shared.m_foodRegen = 1f;
		if ((Object)(object)_iconLoxMilk != (Object)null)
		{
			shared.m_icons = (Sprite[])(object)new Sprite[1] { _iconLoxMilk };
		}
		if ((Object)(object)_milkBottleModel != (Object)null)
		{
			OverrideDropModel(((Component)val2.ItemDrop).gameObject, _milkBottleModel);
			FixDropScale(((Component)val2.ItemDrop).gameObject, 1.1f);
			FixDropCollider(((Component)val2.ItemDrop).gameObject, 0.25f);
		}
		ItemConfig val3 = new ItemConfig
		{
			Name = "Lox milk soup",
			Description = "Creamy soup made with lox milk.",
			Enabled = true
		};
		CustomItem val4 = new CustomItem("LoxMilkSoup", "TurnipStew", val3);
		ItemManager.Instance.AddItem(val4);
		EnableServingTray(val4.ItemDrop);
		if ((Object)(object)_soupModel != (Object)null)
		{
			OverrideDropModel(((Component)val4.ItemDrop).gameObject, _soupModel);
			FixDropScale(((Component)val4.ItemDrop).gameObject, 1.3f);
		}
		SharedData shared2 = val4.ItemDrop.m_itemData.m_shared;
		shared2.m_food = 40f;
		shared2.m_foodStamina = 75f;
		shared2.m_foodBurnTime = 2100f;
		shared2.m_foodRegen = 2f;
		if ((Object)(object)_iconMilkSoup != (Object)null)
		{
			shared2.m_icons = (Sprite[])(object)new Sprite[1] { _iconMilkSoup };
		}
		RecipeConfig val5 = new RecipeConfig();
		val5.Name = "Recipe_LoxMilkSoup";
		val5.Item = "LoxMilkSoup";
		val5.Amount = 1;
		val5.CraftingStation = "piece_cauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[4]
		{
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "BarleyFlour",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "ChickenEgg",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "Honey",
				Amount = 1
			}
		};
		RecipeConfig val6 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val6));
		FixDropCollider(((Component)val4.ItemDrop).gameObject, 0.3f);
		ItemConfig val7 = new ItemConfig
		{
			Name = "Milk bread dough",
			Description = "Dough for fluffy bread made with lox milk.",
			Enabled = true
		};
		CustomItem val8 = new CustomItem("LoxMilkBreadDough", "BreadDough", val7);
		ItemManager.Instance.AddItem(val8);
		if ((Object)(object)_breadDoughModel != (Object)null)
		{
			OverrideDropModel(((Component)val8.ItemDrop).gameObject, _breadDoughModel);
		}
		SharedData shared3 = val8.ItemDrop.m_itemData.m_shared;
		shared3.m_itemType = (ItemType)1;
		shared3.m_food = 0f;
		shared3.m_foodStamina = 0f;
		shared3.m_foodBurnTime = 0f;
		shared3.m_foodRegen = 0f;
		if ((Object)(object)_iconMilkBreadDough != (Object)null)
		{
			shared3.m_icons = (Sprite[])(object)new Sprite[1] { _iconMilkBreadDough };
		}
		val5 = new RecipeConfig();
		val5.Name = "Recipe_LoxMilkBreadDough";
		val5.Item = "LoxMilkBreadDough";
		val5.Amount = 1;
		val5.CraftingStation = "piece_preptable";
		val5.MinStationLevel = 1;
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "BarleyFlour",
				Amount = 10
			}
		};
		RecipeConfig val9 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val9));
		ItemConfig val10 = new ItemConfig
		{
			Name = "Milk bread",
			Description = "Soft and fluffy milk bread.",
			Enabled = true
		};
		CustomItem val11 = new CustomItem("LoxMilkBread", "Bread", val10);
		ItemManager.Instance.AddItem(val11);
		EnableServingTray(val11.ItemDrop);
		if ((Object)(object)_breadModel != (Object)null)
		{
			OverrideDropModel(((Component)val11.ItemDrop).gameObject, _breadModel);
		}
		SharedData shared4 = val11.ItemDrop.m_itemData.m_shared;
		shared4.m_food = 25f;
		shared4.m_foodStamina = 60f;
		shared4.m_foodBurnTime = 1200f;
		shared4.m_foodRegen = 3f;
		if ((Object)(object)_iconMilkBread != (Object)null)
		{
			shared4.m_icons = (Sprite[])(object)new Sprite[1] { _iconMilkBread };
		}
		CookingConversionConfig val12 = new CookingConversionConfig
		{
			FromItem = "LoxMilkBreadDough",
			ToItem = "LoxMilkBread",
			Station = "piece_oven",
			CookTime = 40f
		};
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val12));
		ItemConfig val13 = new ItemConfig
		{
			Name = "Gouda cheese",
			Description = "Cheese made from lox milk. Consuming it applies the Stuffed effect, extending the duration of previously eaten foods (except cheeses) by 10 minutes.",
			Enabled = true
		};
		CustomItem val14 = new CustomItem("GoudaCheese", "TurnipStew", val13);
		ItemManager.Instance.AddItem(val14);
		EnableServingTray(val14.ItemDrop);
		if ((Object)(object)_goudaModel != (Object)null)
		{
			OverrideDropModel(((Component)val14.ItemDrop).gameObject, _goudaModel);
			FixDropScale(((Component)val14.ItemDrop).gameObject, 1.3f);
		}
		SharedData shared5 = val14.ItemDrop.m_itemData.m_shared;
		shared5.m_food = 60f;
		shared5.m_foodStamina = 20f;
		shared5.m_foodBurnTime = 900f;
		shared5.m_foodRegen = 2f;
		if ((Object)(object)_iconGouda != (Object)null)
		{
			shared5.m_icons = (Sprite[])(object)new Sprite[1] { _iconGouda };
		}
		FixDropCollider(((Component)val14.ItemDrop).gameObject, 0.18f);
		ItemConfig val15 = new ItemConfig
		{
			Name = "Blue cheese",
			Description = "Cheese made from lox milk. Consuming it applies the Stuffed effect, extending the duration of previously eaten foods (except cheeses) by 15 minutes.",
			Enabled = true
		};
		CustomItem val16 = new CustomItem("LazurCheese", "TurnipStew", val15);
		ItemManager.Instance.AddItem(val16);
		EnableServingTray(val16.ItemDrop);
		if ((Object)(object)_lazurModel != (Object)null)
		{
			OverrideDropModel(((Component)val16.ItemDrop).gameObject, _lazurModel);
			FixDropScale(((Component)val16.ItemDrop).gameObject, 1.3f);
		}
		SharedData shared6 = val16.ItemDrop.m_itemData.m_shared;
		shared6.m_food = 13f;
		shared6.m_foodStamina = 13f;
		shared6.m_foodBurnTime = 600f;
		shared6.m_foodRegen = 2f;
		shared6.m_foodEitr = 90f;
		if ((Object)(object)_iconLazur != (Object)null)
		{
			shared6.m_icons = (Sprite[])(object)new Sprite[1] { _iconLazur };
		}
		FixDropCollider(((Component)val16.ItemDrop).gameObject, 0.18f);
		ItemConfig val17 = new ItemConfig
		{
			Name = "Nordic cheesecake",
			Description = "A sweet cheesecake made from lox milk.",
			Enabled = true
		};
		CustomItem val18 = new CustomItem("SernikItem", "LoxPie", val17);
		ItemManager.Instance.AddItem(val18);
		EnableServingTray(val18.ItemDrop);
		if ((Object)(object)_sernikModel != (Object)null)
		{
			OverrideDropModel(((Component)val18.ItemDrop).gameObject, _sernikModel);
		}
		SharedData shared7 = val18.ItemDrop.m_itemData.m_shared;
		shared7.m_food = 48f;
		shared7.m_foodStamina = 48f;
		shared7.m_foodBurnTime = 1500f;
		shared7.m_foodRegen = 3f;
		if ((Object)(object)_iconCheeseCake != (Object)null)
		{
			shared7.m_icons = (Sprite[])(object)new Sprite[1] { _iconCheeseCake };
		}
		val5 = new RecipeConfig();
		val5.Name = "Recipe_SernikItem";
		val5.Item = "SernikItem";
		val5.Amount = 1;
		val5.CraftingStation = "piece_cauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "Cloudberry",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "ChickenEgg",
				Amount = 2
			}
		};
		RecipeConfig val19 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val19));
		ItemConfig val20 = new ItemConfig
		{
			Name = "Melted cheese",
			Description = "Cheese made from lox milk. Consuming it applies the Stuffed effect, extending the duration of previously eaten foods (except cheeses) by 20 minutes.",
			Enabled = true
		};
		CustomItem val21 = new CustomItem("SerTopionyItem", "TurnipStew", val20);
		ItemManager.Instance.AddItem(val21);
		EnableServingTray(val21.ItemDrop);
		if ((Object)(object)_meltCheeseModel != (Object)null)
		{
			OverrideDropModel(((Component)val21.ItemDrop).gameObject, _meltCheeseModel);
			FixDropScale(((Component)val21.ItemDrop).gameObject, 1.5f);
			FixDropCollider(((Component)val21.ItemDrop).gameObject, 0.25f);
		}
		SharedData shared8 = val21.ItemDrop.m_itemData.m_shared;
		shared8.m_food = 80f;
		shared8.m_foodStamina = 35f;
		shared8.m_foodBurnTime = 1800f;
		shared8.m_foodRegen = 4f;
		if ((Object)(object)_iconMeltCheese != (Object)null)
		{
			shared8.m_icons = (Sprite[])(object)new Sprite[1] { _iconMeltCheese };
		}
		ItemConfig val22 = new ItemConfig
		{
			Name = "White cheese",
			Description = "Cheese made from lox milk. Consuming it applies the Stuffed effect, extending the duration of previously eaten foods (except cheeses) by 5 minutes.",
			Enabled = true
		};
		CustomItem val23 = new CustomItem("TwarogItem", "TurnipStew", val22);
		ItemManager.Instance.AddItem(val23);
		EnableServingTray(val23.ItemDrop);
		if ((Object)(object)_twarogModel != (Object)null)
		{
			OverrideDropModel(((Component)val23.ItemDrop).gameObject, _twarogModel);
			FixDropScale(((Component)val23.ItemDrop).gameObject, 0.8f);
			FixDropCollider(((Component)val23.ItemDrop).gameObject, 0.25f);
		}
		SharedData shared9 = val23.ItemDrop.m_itemData.m_shared;
		shared9.m_food = 20f;
		shared9.m_foodStamina = 60f;
		shared9.m_foodBurnTime = 600f;
		shared9.m_foodRegen = 2f;
		if ((Object)(object)_iconWhiteCheese != (Object)null)
		{
			shared9.m_icons = (Sprite[])(object)new Sprite[1] { _iconWhiteCheese };
		}
		CustomItem val24 = new CustomItem("CheeseBase_Twarog", "MeadBaseHealthMedium", new ItemConfig
		{
			Name = "Cheese base: White cheese",
			Description = "Requires fermentation in a cheese maker."
		});
		ItemManager.Instance.AddItem(val24);
		SharedData shared10 = val24.ItemDrop.m_itemData.m_shared;
		shared10.m_consumeStatusEffect = null;
		shared10.m_food = 0f;
		shared10.m_foodStamina = 0f;
		shared10.m_foodBurnTime = 0f;
		shared10.m_foodRegen = 0f;
		shared10.m_itemType = (ItemType)1;
		shared10.m_description = "Requires fermentation in a cheese maker.";
		if ((Object)(object)_iconbasetwarog != (Object)null)
		{
			shared10.m_icons = (Sprite[])(object)new Sprite[1] { _iconbasetwarog };
		}
		if ((Object)(object)_basetwarogModel != (Object)null)
		{
			ReplaceDropVisual(((Component)val24.ItemDrop).gameObject, _basetwarogModel, 1f);
			FixDropCollider(((Component)val24.ItemDrop).gameObject, 0.2f);
		}
		ItemManager instance = ItemManager.Instance;
		val5 = new RecipeConfig();
		val5.Item = "CheeseBase_Twarog";
		val5.Amount = 1;
		val5.CraftingStation = "piece_MeadCauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "RennetItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "Onion",
				Amount = 1
			}
		};
		instance.AddRecipe(new CustomRecipe(val5));
		CustomItem val25 = new CustomItem("CheeseBase_SerTopiony", "MeadBaseHealthMedium", new ItemConfig
		{
			Name = "Cheese base: Melted cheese",
			Description = "Requires fermentation in a cheese maker."
		});
		ItemManager.Instance.AddItem(val25);
		SharedData shared11 = val25.ItemDrop.m_itemData.m_shared;
		shared11.m_consumeStatusEffect = null;
		shared11.m_food = 0f;
		shared11.m_foodStamina = 0f;
		shared11.m_foodBurnTime = 0f;
		shared11.m_foodRegen = 0f;
		shared11.m_itemType = (ItemType)1;
		shared11.m_description = "Requires fermentation in a cheese maker.";
		if ((Object)(object)_iconbasemelt != (Object)null)
		{
			shared11.m_icons = (Sprite[])(object)new Sprite[1] { _iconbasemelt };
		}
		if ((Object)(object)_basemeltModel != (Object)null)
		{
			ReplaceDropVisual(((Component)val25.ItemDrop).gameObject, _basemeltModel, 1f);
			FixDropCollider(((Component)val25.ItemDrop).gameObject, 0.2f);
		}
		ItemManager instance2 = ItemManager.Instance;
		val5 = new RecipeConfig();
		val5.Item = "CheeseBase_SerTopiony";
		val5.Amount = 1;
		val5.CraftingStation = "piece_MeadCauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "RennetItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "SpiceMistlands",
				Amount = 1
			}
		};
		instance2.AddRecipe(new CustomRecipe(val5));
		CustomItem val26 = new CustomItem("CheeseBase_Gouda", "MeadBaseHealthMedium", new ItemConfig
		{
			Name = "Cheese base: Gouda cheese",
			Description = "Requires fermentation in a cheese maker."
		});
		ItemManager.Instance.AddItem(val26);
		SharedData shared12 = val26.ItemDrop.m_itemData.m_shared;
		shared12.m_consumeStatusEffect = null;
		shared12.m_food = 0f;
		shared12.m_foodStamina = 0f;
		shared12.m_foodBurnTime = 0f;
		shared12.m_foodRegen = 0f;
		shared12.m_itemType = (ItemType)1;
		shared12.m_description = "Requires fermentation in a cheese maker.";
		if ((Object)(object)_iconbasegouda != (Object)null)
		{
			shared12.m_icons = (Sprite[])(object)new Sprite[1] { _iconbasegouda };
		}
		if ((Object)(object)_basegoudaModel != (Object)null)
		{
			ReplaceDropVisual(((Component)val26.ItemDrop).gameObject, _basegoudaModel, 1f);
			FixDropCollider(((Component)val26.ItemDrop).gameObject, 0.2f);
		}
		ItemManager instance3 = ItemManager.Instance;
		val5 = new RecipeConfig();
		val5.Item = "CheeseBase_Gouda";
		val5.Amount = 1;
		val5.CraftingStation = "piece_MeadCauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "RennetItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "FragrantBundle",
				Amount = 1
			}
		};
		instance3.AddRecipe(new CustomRecipe(val5));
		CustomItem val27 = new CustomItem("CheeseBase_Lazur", "MeadBaseHealthMedium", new ItemConfig
		{
			Name = "Cheese base: Blue cheese",
			Description = "Requires fermentation in a cheese maker."
		});
		ItemManager.Instance.AddItem(val27);
		SharedData shared13 = val27.ItemDrop.m_itemData.m_shared;
		shared13.m_consumeStatusEffect = null;
		shared13.m_food = 0f;
		shared13.m_foodStamina = 0f;
		shared13.m_foodBurnTime = 0f;
		shared13.m_foodRegen = 0f;
		shared13.m_itemType = (ItemType)1;
		shared13.m_description = "Requires fermentation in a cheese maker.";
		if ((Object)(object)_iconbaselazur != (Object)null)
		{
			shared13.m_icons = (Sprite[])(object)new Sprite[1] { _iconbaselazur };
		}
		if ((Object)(object)_baselazurModel != (Object)null)
		{
			ReplaceDropVisual(((Component)val27.ItemDrop).gameObject, _baselazurModel, 1f);
			FixDropCollider(((Component)val27.ItemDrop).gameObject, 0.25f);
		}
		ItemManager instance4 = ItemManager.Instance;
		val5 = new RecipeConfig();
		val5.Item = "CheeseBase_Lazur";
		val5.Amount = 1;
		val5.CraftingStation = "piece_MeadCauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "RennetItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "MushroomMagecap",
				Amount = 1
			}
		};
		instance4.AddRecipe(new CustomRecipe(val5));
		CustomItem val28 = new CustomItem("CheeseBase_Skyr", "MeadBaseHealthMedium", new ItemConfig
		{
			Name = "    Fermentation base: Skyr",
			Description = "Base used to produce skyr."
		});
		ItemManager.Instance.AddItem(val28);
		SharedData shared14 = val28.ItemDrop.m_itemData.m_shared;
		shared14.m_itemType = (ItemType)1;
		shared14.m_food = 0f;
		shared14.m_foodStamina = 0f;
		ItemManager instance5 = ItemManager.Instance;
		val5 = new RecipeConfig();
		val5.Item = "CheeseBase_Skyr";
		val5.Amount = 1;
		val5.CraftingStation = "piece_MeadCauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "LoxMilkItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "Honey",
				Amount = 2
			}
		};
		instance5.AddRecipe(new CustomRecipe(val5));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Twarog",
			ToItem = "TwarogItem"
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_SerTopiony",
			ToItem = "SerTopionyItem"
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Gouda",
			ToItem = "GoudaCheese"
		}));
		ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)new FermenterConversionConfig
		{
			FromItem = "CheeseBase_Lazur",
			ToItem = "LazurCheese"
		}));
		ItemConfig val29 = new ItemConfig
		{
			Name = "Rennet",
			Description = "Special ingredient used in cheese making.",
			Enabled = true
		};
		CustomItem val30 = new CustomItem("RennetItem", "Amber", val29);
		ItemManager.Instance.AddItem(val30);
		val5 = new RecipeConfig();
		val5.Name = "Recipe_RennetItem";
		val5.Item = "RennetItem";
		val5.Amount = 1;
		val5.CraftingStation = "piece_preptable";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
		{
			new RequirementConfig
			{
				Item = "RottenMeat",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "LeatherScraps",
				Amount = 1
			}
		};
		RecipeConfig val31 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val31));
		Logger.LogInfo((object)"[LoxMilkMod] rennet recepie added.");
		Logger.LogInfo((object)"[LoxMilkMod] rennet added to Haldor shop (TraderManager).");
		ItemDrop itemDrop = val30.ItemDrop;
		if ((Object)(object)itemDrop == (Object)null)
		{
			Logger.LogError((object)"[LoxMilkMod] RennetItem null ItemDrop.");
		}
		else
		{
			SharedData shared15 = itemDrop.m_itemData.m_shared;
			shared15.m_itemType = (ItemType)1;
			if ((Object)(object)_iconRennet != (Object)null)
			{
				shared15.m_icons = (Sprite[])(object)new Sprite[1] { _iconRennet };
			}
			if ((Object)(object)_rennetModel != (Object)null)
			{
				OverrideDropModel(((Component)itemDrop).gameObject, _rennetModel);
				GameObject gameObject = ((Component)itemDrop).gameObject;
				Collider[] componentsInChildren = gameObject.GetComponentsInChildren<Collider>(true);
				foreach (Collider val32 in componentsInChildren)
				{
					Object.Destroy((Object)(object)val32);
				}
				BoxCollider val33 = gameObject.AddComponent<BoxCollider>();
				val33.size = new Vector3(0.35f, 0.25f, 0.35f);
				val33.center = new Vector3(0f, 0.12f, 0f);
				((Collider)val33).isTrigger = false;
				MeshFilter componentInChildren = gameObject.GetComponentInChildren<MeshFilter>(true);
				if ((Object)(object)componentInChildren != (Object)null)
				{
					((Component)componentInChildren).transform.localScale = Vector3.one * 1.5f;
				}
			}
			else
			{
				Logger.LogWarning((object)"[LoxMilkMod] _rennetModel == null – model Amber.");
			}
		}
		CreateMobileWorkbenchCart();
		ItemConfig val34 = new ItemConfig
		{
			Name = "Butter",
			Description = "Butter churned from lox milk.",
			Enabled = true
		};
		CustomItem val35 = new CustomItem("ButterItem", "Amber", val34);
		ItemManager.Instance.AddItem(val35);
		if ((Object)(object)_butterModel != (Object)null)
		{
			OverrideDropModel(((Component)val35.ItemDrop).gameObject, _butterModel);
			MeshFilter componentInChildren2 = ((Component)val35.ItemDrop).GetComponentInChildren<MeshFilter>(true);
			if ((Object)(object)componentInChildren2 != (Object)null)
			{
				((Component)componentInChildren2).transform.localScale = Vector3.one * 2f;
			}
		}
		SharedData shared16 = val35.ItemDrop.m_itemData.m_shared;
		shared16.m_itemType = (ItemType)1;
		shared16.m_food = 0f;
		shared16.m_foodStamina = 0f;
		shared16.m_foodBurnTime = 0f;
		shared16.m_foodRegen = 0f;
		if ((Object)(object)_iconButter != (Object)null)
		{
			shared16.m_icons = (Sprite[])(object)new Sprite[1] { _iconButter };
		}
		FixDropCollider(((Component)val35.ItemDrop).gameObject, 0.18f);
		ItemConfig val36 = new ItemConfig
		{
			Name = "Buttermilk",
			Description = "Refreshing buttermilk from lox milk. Good for your bones.",
			Enabled = true
		};
		CustomItem val37 = new CustomItem("ButtermilkItem", "QueensJam", val36);
		ItemManager.Instance.AddItem(val37);
		EnableServingTray(val37.ItemDrop);
		if ((Object)(object)_buttermilkModel != (Object)null)
		{
			OverrideDropModel(((Component)val37.ItemDrop).gameObject, _buttermilkModel);
			GameObject gameObject2 = ((Component)val37.ItemDrop).gameObject;
			Collider[] componentsInChildren2 = gameObject2.GetComponentsInChildren<Collider>(true);
			foreach (Collider val38 in componentsInChildren2)
			{
				Object.Destroy((Object)(object)val38);
			}
			BoxCollider val39 = gameObject2.AddComponent<BoxCollider>();
			val39.size = new Vector3(0.35f, 0.55f, 0.35f);
			val39.center = new Vector3(0f, 0.28f, 0f);
			((Collider)val39).isTrigger = false;
			MeshFilter componentInChildren3 = gameObject2.GetComponentInChildren<MeshFilter>(true);
			if ((Object)(object)componentInChildren3 != (Object)null)
			{
				((Component)componentInChildren3).transform.localScale = Vector3.one * 0.95f;
			}
			Rigidbody component = gameObject2.GetComponent<Rigidbody>();
			if ((Object)(object)component != (Object)null)
			{
				component.mass = 5f;
				component.drag = 5f;
				component.angularDrag = 999f;
				component.constraints = (RigidbodyConstraints)112;
			}
		}
		SharedData shared17 = val37.ItemDrop.m_itemData.m_shared;
		shared17.m_itemType = (ItemType)2;
		shared17.m_food = 0f;
		shared17.m_foodStamina = 0f;
		shared17.m_foodBurnTime = 0f;
		shared17.m_foodRegen = 0f;
		if ((Object)(object)_iconButterMilk != (Object)null)
		{
			shared17.m_icons = (Sprite[])(object)new Sprite[1] { _iconButterMilk };
		}
		SE_StrongBones sE_StrongBones = ScriptableObject.CreateInstance<SE_StrongBones>();
		((Object)sE_StrongBones).name = "SE_StrongBones";
		((StatusEffect)sE_StrongBones).m_name = "Strong bones";
		((StatusEffect)sE_StrongBones).m_tooltip = "You take 50% less fall damage.";
		((StatusEffect)sE_StrongBones).m_ttl = 600f;
		((StatusEffect)sE_StrongBones).m_icon = _iconButterMilk;
		shared17.m_consumeStatusEffect = (StatusEffect)(object)sE_StrongBones;
		ItemConfig val40 = new ItemConfig
		{
			Name = "Skyr",
			Description = "Tastes like home...",
			Enabled = true
		};
		CustomItem val41 = new CustomItem("skyrItem", "QueensJam", val40);
		ItemManager.Instance.AddItem(val41);
		EnableServingTray(val41.ItemDrop);
		if ((Object)(object)_skyrModel != (Object)null)
		{
			OverrideDropModel(((Component)val41.ItemDrop).gameObject, _skyrModel);
			GameObject gameObject3 = ((Component)val41.ItemDrop).gameObject;
			Collider[] componentsInChildren3 = gameObject3.GetComponentsInChildren<Collider>(true);
			foreach (Collider val42 in componentsInChildren3)
			{
				Object.Destroy((Object)(object)val42);
			}
			BoxCollider val43 = gameObject3.AddComponent<BoxCollider>();
			val43.size = new Vector3(0.35f, 0.55f, 0.35f);
			val43.center = new Vector3(0f, 0.28f, 0f);
			((Collider)val43).isTrigger = false;
			MeshFilter componentInChildren4 = gameObject3.GetComponentInChildren<MeshFilter>(true);
			if ((Object)(object)componentInChildren4 != (Object)null)
			{
				((Component)componentInChildren4).transform.localScale = Vector3.one * 1.2f;
			}
			Rigidbody component2 = gameObject3.GetComponent<Rigidbody>();
			if ((Object)(object)component2 != (Object)null)
			{
				component2.mass = 5f;
				component2.drag = 5f;
				component2.angularDrag = 999f;
				component2.constraints = (RigidbodyConstraints)112;
			}
		}
		SharedData shared18 = val41.ItemDrop.m_itemData.m_shared;
		shared18.m_itemType = (ItemType)2;
		shared18.m_food = 0f;
		shared18.m_foodStamina = 0f;
		shared18.m_foodBurnTime = 0f;
		shared18.m_foodRegen = 0f;
		if ((Object)(object)_iconSkyr != (Object)null)
		{
			shared18.m_icons = (Sprite[])(object)new Sprite[1] { _iconSkyr };
		}
		SE_Skyr sE_Skyr = ScriptableObject.CreateInstance<SE_Skyr>();
		((Object)sE_Skyr).name = "SE_Skyr";
		((StatusEffect)sE_Skyr).m_name = "Skyr";
		((StatusEffect)sE_Skyr).m_tooltip = "You regain the rest effect for a short time.";
		((StatusEffect)sE_Skyr).m_ttl = 600f;
		((StatusEffect)sE_Skyr).m_icon = _iconSkyr;
		shared18.m_consumeStatusEffect = (StatusEffect)(object)sE_Skyr;
		CreateButterChurn();
		CreateButtermilkTank();
		ItemConfig val44 = new ItemConfig
		{
			Name = "Bear soup",
			Description = "Thick soup made from bear meat and butter.",
			Enabled = true
		};
		CustomItem val45 = new CustomItem("BearSoup", "MeatPlatter", val44);
		ItemManager.Instance.AddItem(val45);
		EnableServingTray(val45.ItemDrop);
		if ((Object)(object)_bearSoupModel != (Object)null)
		{
			OverrideDropModel(((Component)val45.ItemDrop).gameObject, _bearSoupModel);
			MeshFilter componentInChildren5 = ((Component)val45.ItemDrop).GetComponentInChildren<MeshFilter>(true);
			if ((Object)(object)componentInChildren5 != (Object)null)
			{
				((Component)componentInChildren5).transform.localScale = Vector3.one * 1.3f;
			}
		}
		SharedData shared19 = val45.ItemDrop.m_itemData.m_shared;
		shared19.m_food = 80f;
		shared19.m_foodStamina = 26f;
		shared19.m_foodBurnTime = 1800f;
		shared19.m_foodRegen = 5f;
		if ((Object)(object)_iconBearSoup != (Object)null)
		{
			shared19.m_icons = (Sprite[])(object)new Sprite[1] { _iconBearSoup };
		}
		GameObject gameObject4 = ((Component)val45.ItemDrop).gameObject;
		Collider[] componentsInChildren4 = gameObject4.GetComponentsInChildren<Collider>();
		foreach (Collider val46 in componentsInChildren4)
		{
			val46.enabled = false;
		}
		SphereCollider val47 = gameObject4.AddComponent<SphereCollider>();
		val47.radius = 0.35f;
		val47.center = new Vector3(0f, 0.15f, 0f);
		((Collider)val47).isTrigger = false;
		val5 = new RecipeConfig();
		val5.Name = "Recipe_BearSoup";
		val5.Item = "BearSoup";
		val5.Amount = 1;
		val5.CraftingStation = "piece_cauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "ButterItem",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "CookedBjornMeat",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "Turnip",
				Amount = 1
			}
		};
		RecipeConfig val48 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val48));
		ItemConfig val49 = new ItemConfig
		{
			Name = "Fuling delicacy",
			Description = "A gourment dish made with fish and butter.",
			Enabled = true
		};
		CustomItem val50 = new CustomItem("FulingDelicacy", "FishWraps", val49);
		ItemManager.Instance.AddItem(val50);
		EnableServingTray(val50.ItemDrop);
		if ((Object)(object)_fulingDelicacyModel != (Object)null)
		{
			OverrideDropModel(((Component)val50.ItemDrop).gameObject, _fulingDelicacyModel);
			MeshFilter componentInChildren6 = ((Component)val50.ItemDrop).GetComponentInChildren<MeshFilter>(true);
			if ((Object)(object)componentInChildren6 != (Object)null)
			{
				((Component)componentInChildren6).transform.localScale = Vector3.one * 2f;
			}
		}
		SharedData shared20 = val50.ItemDrop.m_itemData.m_shared;
		shared20.m_food = 80f;
		shared20.m_foodStamina = 26f;
		shared20.m_foodBurnTime = 1800f;
		shared20.m_foodRegen = 3f;
		if ((Object)(object)_iconFulingDelicacy != (Object)null)
		{
			shared20.m_icons = (Sprite[])(object)new Sprite[1] { _iconFulingDelicacy };
		}
		val5 = new RecipeConfig();
		val5.Name = "Recipe_FulingDelicacy";
		val5.Item = "FulingDelicacy";
		val5.Amount = 1;
		val5.CraftingStation = "piece_cauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "Needle",
				Amount = 2
			},
			new RequirementConfig
			{
				Item = "FishCooked",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "ButterItem",
				Amount = 1
			}
		};
		RecipeConfig val51 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val51));
		ItemConfig val52 = new ItemConfig
		{
			Name = "Cheese plate",
			Description = "Rich platter of cheeses made from lox milk.",
			Enabled = true
		};
		CustomItem val53 = new CustomItem("CheesePlateItem", "MeatPlatter", val52);
		ItemManager.Instance.AddItem(val53);
		EnableServingTray(val53.ItemDrop);
		if ((Object)(object)_bundle != (Object)null)
		{
			GameObject val54 = LoadPrefabFromBundle("cheeseplateModel");
			if ((Object)(object)val54 != (Object)null)
			{
				OverrideDropModel(((Component)val53.ItemDrop).gameObject, val54);
				MeshFilter componentInChildren7 = ((Component)val53.ItemDrop).GetComponentInChildren<MeshFilter>(true);
				if ((Object)(object)componentInChildren7 != (Object)null)
				{
					((Component)componentInChildren7).transform.localScale = Vector3.one * 1.5f;
				}
				FixDropCollider(((Component)val53.ItemDrop).gameObject, 0.25f);
			}
		}
		SharedData shared21 = val53.ItemDrop.m_itemData.m_shared;
		shared21.m_food = 100f;
		shared21.m_foodStamina = 100f;
		shared21.m_foodEitr = 100f;
		shared21.m_foodBurnTime = 1800f;
		shared21.m_foodRegen = 5f;
		Sprite val55 = _bundle.LoadAsset<Sprite>("icon_cheeseplate");
		if ((Object)(object)val55 != (Object)null)
		{
			shared21.m_icons = (Sprite[])(object)new Sprite[1] { val55 };
		}
		val5 = new RecipeConfig();
		val5.Name = "Recipe_CheesePlate";
		val5.Item = "CheesePlateItem";
		val5.Amount = 1;
		val5.CraftingStation = "piece_cauldron";
		val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
		{
			new RequirementConfig
			{
				Item = "LazurCheese",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "GoudaCheese",
				Amount = 1
			},
			new RequirementConfig
			{
				Item = "TwarogItem",
				Amount = 1
			}
		};
		RecipeConfig val56 = val5;
		ItemManager.Instance.AddRecipe(new CustomRecipe(val56));
	}

	private void CreateMobileWorkbenchCart()
	{
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_020e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0213: Unknown result type (might be due to invalid IL or missing references)
		//IL_021f: Unknown result type (might be due to invalid IL or missing references)
		//IL_022b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0237: Unknown result type (might be due to invalid IL or missing references)
		//IL_0243: Unknown result type (might be due to invalid IL or missing references)
		//IL_024b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0259: Expected O, but got Unknown
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c4: Expected O, but got Unknown
		GameObject prefab = PrefabManager.Instance.GetPrefab("Cart");
		if ((Object)(object)prefab == (Object)null)
		{
			Logger.LogWarning((object)"[LoxMilkMod] prefab 'Cart' not found - milker.");
			return;
		}
		GameObject val = PrefabManager.Instance.CreateClonedPrefab("piece_mobile_loxworkbench", prefab);
		if ((Object)(object)val == (Object)null)
		{
			Logger.LogWarning((object)"[LoxMilkMod] failed to clone 'Cart'.");
			return;
		}
		if ((Object)(object)_milkerModel != (Object)null)
		{
			MeshRenderer[] componentsInChildren = val.GetComponentsInChildren<MeshRenderer>(true);
			foreach (MeshRenderer val2 in componentsInChildren)
			{
				((Renderer)val2).enabled = false;
			}
			GameObject val3 = Object.Instantiate<GameObject>(_milkerModel, val.transform);
			val3.transform.localPosition = new Vector3(0f, 0f, 0f);
			val3.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
			val3.transform.localScale = Vector3.one * 0.75f;
			if ((Object)(object)val.GetComponent<LoxWheelAnimator>() == (Object)null)
			{
				LoxWheelAnimator loxWheelAnimator = val.AddComponent<LoxWheelAnimator>();
				loxWheelAnimator.WheelRadius = 0.5f;
			}
		}
		else
		{
			Logger.LogWar