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("VALKEA")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TheBeesDecree")]
[assembly: AssemblyProduct("VALKEA")]
[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 VALKEA
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("TheBeesDecree.VALKEA", "VALKEA", "3.0.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class VALKEAplugin : BaseUnityPlugin
{
internal const string ModName = "VALKEA";
internal const string ModVersion = "3.0.0";
internal const string Author = "TheBeesDecree";
private const string ModGUID = "TheBeesDecree.VALKEA";
private readonly Harmony _harmony = new Harmony("TheBeesDecree.VALKEA");
public static readonly ManualLogSource VALKEALogger = Logger.CreateLogSource("VALKEA");
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_0078: Expected O, but got Unknown
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Expected O, but got Unknown
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Expected O, but got Unknown
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Expected O, but got Unknown
//IL_0180: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Expected O, but got Unknown
string text = "bjorksnas";
AssetBundle val = AssetUtils.LoadAssetBundleFromResources(text, Assembly.GetExecutingAssembly());
GameObject[] array = val.LoadAllAssets<GameObject>();
GameObject val2 = val.LoadAsset<GameObject>("BJORKSNAS");
ItemConfig val3 = new ItemConfig();
val3.Name = "BJORKSNAS";
val3.Description = "Legend has it that BJÖRKSNÄS is the holy key needed to assemble all goods from VALKEA";
val3.CraftingStation = CraftingStations.Workbench;
val3.Requirements = (RequirementConfig[])(object)new RequirementConfig[3]
{
new RequirementConfig
{
Item = "FineWood",
Amount = 1
},
new RequirementConfig
{
Item = "QueenBee",
Amount = 1
},
new RequirementConfig
{
Item = "Coins",
Amount = 999,
AmountPerLevel = 99
}
};
ItemManager.Instance.AddItem(new CustomItem(val2, false, val3));
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> { "Food", "Misc.", "Building", "Furniture" };
foreach (GameObject piece in buildPieces.m_pieces)
{
PieceManager.Instance.AddPiece(new CustomPiece(piece, ((Object)buildPieces).name, false));
}
}
}
}