Decompiled source of JingleBellHollow v1.0.0

JingleBellHollow.dll

Decompiled a day ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using ATS_API.Biomes;
using ATS_API.Buildings;
using ATS_API.Decorations;
using ATS_API.Effects;
using ATS_API.Helpers;
using ATS_API.NaturalResource;
using BepInEx;
using BepInEx.Logging;
using Eremite.Buildings;
using Eremite.Controller.Effects;
using Eremite.Model;
using Eremite.Model.Effects;
using Eremite.Model.Effects.Hooked;
using Eremite.Services;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UniRx;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("JingleBellHollow")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A custom biome with unique mechanics, visuals and sounds.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+31734b8b742bfc3ae04a7cee6018c928ba51eb8b")]
[assembly: AssemblyProduct("JingleBellHollow")]
[assembly: AssemblyTitle("JingleBellHollow")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ATS_ChristmasMod
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "JingleBellHollow";

		public const string PLUGIN_NAME = "JingleBellHollow";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace JingleBellHollow
{
	public class DecorationPlacedHook : HookLogic
	{
		public static HookLogicType ID;

		public DecorationTier tier;

		public int amount;

		public override HookLogicType Type => ID;

		public bool IsMatching(Building building)
		{
			Decoration val = (Decoration)(object)((building is Decoration) ? building : null);
			return val != null && (Object)(object)val.model.tier == (Object)(object)tier;
		}

		public override bool HasImpactOn(BuildingModel building)
		{
			DecorationModel val = (DecorationModel)(object)((building is DecorationModel) ? building : null);
			return val != null && (Object)(object)val.tier == (Object)(object)tier;
		}

		public override string GetAmountText()
		{
			return amount.ToString();
		}
	}
	public class DecorationOwnedTracker : HookTracker<DecorationPlacedHook>
	{
		public DecorationOwnedTracker(HookState hookState, DecorationPlacedHook model, HookedEffectModel effectModel, HookedEffectState effectState)
			: base(hookState, model, effectModel, effectState)
		{
		}

		public void OnBuildingPlaced(Building building)
		{
			if (base.model.IsMatching(building))
			{
				Plugin.Log.LogInfo((object)("OnBuildingPlaced " + ((Object)building).name + " and is matching"));
				Decoration val = (Decoration)(object)((building is Decoration) ? building : null);
				Update(val.model.decorationScore);
			}
			else
			{
				Plugin.Log.LogInfo((object)("OnBuildingPlaced " + ((Object)building).name));
			}
		}

		public void OnBuildingRemoved(Building building)
		{
			if (base.model.IsMatching(building))
			{
				Plugin.Log.LogInfo((object)("OnBuildingRemoved " + ((Object)building).name + " and is matching"));
				Decoration val = (Decoration)(object)((building is Decoration) ? building : null);
				Update(-val.model.decorationScore);
			}
			else
			{
				Plugin.Log.LogInfo((object)("OnBuildingRemoved " + ((Object)building).name));
			}
		}

		public void SetAmount(int amount)
		{
			Update(amount - base.hookState.totalAmount);
		}

		private void Update(int amount)
		{
			HookState hookState = base.hookState;
			hookState.totalAmount += amount;
			HookState hookState2 = base.hookState;
			hookState2.currentAmount += amount;
			while (base.hookState.currentAmount >= base.model.amount)
			{
				base.Fire();
				HookState hookState3 = base.hookState;
				hookState3.currentAmount -= base.model.amount;
			}
			while (base.hookState.currentAmount < 0)
			{
				base.Revert();
				HookState hookState4 = base.hookState;
				hookState4.currentAmount += base.model.amount;
			}
		}
	}
	public class DecorationsOwnedHooksMonitor : HookMonitor<DecorationPlacedHook, DecorationOwnedTracker>
	{
		public override void AddHandle(DecorationOwnedTracker tracker)
		{
			((HookTracker<DecorationPlacedHook>)tracker).handle.Add(ObservableExtensions.Subscribe<Building>((IObservable<Building>)Serviceable.GameBlackboardService.BuildingFinished, (Action<Building>)tracker.OnBuildingPlaced));
			((HookTracker<DecorationPlacedHook>)tracker).handle.Add(ObservableExtensions.Subscribe<Building>((IObservable<Building>)Serviceable.GameBlackboardService.FinishedBuildingRemoved, (Action<Building>)tracker.OnBuildingRemoved));
		}

		public override DecorationOwnedTracker CreateTracker(HookState state, DecorationPlacedHook model, HookedEffectModel effectModel, HookedEffectState effectState)
		{
			return new DecorationOwnedTracker(state, model, effectModel, effectState);
		}

		public override void InitValue(DecorationOwnedTracker tracker)
		{
			tracker.SetAmount(((HookMonitor<DecorationPlacedHook, DecorationOwnedTracker>)this).GetInitValueFor(((HookTracker<DecorationPlacedHook>)tracker).model));
		}

		public override int GetInitValueFor(DecorationPlacedHook model)
		{
			return Serviceable.BuildingsService.Buildings.Values.Count(model.IsMatching);
		}

		public override int GetInitProgressFor(DecorationPlacedHook model)
		{
			return ((HookMonitor<DecorationPlacedHook, DecorationOwnedTracker>)this).GetInitValueFor(model) % model.amount;
		}

		public override int GetFiredAmountPreviewFor(DecorationPlacedHook model)
		{
			return ((HookMonitor<DecorationPlacedHook, DecorationOwnedTracker>)this).GetInitValueFor(model) / model.amount;
		}
	}
	[HarmonyPatch]
	[BepInPlugin("Jingle_Bell_Hollow", "Jingle Bell Hollow", "1.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "Jingle_Bell_Hollow";

		private const string NAME = "Jingle Bell Hollow";

		private const string VERSION = "1.0.1";

		public static Plugin Instance;

		public static ManualLogSource Log;

		private static AssetBundle christmasBundle;

		private DecorationTierBuilder festiveTier;

		private HookedEffectBuilder festiveLights;

		private void Awake()
		{
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected O, but got Unknown
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			if (!AssetBundleHelper.TryLoadAssetBundleFromFile("christmas", ref christmasBundle))
			{
				Log.LogError((object)"Failed to load asset bundle");
				return;
			}
			if ((Object)(object)christmasBundle == (Object)null)
			{
				Log.LogError((object)"Asset bundle is null!");
				return;
			}
			Harmony.CreateAndPatchAll(typeof(Plugin).Assembly, "Jingle_Bell_Hollow");
			Log.LogInfo((object)("Asset bundle: " + ((Object)christmasBundle).name + " is not null!"));
			DecorationTierBuilder val = new DecorationTierBuilder("Jingle_Bell_Hollow", "Festival");
			val.SetDisplayName("Festival", (SystemLanguage)10);
			val.SetIcon("Icon_UI_DecorFestive.png");
			val.SetColor(Color.magenta);
			val.AddReferenceCost(NameToAmount.op_Implicit((5, (GoodsTypes)33)));
			festiveTier = val;
			CreateEffects();
			CreateBiome();
			CreateDecorations();
			EventBus.OnInitReferences.AddListener((Action)ChangeWorkshopModel);
			Log.LogInfo((object)"Jingle Bell Hollow v1.0.1 Plugin loaded");
		}

		private void CreateEffects()
		{
			//IL_0012: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NewHookLogicType val = CustomHookedEffectManager.NewHookLogic<DecorationPlacedHook, DecorationsOwnedHooksMonitor>("Jingle_Bell_Hollow", "FestiveLightsHook");
			DecorationPlacedHook.ID = val.ID;
			festiveLights = new HookedEffectBuilder("Jingle_Bell_Hollow", "Festive Lights", "Icon_Modifier_Festive_Lights.png");
			((EffectBuilder<HookedEffectModel>)(object)festiveLights).SetPositive(true);
			((EffectBuilder<HookedEffectModel>)(object)festiveLights).SetDisplayName("Festive Lights", (SystemLanguage)10);
			((EffectBuilder<HookedEffectModel>)(object)festiveLights).SetDescription("The winter's chill is the time to spread the love and get the festivities going! Every 8 Festive decorations on your settlement increase Global Resolve by +1.", (SystemLanguage)10);
			festiveLights.SetDescriptionArgs(new(SourceType, TextArgType, int)[2]
			{
				((SourceType)0, (TextArgType)0, 0),
				((SourceType)2, (TextArgType)0, 0)
			});
			festiveLights.SetPreviewDescription("+{0} Global Resolve", (SystemLanguage)10);
			festiveLights.SetPreviewDescriptionArgs(new(HookedStateTextSource, int)[1] { ((HookedStateTextSource)80, 0) });
			DecorationPlacedHook decorationPlacedHook = festiveLights.NewHook<DecorationPlacedHook>();
			decorationPlacedHook.tier = festiveTier.Model;
			decorationPlacedHook.amount = 8;
			festiveLights.AddHookedEffect((EffectModel)(object)EffectFactory.AddHookedEffect_IncreaseResolve((IEffectBuilder)(object)festiveLights, 1, (ResolveEffectType)3));
		}

		private void CreateDecorations()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: 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_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_00a5: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Expected O, but got Unknown
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Expected O, but got Unknown
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			string arg = ColorUtility.ToHtmlStringRGB(Color.magenta);
			DecorationTierTypes iD = festiveTier.ID;
			DecorationBuildingBuilder val = new DecorationBuildingBuilder("Jingle_Bell_Hollow", "Wreath", "Icon_Deco_Wreath.png", iD);
			((BuildingBuilder<DecorationModel>)(object)val).SetDisplayName("Wreath", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val).SetDescription($"<color=#{arg}>Festival.</color> Celebration is important for a villagers soul.", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val).SetLabel("Decorations", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val).AddRequiredGoods((NameToAmount[])(object)new NameToAmount[1] { NameToAmount.op_Implicit((1, (GoodsTypes)59)) });
			((BuildingBuilder<DecorationModel>)(object)val).SetFootPrint(1, 1, (FieldType)20);
			val.SetDecorationScore(1);
			((BuildingBuilder<DecorationModel>)(object)val).SetCustomModel(christmasBundle.LoadAsset<GameObject>("Deco_1x1_Wreath"));
			((BuildingBuilder<DecorationModel>)(object)val).SetScaffoldingData(new BuildingConstructionAnimationData
			{
				unconstructedPosition = new Vector3(0f, -2f, 0f)
			});
			DecorationBuildingBuilder val2 = new DecorationBuildingBuilder("Jingle_Bell_Hollow", "YuleTree", "Icon_Deco_YuleTree.png", iD);
			((BuildingBuilder<DecorationModel>)(object)val2).SetDisplayName("Yule Tree", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val2).SetDescriptionKey(((BuildingBuilder<DecorationModel>)(object)val).Model.description.key);
			((BuildingBuilder<DecorationModel>)(object)val2).SetLabel("Decorations", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val2).AddRequiredGoods((NameToAmount[])(object)new NameToAmount[1] { NameToAmount.op_Implicit((9, (GoodsTypes)59)) });
			((BuildingBuilder<DecorationModel>)(object)val2).SetFootPrint(3, 3, (FieldType)20);
			val2.SetDecorationScore(9);
			((BuildingBuilder<DecorationModel>)(object)val2).SetCustomModel(christmasBundle.LoadAsset<GameObject>("Deco_3x3_YuleTree"));
			((BuildingBuilder<DecorationModel>)(object)val2).SetScaffoldingData(new BuildingConstructionAnimationData
			{
				unconstructedPosition = new Vector3(0f, -7f, 0f),
				levels = 7
			});
			DecorationBuildingBuilder val3 = new DecorationBuildingBuilder("Jingle_Bell_Hollow", "Snowman", "Icon_Deco_Snowman.png", iD);
			((BuildingBuilder<DecorationModel>)(object)val3).SetDisplayName("Snowman", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val3).SetDescriptionKey(((BuildingBuilder<DecorationModel>)(object)val).Model.description.key);
			((BuildingBuilder<DecorationModel>)(object)val3).SetLabel("Decorations", (SystemLanguage)10);
			((BuildingBuilder<DecorationModel>)(object)val3).AddRequiredGoods((NameToAmount[])(object)new NameToAmount[1] { NameToAmount.op_Implicit((4, (GoodsTypes)59)) });
			((BuildingBuilder<DecorationModel>)(object)val3).SetFootPrint(2, 2, (FieldType)20);
			val3.SetDecorationScore(4);
			((BuildingBuilder<DecorationModel>)(object)val3).SetCustomModel(christmasBundle.LoadAsset<GameObject>("Snowperson"));
		}

		private void ChangeWorkshopModel()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			BuildingModel obj = BuildingTypesExtensions.ToBuildingModel((BuildingTypes)103);
			WorkshopModel val = (WorkshopModel)(object)((obj is WorkshopModel) ? obj : null);
			WorkshopBuildingBuilder val2 = new WorkshopBuildingBuilder(val);
			GameObject customModel = default(GameObject);
			if (AssetBundleHelper.TryGet<GameObject>(christmasBundle, "Crude_Workshop_Jingle", ref customModel))
			{
				((BuildingBuilder<WorkshopModel>)(object)val2).SetCustomModel(customModel);
			}
			Log.LogInfo((object)"Jingle Bell Hollow v1.0.1 ChangeWorkshopModel");
		}

		private void CreateBiome()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			BiomeBuilder val = new BiomeBuilder("Jingle_Bell_Hollow", "JingleBellHollow");
			val.SetDisplayName("Jingle Bell Hollow", (SystemLanguage)10);
			val.SetDescription("A dark and enchanting snowy forest, with an assortment of \"old world\" yuletide decorations scattered throughout, and trees with glittering tinsel and strings of lights that glow on their heavy snow-laden boughs.\n", (SystemLanguage)10);
			val.SetTownName("South Pole", (SystemLanguage)10);
			val.SetTownDescription("The Queen really doesn't like Santa's power.", (SystemLanguage)10);
			val.SetIcon("TinselTown_icon.png");
			val.SetSeasonDuration((SeasonTypes)4, 240);
			val.SetSeasonDuration((SeasonTypes)3, 120);
			val.SetSeasonDuration((SeasonTypes)2, 120);
			val.SetNewcomerInterval(300);
			val.AddNewcomerRace((RaceTypes)1, 50f);
			val.AddNewcomerRace((RaceTypes)4, 50f);
			val.AddNewcomerRace((RaceTypes)2, 50f);
			val.AddNewcomerRace((RaceTypes)3, 25f);
			val.AddNewcomerRace((RaceTypes)5, 100f);
			val.AddNewcomerRace((RaceTypes)6, 50f);
			val.SetTraderVillagerKilledByTraderText("froze to death", (SystemLanguage)10);
			val.SetWorldMapTexture("TWH_WorldMapTerrain.png");
			val.AddEffect(((EffectBuilder<HookedEffectModel>)(object)festiveLights).EffectType);
			val.SetDeclinedSeasonalRewardsReward((GoodsTypes)64, 2);
			val.SetSoilText((SoilGrade)0);
			MaskedTerrain val2 = val.CreateTerrain<MaskedTerrain>();
			val2.SetTerrainBaseTexture("TinselWood_Terrain1_b.png", 50, 50);
			val2.SetTerrainOverlayTexture("TinselWood_Terrain2_b.png", 50, 50);
			val2.SetTerrainCliffTexture("TinselWood_Terrain3_b.png", 50, 50);
			val2.SetTerrainBlendTexture("snowyTerrainBlend.png");
			val2.SetWaterTexture("Winter_WorldWater.png");
			val2.SetWaterSpeed((Vector2?)Vector2.zero, (Vector2?)Vector2.zero, (float?)0f, (float?)null);
			val2.SetFogTexture("Winter_Fog_Bottom.png", "Winter_Fog_Top.png");
			val.SetRainParticles(christmasBundle, "SnowFlakeParticles");
			ChristmasTree(val);
			TinselTree(val);
			JingleBellTree(val);
		}

		private void ChristmasTree(BiomeBuilder builder)
		{
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Expected O, but got Unknown
			NaturalResourceBuilder val = builder.NewNaturalResource("SnowyTree", 0.2f, 0.3f, 0f, 0);
			val.SetDisplayName("Snowy Tree", (SystemLanguage)10);
			val.SetDescription("oooh cold", (SystemLanguage)10);
			val.SetCharges(2);
			val.SetProduction((GoodsTypes)43, 1);
			val.AddExtraProduction((GoodsTypes)18, 1, 0.5f);
			val.AddExtraProduction((GoodsTypes)26, 1, 0.3f);
			val.AddExtraProduction((GoodsTypes)6, 1, 0.2f);
			val.AddGatherSound("SE_tree_small_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_small_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_small_3_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_small_4_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_small_5_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_small_fall_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_small_fall_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_small_fall_3_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			NaturalResourcePrefabBuilder val2 = new NaturalResourcePrefabBuilder("Jingle_Bell_Hollow", "SnowyTree1");
			val2.CreateNewPrefab(christmasBundle, "Tinsel_Tree_1");
			val.AddPrefab(val2);
		}

		private void TinselTree(BiomeBuilder builder)
		{
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Expected O, but got Unknown
			NaturalResourceBuilder val = builder.NewNaturalResource("TinselTree", 0.2f, 0.3f, 0.5f, 0);
			val.SetDisplayName("Tinsel Tree", (SystemLanguage)10);
			val.SetDescription("What's inside?", (SystemLanguage)10);
			val.SetCharges(4);
			val.SetProduction((GoodsTypes)43, 1);
			val.AddExtraProduction((GoodsTypes)18, 1, 0.5f);
			val.AddExtraProduction((GoodsTypes)26, 1, 0.3f);
			val.AddExtraProduction((GoodsTypes)6, 1, 0.2f);
			val.AddGatherSound("SE_tree_big_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_3_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_4_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_5_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_3_r.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			NaturalResourcePrefabBuilder val2 = new NaturalResourcePrefabBuilder("Jingle_Bell_Hollow", "TinselTree1");
			val2.CreateNewPrefab(christmasBundle, "Tinsel_Tree_2");
			val.AddPrefab(val2);
		}

		private void JingleBellTree(BiomeBuilder builder)
		{
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Expected O, but got Unknown
			NaturalResourceBuilder val = builder.NewNaturalResource("JingleBellTree", 0.2f, 0.3f, 0.5f, 0);
			val.SetDisplayName("Jingle Bell Tree", (SystemLanguage)10);
			val.SetDescription("A favourite decoration during christmas.", (SystemLanguage)10);
			val.SetCharges(2);
			val.SetProduction((GoodsTypes)43, 1);
			val.AddExtraProduction((GoodsTypes)45, 1, 0.5f);
			val.AddExtraProduction((GoodsTypes)50, 1, 0.3f);
			val.AddExtraProduction((GoodsTypes)6, 1, 0.2f);
			val.AddGatherSound("SE_tree_big_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_3_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_4_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddGatherSound("SE_tree_big_5_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_1_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_2_r_jingle.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			val.AddFallSound("SE_tree_big_fall_3_r.wav", 1f, 1f, 0f, 0.04f, 3, 1, false);
			NaturalResourcePrefabBuilder val2 = new NaturalResourcePrefabBuilder("Jingle_Bell_Hollow", "TinselTree3");
			val2.CreateNewPrefab(christmasBundle, "Tinsel_Tree_3");
			val.AddPrefab(val2);
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}