using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
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("PINGUS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TheBeesDecree")]
[assembly: AssemblyProduct("PINGUS")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4358610B-F3F4-4843-B7AF-98B7BC60DCDE")]
[assembly: AssemblyFileVersion("3.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("3.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace PINGUS
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("TheBeesDecree.PINGUS", "PINGUS", "3.0.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class PINGUSplugin : BaseUnityPlugin
{
internal const string ModName = "PINGUS";
internal const string ModVersion = "3.0.0";
internal const string Author = "TheBeesDecree";
private const string ModGUID = "TheBeesDecree.PINGUS";
private readonly Harmony _harmony = new Harmony("TheBeesDecree.PINGUS");
public static readonly ManualLogSource PINGUSLogger = Logger.CreateLogSource("PINGUS");
public void Awake()
{
AddPieces();
Assembly executingAssembly = Assembly.GetExecutingAssembly();
_harmony.PatchAll(executingAssembly);
}
private void AddPieces()
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Expected O, but got Unknown
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Expected O, but got Unknown
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Expected O, but got Unknown
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Expected O, but got Unknown
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Expected O, but got Unknown
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Expected O, but got Unknown
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
//IL_0184: Unknown result type (might be due to invalid IL or missing references)
//IL_0191: Expected O, but got Unknown
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_0198: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Expected O, but got Unknown
//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Expected O, but got Unknown
//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
//IL_01e8: Expected O, but got Unknown
//IL_020c: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Expected O, but got Unknown
//IL_0224: Unknown result type (might be due to invalid IL or missing references)
//IL_022b: Expected O, but got Unknown
//IL_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_026d: Unknown result type (might be due to invalid IL or missing references)
//IL_0277: Expected O, but got Unknown
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_027e: Unknown result type (might be due to invalid IL or missing references)
//IL_028a: Unknown result type (might be due to invalid IL or missing references)
//IL_0294: Expected O, but got Unknown
//IL_0296: Unknown result type (might be due to invalid IL or missing references)
//IL_029b: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
//IL_02b0: Expected O, but got Unknown
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02ca: Expected O, but got Unknown
//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
//IL_02df: Expected O, but got Unknown
//IL_0310: Unknown result type (might be due to invalid IL or missing references)
//IL_0315: Unknown result type (might be due to invalid IL or missing references)
//IL_0321: Unknown result type (might be due to invalid IL or missing references)
//IL_032b: Expected O, but got Unknown
//IL_033b: Unknown result type (might be due to invalid IL or missing references)
//IL_0345: Expected O, but got Unknown
//IL_0353: Unknown result type (might be due to invalid IL or missing references)
//IL_035a: Expected O, but got Unknown
//IL_038b: Unknown result type (might be due to invalid IL or missing references)
//IL_0395: Expected O, but got Unknown
//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
//IL_03aa: Expected O, but got Unknown
//IL_03db: Unknown result type (might be due to invalid IL or missing references)
//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
//IL_03f6: Expected O, but got Unknown
//IL_0406: Unknown result type (might be due to invalid IL or missing references)
//IL_0410: Expected O, but got Unknown
//IL_041e: Unknown result type (might be due to invalid IL or missing references)
//IL_0425: Expected O, but got Unknown
//IL_0456: Unknown result type (might be due to invalid IL or missing references)
//IL_045b: Unknown result type (might be due to invalid IL or missing references)
//IL_0467: Unknown result type (might be due to invalid IL or missing references)
//IL_0470: Expected O, but got Unknown
//IL_0480: Unknown result type (might be due to invalid IL or missing references)
//IL_048a: Expected O, but got Unknown
//IL_0498: Unknown result type (might be due to invalid IL or missing references)
//IL_049f: Expected O, but got Unknown
//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
//IL_04ea: Expected O, but got Unknown
//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
//IL_04fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0506: Expected O, but got Unknown
//IL_0508: Unknown result type (might be due to invalid IL or missing references)
//IL_050d: Unknown result type (might be due to invalid IL or missing references)
//IL_0519: Unknown result type (might be due to invalid IL or missing references)
//IL_0522: Expected O, but got Unknown
//IL_0524: Unknown result type (might be due to invalid IL or missing references)
//IL_0529: Unknown result type (might be due to invalid IL or missing references)
//IL_0535: Unknown result type (might be due to invalid IL or missing references)
//IL_053e: Expected O, but got Unknown
//IL_054e: Unknown result type (might be due to invalid IL or missing references)
//IL_0558: Expected O, but got Unknown
//IL_0602: Unknown result type (might be due to invalid IL or missing references)
//IL_060c: Expected O, but got Unknown
string text = "pingus";
AssetBundle val = AssetUtils.LoadAssetBundleFromResources(text, Assembly.GetExecutingAssembly());
GameObject[] array = val.LoadAllAssets<GameObject>();
GameObject val2 = val.LoadAsset<GameObject>("PINGUS");
ItemConfig val3 = new ItemConfig();
val3.Name = "PINGUS";
val3.Description = "To get your hand on such a rarity, a treasure! Shall we uncork the Pingus?";
val3.CraftingStation = CraftingStations.Workbench;
val3.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "Coins",
Amount = 3500,
AmountPerLevel = 999
}
};
ItemManager.Instance.AddItem(new CustomItem(val2, false, val3));
GameObject val4 = val.LoadAsset<GameObject>("BoltCork");
ItemConfig val5 = new ItemConfig();
val5.Name = "Cork Bolt";
val5.Description = "Firing off your Pingus?";
val5.CraftingStation = CraftingStations.Workbench;
val5.Amount = 25;
val5.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "YggdrasilWood",
Amount = 1,
AmountPerLevel = 1
}
};
ItemManager.Instance.AddItem(new CustomItem(val4, false, val5));
GameObject val6 = val.LoadAsset<GameObject>("Corkinator");
ItemConfig val7 = new ItemConfig();
val7.Name = "The Corkinator";
val7.Description = "Take aim and shoot your Pingus!";
val7.CraftingStation = CraftingStations.Workbench;
val7.Requirements = (RequirementConfig[])(object)new RequirementConfig[2]
{
new RequirementConfig
{
Item = "BoltCork",
Amount = 3500
},
new RequirementConfig
{
Item = "Coins",
Amount = 3500,
AmountPerLevel = 1
}
};
ItemManager.Instance.AddItem(new CustomItem(val6, false, val7));
GameObject val8 = val.LoadAsset<GameObject>("EisienberryWine");
ItemConfig val9 = new ItemConfig();
val9.Name = "Eisienberry Wine";
val9.Description = "How could you afford this?";
ItemManager.Instance.AddItem(new CustomItem(val8, false, val9));
GameObject val10 = val.LoadAsset<GameObject>("EiseinberryBase");
ItemConfig val11 = new ItemConfig();
val11.Name = "Eisenberry Base";
val11.Description = "Awefully Chilly.";
val11.CraftingStation = CraftingStations.MeadKetill;
val11.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
{
new RequirementConfig
{
Item = "Honey",
Amount = 25
},
new RequirementConfig
{
Item = "Eiseinberry1",
Amount = 25
},
new RequirementConfig
{
Item = "FreezeGland",
Amount = 5
}
};
ItemManager.Instance.AddItem(new CustomItem(val10, false, val11));
GameObject val12 = val.LoadAsset<GameObject>("EisienberrySeed1");
ItemConfig val13 = new ItemConfig();
val13.Name = "Eisenberry Seeds";
val13.Description = "Could easily be mistaken for Dragon Tears!";
val13.CraftingStation = CraftingStations.Workbench;
val13.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "DragonTear",
Amount = 15
}
};
ItemManager.Instance.AddItem(new CustomItem(val12, false, val13));
GameObject val14 = val.LoadAsset<GameObject>("Eiseinberry1");
ItemConfig val15 = new ItemConfig();
val15.Name = "Eisenberry Cluster";
val15.Description = "Rare frozen delights!";
val15.CraftingStation = CraftingStations.Workbench;
ItemManager.Instance.AddItem(new CustomItem(val14, false, val15));
GameObject val16 = val.LoadAsset<GameObject>("BonemawCaviar");
ItemConfig val17 = new ItemConfig();
val17.Name = "Bonemaw Caviar";
val17.Description = "Far more delightful than the creature it came from.";
val17.CraftingStation = CraftingStations.Cauldron;
val17.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "BoneMawSerpentMeat",
Amount = 15
}
};
ItemManager.Instance.AddItem(new CustomItem(val16, false, val17));
GameObject val18 = val.LoadAsset<GameObject>("SalmonCaviar");
ItemConfig val19 = new ItemConfig();
val19.Name = "Salmon Caviar";
val19.Description = "What a fine delicacy! It only took harming so many salmon to make it.";
val19.CraftingStation = CraftingStations.Cauldron;
val19.Requirements = (RequirementConfig[])(object)new RequirementConfig[1]
{
new RequirementConfig
{
Item = "Fish10",
Amount = 7
}
};
ItemManager.Instance.AddItem(new CustomItem(val18, false, val19));
GameObject val20 = val.LoadAsset<GameObject>("PretentiousPlatter");
ItemConfig val21 = new ItemConfig();
val21.Name = "Seafarer's Charcuterie";
val21.Description = "There's caviar on this charcuterie? It's the fanciest of viking fare!";
val21.CraftingStation = CraftingStations.Cauldron;
val21.Requirements = (RequirementConfig[])(object)new RequirementConfig[4]
{
new RequirementConfig
{
Item = "BonemawCaviar",
Amount = 1
},
new RequirementConfig
{
Item = "SalmonCaviar",
Amount = 1
},
new RequirementConfig
{
Item = "LoxMeat",
Amount = 2
},
new RequirementConfig
{
Item = "BarleyFlour",
Amount = 2
}
};
ItemManager.Instance.AddItem(new CustomItem(val20, false, val21));
PieceTable buildPieces = val2.GetComponent<ItemDrop>().m_itemData.m_shared.m_buildPieces;
buildPieces.m_categories = new List<PieceCategory>
{
(PieceCategory)0,
(PieceCategory)1,
(PieceCategory)2,
(PieceCategory)3
};
buildPieces.m_categoryLabels = new List<string> { "Foliage", "Misc.", "Building", "Furniture" };
foreach (GameObject piece in buildPieces.m_pieces)
{
PieceManager.Instance.AddPiece(new CustomPiece(piece, ((Object)buildPieces).name, false));
}
}
}
}