using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Gungeon;
using HarmonyLib;
using ItemAPI;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
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("TenebroseItems")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TenebroseItems")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8f847af4-9e26-4c9a-a758-83dcfdc487aa")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ItemAPI
{
public class FakePrefab : Component
{
internal static HashSet<GameObject> ExistingFakePrefabs = new HashSet<GameObject>();
public static bool IsFakePrefab(Object o)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Expected O, but got Unknown
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
if (o is GameObject)
{
return ExistingFakePrefabs.Contains((GameObject)o);
}
if (o is Component)
{
return ExistingFakePrefabs.Contains(((Component)o).gameObject);
}
return false;
}
public static void MarkAsFakePrefab(GameObject obj)
{
ExistingFakePrefabs.Add(obj);
}
public static GameObject Clone(GameObject obj)
{
bool flag = IsFakePrefab((Object)(object)obj);
bool activeSelf = obj.activeSelf;
if (activeSelf)
{
obj.SetActive(false);
}
GameObject val = Object.Instantiate<GameObject>(obj);
if (activeSelf)
{
obj.SetActive(true);
}
ExistingFakePrefabs.Add(val);
if (flag)
{
}
return val;
}
public static Object Instantiate(Object o, Object new_o)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
//IL_0022: 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_0057: Unknown result type (might be due to invalid IL or missing references)
if (o is GameObject && ExistingFakePrefabs.Contains((GameObject)o))
{
((GameObject)new_o).SetActive(true);
}
else if (o is Component && ExistingFakePrefabs.Contains(((Component)o).gameObject))
{
((Component)new_o).gameObject.SetActive(true);
}
return new_o;
}
}
public static class FakePrefabHooks
{
public delegate TResult Func<T1, T2, T3, T4, T5, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
public static void Init()
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Expected O, but got Unknown
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Expected O, but got Unknown
//IL_0100: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Expected O, but got Unknown
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Expected O, but got Unknown
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Expected O, but got Unknown
//IL_0206: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Expected O, but got Unknown
Hook val = new Hook((MethodBase)typeof(PlayerController).GetMethod("AcquirePassiveItemPrefabDirectly"), typeof(FakePrefabHooks).GetMethod("AcquirePassiveItemPrefabDirectly"));
Hook val2 = new Hook((MethodBase)typeof(PlayerItem).GetMethod("Pickup"), typeof(FakePrefabHooks).GetMethod("ActivePickup"));
Hook val3 = new Hook((MethodBase)typeof(Object).GetMethod("Instantiate", new Type[3]
{
typeof(Object),
typeof(Transform),
typeof(bool)
}), typeof(FakePrefabHooks).GetMethod("InstantiateOPI"));
Hook val4 = new Hook((MethodBase)typeof(Object).GetMethod("Instantiate", new Type[2]
{
typeof(Object),
typeof(Transform)
}), typeof(FakePrefabHooks).GetMethod("InstantiateOP"));
Hook val5 = new Hook((MethodBase)typeof(Object).GetMethod("Instantiate", new Type[1] { typeof(Object) }), typeof(FakePrefabHooks).GetMethod("InstantiateO"));
Hook val6 = new Hook((MethodBase)typeof(Object).GetMethod("Instantiate", new Type[3]
{
typeof(Object),
typeof(Vector3),
typeof(Quaternion)
}), typeof(FakePrefabHooks).GetMethod("InstantiateOPR"));
Hook val7 = new Hook((MethodBase)typeof(Object).GetMethod("Instantiate", new Type[4]
{
typeof(Object),
typeof(Vector3),
typeof(Quaternion),
typeof(Transform)
}), typeof(FakePrefabHooks).GetMethod("InstantiateOPRP"));
}
public static void AcquirePassiveItemPrefabDirectly(Action<PlayerController, PassiveItem> orig, PlayerController self, PassiveItem item)
{
bool flag = FakePrefab.IsFakePrefab((Object)(object)((Component)item).gameObject);
if (flag)
{
((Component)item).gameObject.SetActive(true);
}
orig(self, item);
if (flag)
{
((Component)item).gameObject.SetActive(false);
}
}
public static void ActivePickup(Action<PlayerItem, PlayerController> orig, PlayerItem self, PlayerController player)
{
bool flag = FakePrefab.IsFakePrefab((Object)(object)((Component)self).gameObject);
if (flag)
{
((Component)self).gameObject.SetActive(true);
}
orig(self, player);
if (flag)
{
((Component)self).gameObject.SetActive(false);
}
}
public static Object InstantiateOPI(Func<Object, Transform, bool, Object> orig, Object original, Transform parent, bool instantiateInWorldSpace)
{
return FakePrefab.Instantiate(original, orig(original, parent, instantiateInWorldSpace));
}
public static Object InstantiateOP(Func<Object, Transform, Object> orig, Object original, Transform parent)
{
return FakePrefab.Instantiate(original, orig(original, parent));
}
public static Object InstantiateO(Func<Object, Object> orig, Object original)
{
return FakePrefab.Instantiate(original, orig(original));
}
public static Object InstantiateOPR(Func<Object, Vector3, Quaternion, Object> orig, Object original, Vector3 position, Quaternion rotation)
{
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return FakePrefab.Instantiate(original, orig(original, position, rotation));
}
public static Object InstantiateOPRP(Func<Object, Vector3, Quaternion, Transform, Object> orig, Object original, Vector3 position, Quaternion rotation, Transform parent)
{
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return FakePrefab.Instantiate(original, orig(original, position, rotation, parent));
}
}
public static class ItemBuilder
{
public enum CooldownType
{
Timed,
Damage,
PerRoom,
None
}
public static void Init()
{
try
{
MethodBase method = new StackFrame(1, needFileInfo: false).GetMethod();
Type declaringType = method.DeclaringType;
ResourceExtractor.SetAssembly(declaringType);
}
catch (Exception ex)
{
ETGModConsole.Log((object)ex.Message, false);
ETGModConsole.Log((object)ex.StackTrace, false);
}
}
public static GameObject AddSpriteToObject(string name, string resourcePath, GameObject obj = null, bool copyFromExisting = true)
{
GameObject val = SpriteBuilder.SpriteFromResource(resourcePath, obj, copyFromExisting);
((Object)val).name = name;
return val;
}
public static void SetupItem(PickupObject item, string shortDesc, string longDesc, string idPool)
{
try
{
((BraveBehaviour)item).encounterTrackable = null;
Databases.Items.SetupItem(item, ((Object)item).name);
SpriteBuilder.AddToAmmonomicon(((BraveBehaviour)item).sprite.GetCurrentSpriteDef());
((BraveBehaviour)item).encounterTrackable.journalData.AmmonomiconSprite = ((BraveBehaviour)item).sprite.GetCurrentSpriteDef().name;
GunExt.SetName(item, ((Object)item).name);
GunExt.SetShortDescription(item, shortDesc);
GunExt.SetLongDescription(item, longDesc);
if (item is PlayerItem)
{
((PlayerItem)((item is PlayerItem) ? item : null)).consumable = false;
}
Game.Items.Add(idPool + ":" + ((Object)item).name.ToLower().Replace(" ", "_"), item);
Databases.Items.Add(item, false, "ANY");
}
catch (Exception ex)
{
ETGModConsole.Log((object)ex.Message, false);
ETGModConsole.Log((object)ex.StackTrace, false);
}
}
public static void SetCooldownType(PlayerItem item, CooldownType cooldownType, float value)
{
item.damageCooldown = -1f;
item.roomCooldown = -1;
item.timeCooldown = -1f;
switch (cooldownType)
{
case CooldownType.Timed:
item.timeCooldown = value;
break;
case CooldownType.Damage:
item.damageCooldown = value;
break;
case CooldownType.PerRoom:
item.roomCooldown = (int)value;
break;
}
}
public static void AddPassiveStatModifier(PickupObject po, StatType statType, float amount, ModifyMethod method = 0)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: 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)
StatModifier val = new StatModifier();
val.amount = amount;
val.statToBoost = statType;
val.modifyType = method;
if (po is PlayerItem)
{
PlayerItem val2 = (PlayerItem)(object)((po is PlayerItem) ? po : null);
if (val2.passiveStatModifiers == null)
{
val2.passiveStatModifiers = (StatModifier[])(object)new StatModifier[1] { val };
}
else
{
val2.passiveStatModifiers = val2.passiveStatModifiers.Concat((IEnumerable<StatModifier>)(object)new StatModifier[1] { val }).ToArray();
}
return;
}
if (po is PassiveItem)
{
PassiveItem val3 = (PassiveItem)(object)((po is PassiveItem) ? po : null);
if (val3.passiveStatModifiers == null)
{
val3.passiveStatModifiers = (StatModifier[])(object)new StatModifier[1] { val };
}
else
{
val3.passiveStatModifiers = val3.passiveStatModifiers.Concat((IEnumerable<StatModifier>)(object)new StatModifier[1] { val }).ToArray();
}
return;
}
throw new NotSupportedException("Object must be of type PlayerItem or PassiveItem");
}
public static IEnumerator HandleDuration(PlayerItem item, float duration, PlayerController user, Action<PlayerController> OnFinish)
{
if (!item.IsCurrentlyActive)
{
SetPrivateType<PlayerItem>(item, "m_isCurrentlyActive", value: true);
SetPrivateType<PlayerItem>(item, "m_activeElapsed", 0f);
SetPrivateType<PlayerItem>(item, "m_activeDuration", duration);
item.OnActivationStatusChanged?.Invoke(item);
GetPrivateType<PlayerItem, float>(item, "m_activeElapsed");
GetPrivateType<PlayerItem, float>(item, "m_activeDuration");
while (GetPrivateType<PlayerItem, float>(item, "m_activeElapsed") < GetPrivateType<PlayerItem, float>(item, "m_activeDuration") && item.IsCurrentlyActive)
{
yield return null;
}
SetPrivateType<PlayerItem>(item, "m_isCurrentlyActive", value: false);
item.OnActivationStatusChanged?.Invoke(item);
OnFinish?.Invoke(user);
}
}
private static void SetPrivateType<T>(T obj, string field, bool value)
{
FieldInfo field2 = typeof(T).GetField(field, BindingFlags.Instance | BindingFlags.NonPublic);
field2.SetValue(obj, value);
}
private static void SetPrivateType<T>(T obj, string field, float value)
{
FieldInfo field2 = typeof(T).GetField(field, BindingFlags.Instance | BindingFlags.NonPublic);
field2.SetValue(obj, value);
}
private static T2 GetPrivateType<T, T2>(T obj, string field)
{
FieldInfo field2 = typeof(T).GetField(field, BindingFlags.Instance | BindingFlags.NonPublic);
return (T2)field2.GetValue(obj);
}
}
public static class ResourceExtractor
{
private static string spritesDirectory = Path.Combine(ETGMod.ResourcesDirectory, "sprites");
private static Assembly baseAssembly;
public static List<Texture2D> GetTexturesFromFolder(string folder)
{
string path = Path.Combine(spritesDirectory, folder);
if (!Directory.Exists(path))
{
return null;
}
List<Texture2D> list = new List<Texture2D>();
string[] files = Directory.GetFiles(path);
foreach (string path2 in files)
{
Texture2D item = BytesToTexture(File.ReadAllBytes(path2), Path.GetFileName(path2).Replace(".png", ""));
list.Add(item);
}
return list;
}
public static Texture2D GetTextureFromFile(string fileName)
{
fileName = fileName.Replace(".png", "");
string text = Path.Combine(spritesDirectory, fileName + ".png");
if (!File.Exists(text))
{
ETGModConsole.Log((object)("<color=#FF0000FF>" + text + " not found. </color>"), false);
return null;
}
return BytesToTexture(File.ReadAllBytes(text), fileName);
}
public static List<string> GetCollectionFiles()
{
List<string> list = new List<string>();
string[] files = Directory.GetFiles(spritesDirectory);
foreach (string text in files)
{
if (text.EndsWith(".png"))
{
list.Add(Path.GetFileName(text).Replace(".png", ""));
}
}
return list;
}
public static Texture2D BytesToTexture(byte[] bytes, string resourceName)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Expected O, but got Unknown
Texture2D val = new Texture2D(1, 1, (TextureFormat)4, false);
ImageConversion.LoadImage(val, bytes);
((Texture)val).filterMode = (FilterMode)0;
((Object)val).name = resourceName;
return val;
}
public static List<string> GetResourceFolders()
{
List<string> list = new List<string>();
string path = Path.Combine(ETGMod.ResourcesDirectory, "sprites");
if (Directory.Exists(path))
{
string[] directories = Directory.GetDirectories(path);
foreach (string path2 in directories)
{
list.Add(Path.GetFileName(path2));
}
}
return list;
}
public static byte[] ExtractEmbeddedResource(string filename)
{
if ((object)baseAssembly == null)
{
throw new NullReferenceException("Assembly not set! Did you call ItemBuilder.Init() ?");
}
using Stream stream = baseAssembly.GetManifestResourceStream(filename);
if (stream == null)
{
return null;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
return array;
}
public static Texture2D GetTextureFromResource(string resourceName)
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
string text = resourceName;
text = text.Replace("/", ".");
text = text.Replace("\\", ".");
byte[] array = ExtractEmbeddedResource(text);
if (array == null)
{
ETGModConsole.Log((object)("No bytes found in " + text), false);
return null;
}
Texture2D val = new Texture2D(1, 1, (TextureFormat)4, false);
ImageConversion.LoadImage(val, array);
((Texture)val).filterMode = (FilterMode)0;
string text2 = text.Substring(0, text.LastIndexOf('.'));
if (text2.LastIndexOf('.') >= 0)
{
text2 = text2.Substring(text2.LastIndexOf('.') + 1);
}
((Object)val).name = text2;
return val;
}
public static string[] GetResourceNames()
{
if ((object)baseAssembly == null)
{
throw new NullReferenceException("Assembly not set! Did you call ItemBuilder.Init() ?");
}
string[] manifestResourceNames = baseAssembly.GetManifestResourceNames();
if (manifestResourceNames == null)
{
ETGModConsole.Log((object)"No resources found.", false);
return null;
}
return manifestResourceNames;
}
public static void SetAssembly(Assembly assembly)
{
baseAssembly = assembly;
}
public static void SetAssembly(Type t)
{
baseAssembly = t.Assembly;
}
}
public static class SpriteBuilder
{
private static tk2dSpriteCollectionData itemCollection = ((BraveBehaviour)PickupObjectDatabase.GetById(155)).sprite.Collection;
private static tk2dSpriteCollectionData ammonomiconCollection = AmmonomiconController.ForceInstance.EncounterIconCollection;
private static tk2dSprite baseSprite = ((Component)PickupObjectDatabase.GetById(155)).GetComponent<tk2dSprite>();
public static GameObject SpriteFromFile(string spriteName, GameObject obj = null, bool copyFromExisting = true)
{
string fileName = spriteName.Replace(".png", "");
Texture2D textureFromFile = ResourceExtractor.GetTextureFromFile(fileName);
if ((Object)(object)textureFromFile == (Object)null)
{
return null;
}
return SpriteFromTexture(textureFromFile, spriteName, obj, copyFromExisting);
}
public static GameObject SpriteFromResource(string spriteName, GameObject obj = null, bool copyFromExisting = true)
{
string text = ((!spriteName.EndsWith(".png")) ? ".png" : "");
string text2 = spriteName + text;
Texture2D textureFromResource = ResourceExtractor.GetTextureFromResource(text2);
if ((Object)(object)textureFromResource == (Object)null)
{
return null;
}
return SpriteFromTexture(textureFromResource, text2, obj, copyFromExisting);
}
public static GameObject SpriteFromTexture(Texture2D texture, string spriteName, GameObject obj = null, bool copyFromExisting = true)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
if ((Object)(object)obj == (Object)null)
{
obj = new GameObject();
}
tk2dSprite val = ((!copyFromExisting) ? obj.AddComponent<tk2dSprite>() : obj.AddComponent<tk2dSprite>(baseSprite));
int num = AddSpriteToCollection(spriteName, itemCollection);
((tk2dBaseSprite)val).SetSprite(itemCollection, num);
((tk2dBaseSprite)val).SortingOrder = 0;
obj.GetComponent<BraveBehaviour>().sprite = (tk2dBaseSprite)(object)val;
FakePrefab.MarkAsFakePrefab(obj);
obj.SetActive(false);
return obj;
}
public static int AddSpriteToCollection(string resourcePath, tk2dSpriteCollectionData collection)
{
string text = ((!resourcePath.EndsWith(".png")) ? ".png" : "");
resourcePath += text;
Texture2D textureFromResource = ResourceExtractor.GetTextureFromResource(resourcePath);
tk2dSpriteDefinition val = ConstructDefinition(textureFromResource);
val.name = ((Object)textureFromResource).name;
return AddSpriteToCollection(val, collection);
}
public static int AddSpriteToCollection(tk2dSpriteDefinition spriteDefinition, tk2dSpriteCollectionData collection)
{
tk2dSpriteDefinition[] spriteDefinitions = collection.spriteDefinitions;
tk2dSpriteDefinition[] array = (collection.spriteDefinitions = spriteDefinitions.Concat((IEnumerable<tk2dSpriteDefinition>)(object)new tk2dSpriteDefinition[1] { spriteDefinition }).ToArray());
FieldInfo field = typeof(tk2dSpriteCollectionData).GetField("spriteNameLookupDict", BindingFlags.Instance | BindingFlags.NonPublic);
field.SetValue(collection, null);
collection.InitDictionary();
return array.Length - 1;
}
public static int AddToAmmonomicon(tk2dSpriteDefinition spriteDefinition)
{
return AddSpriteToCollection(spriteDefinition, ammonomiconCollection);
}
public static tk2dSpriteDefinition ConstructDefinition(Texture2D texture)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//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_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: 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_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: 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_0176: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Unknown result type (might be due to invalid IL or missing references)
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//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_0226: 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_026c: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_0281: Unknown result type (might be due to invalid IL or missing references)
//IL_0286: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: 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_02b7: Unknown result type (might be due to invalid IL or missing references)
//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
RuntimeAtlasSegment val = Assets.Packer.Pack(texture, false);
Material val2 = new Material(Shader.Find("tk2d/BlendVertexColor"));
val2.mainTexture = (Texture)(object)val.texture;
int width = ((Texture)texture).width;
int height = ((Texture)texture).height;
float num = 0f;
float num2 = 0f;
float num3 = (float)width / 16f;
float num4 = (float)height / 16f;
tk2dSpriteDefinition val3 = new tk2dSpriteDefinition();
val3.normals = (Vector3[])(object)new Vector3[4]
{
new Vector3(0f, 0f, -1f),
new Vector3(0f, 0f, -1f),
new Vector3(0f, 0f, -1f),
new Vector3(0f, 0f, -1f)
};
val3.tangents = (Vector4[])(object)new Vector4[4]
{
new Vector4(1f, 0f, 0f, 1f),
new Vector4(1f, 0f, 0f, 1f),
new Vector4(1f, 0f, 0f, 1f),
new Vector4(1f, 0f, 0f, 1f)
};
val3.texelSize = new Vector2(0.0625f, 0.0625f);
val3.extractRegion = false;
val3.regionX = 0;
val3.regionY = 0;
val3.regionW = 0;
val3.regionH = 0;
val3.flipped = (FlipMode)0;
val3.complexGeometry = false;
val3.physicsEngine = (PhysicsEngine)0;
val3.colliderType = (ColliderType)1;
val3.collisionLayer = (CollisionLayer)6;
val3.position0 = new Vector3(num, num2, 0f);
val3.position1 = new Vector3(num + num3, num2, 0f);
val3.position2 = new Vector3(num, num2 + num4, 0f);
val3.position3 = new Vector3(num + num3, num2 + num4, 0f);
val3.material = val2;
val3.materialInst = val2;
val3.materialId = 0;
val3.uvs = val.uvs;
val3.boundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f);
val3.boundsDataExtents = new Vector3(num3, num4, 0f);
val3.untrimmedBoundsDataCenter = new Vector3(num3 / 2f, num4 / 2f, 0f);
val3.untrimmedBoundsDataExtents = new Vector3(num3, num4, 0f);
tk2dSpriteDefinition val4 = val3;
val4.name = ((Object)texture).name;
return val4;
}
public static tk2dSpriteCollectionData ConstructCollection(string name)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
tk2dSpriteCollectionData val = new tk2dSpriteCollectionData();
Object.DontDestroyOnLoad((Object)(object)val);
val.assetName = name;
val.allowMultipleAtlases = false;
val.buildKey = 2782;
val.dataGuid = "what even is this for";
val.spriteCollectionGUID = name;
val.spriteCollectionName = name;
val.spriteDefinitions = (tk2dSpriteDefinition[])(object)new tk2dSpriteDefinition[0];
return val;
}
public static T GetCopyOf<T>(this Component comp, T other) where T : Component
{
Type type = ((object)comp).GetType();
if ((object)type != ((object)other).GetType())
{
return default(T);
}
PropertyInfo[] properties = type.GetProperties();
PropertyInfo[] array = properties;
foreach (PropertyInfo propertyInfo in array)
{
if (propertyInfo.CanWrite)
{
try
{
propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null);
}
catch
{
}
}
}
FieldInfo[] fields = type.GetFields();
FieldInfo[] array2 = fields;
foreach (FieldInfo fieldInfo in array2)
{
fieldInfo.SetValue(comp, fieldInfo.GetValue(other));
}
return (T)(object)((comp is T) ? comp : null);
}
public static T AddComponent<T>(this GameObject go, T toAdd) where T : Component
{
return ((Component)(object)go.AddComponent<T>()).GetCopyOf(toAdd);
}
}
}
namespace TenebroseItems
{
public class DragonBreath : PlayerItem
{
public GameObject flamesVfx;
public GameActorFireEffect fireEffect;
public static void Init()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
string text = "Fire Breath";
string resourcePath = "TenebroseItems/Resources/DragonBreath";
GameObject val = new GameObject(text);
DragonBreath dragonBreath = val.AddComponent<DragonBreath>();
ItemBuilder.AddSpriteToObject(text, resourcePath, val);
string shortDesc = "Dragon's Fury";
string longDesc = "Allows the holder to breathe a stream of controllable flames.\n\nIs the ability to breathe fire inherently magical, or purely biological in nature? Who knows... What is known however, is that breathing fire is really, really cool.";
ItemBuilder.SetupItem((PickupObject)(object)dragonBreath, shortDesc, longDesc, "spapi");
ItemBuilder.SetCooldownType((PlayerItem)(object)dragonBreath, ItemBuilder.CooldownType.Timed, 5.5f);
((PlayerItem)dragonBreath).consumable = false;
((PickupObject)dragonBreath).quality = (ItemQuality)(-50);
ref GameObject reference = ref dragonBreath.flamesVfx;
PickupObject byId = PickupObjectDatabase.GetById(384);
reference = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects.effects[0].effects[0].effect;
ref GameActorFireEffect reference2 = ref dragonBreath.fireEffect;
PickupObject byId2 = PickupObjectDatabase.GetById(295);
reference2 = ((BulletStatusEffectItem)((byId2 is BulletStatusEffectItem) ? byId2 : null)).FireModifierEffect;
}
public override void Update()
{
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: 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_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: 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)
((PlayerItem)this).Update();
if (!base.m_pickedUp || !base.m_isCurrentlyActive || !((Object)(object)base.LastOwner != (Object)null))
{
return;
}
BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(base.LastOwner.PlayerIDX);
if (!((Object)(object)instanceForPlayer == (Object)null))
{
for (int i = 0; i < 3; i++)
{
float num = 0f;
if ((float)i == 1f)
{
num = 5f;
}
else if ((float)i == 2f)
{
num = -5f;
}
GameObject val = SpawnManager.SpawnVFX(flamesVfx, Vector2.op_Implicit(((GameActor)base.LastOwner).CenterPosition), Quaternion.Euler(0f, 0f, BraveMathCollege.Atan2Degrees(Vector3Extensions.XY(base.LastOwner.unadjustedAimPoint) - ((GameActor)base.LastOwner).CenterPosition) + num));
val.transform.localScale = new Vector3(2.4f, 0.5f, 0f);
val.transform.parent = ((BraveBehaviour)base.LastOwner).transform;
SpeculativeRigidbody val2 = IterativeRaycast(((GameActor)base.LastOwner).CenterPosition, BraveMathCollege.DegreesToVector(BraveMathCollege.Atan2Degrees(Vector3Extensions.XY(base.LastOwner.unadjustedAimPoint) - ((GameActor)base.LastOwner).CenterPosition) + num, 1f), 11.2f, int.MaxValue, ((BraveBehaviour)base.LastOwner).specRigidbody);
if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)((BraveBehaviour)val2).aiActor) && ((BraveBehaviour)val2).aiActor.IsNormalEnemy)
{
((GameActor)((BraveBehaviour)val2).aiActor).ApplyEffect((GameActorEffect)(object)fireEffect, 1f, (Projectile)null);
}
}
base.LastOwner.IsGunLocked = true;
}
if (base.LastOwner.IsDodgeRolling)
{
((PlayerItem)this).DoActiveEffect(base.LastOwner);
}
}
protected SpeculativeRigidbody IterativeRaycast(Vector2 rayOrigin, Vector2 rayDirection, float rayDistance, int collisionMask, SpeculativeRigidbody ignoreRigidbody)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
int num = 0;
RaycastResult val = default(RaycastResult);
while (PhysicsEngine.Instance.Raycast(rayOrigin, rayDirection, rayDistance, ref val, true, true, collisionMask, (CollisionLayer?)(CollisionLayer)4, false, (Func<SpeculativeRigidbody, bool>)null, ignoreRigidbody))
{
num++;
SpeculativeRigidbody speculativeRigidbody = val.SpeculativeRigidbody;
if (num < 3 && (Object)(object)speculativeRigidbody != (Object)null)
{
MinorBreakable component = ((Component)speculativeRigidbody).GetComponent<MinorBreakable>();
if ((Object)(object)component != (Object)null)
{
component.Break(((Vector2)(ref rayDirection)).normalized * 3f);
RaycastResult.Pool.Free(ref val);
continue;
}
}
RaycastResult.Pool.Free(ref val);
return speculativeRigidbody;
}
return null;
}
public override void OnPreDrop(PlayerController user)
{
((PlayerItem)this).OnPreDrop(user);
if (base.m_isCurrentlyActive)
{
((PlayerItem)this).DoActiveEffect(user);
}
}
public override void DoActiveEffect(PlayerController user)
{
((PlayerItem)this).DoActiveEffect(user);
base.m_isCurrentlyActive = false;
user.IsGunLocked = false;
}
public override void DoEffect(PlayerController user)
{
AkSoundEngine.PostEvent("Play_BOSS_DragunGold_Roar_01", ((Component)this).gameObject);
base.m_isCurrentlyActive = true;
}
public override bool CanBeUsed(PlayerController user)
{
return ((PlayerItem)this).CanBeUsed(user) && (Object)(object)user != (Object)null && !user.IsDodgeRolling;
}
}
public class DragonHandController : GunBehaviour
{
public static void Init()
{
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: 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_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: 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_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: Unknown result type (might be due to invalid IL or missing references)
//IL_0283: Unknown result type (might be due to invalid IL or missing references)
Gun val = Databases.Items.NewGun("Firedrake Hand", "dragon_hand");
Game.Items.Rename("outdated_gun_mods:firedrake_hand", "spapi:firedrake_hand");
((Component)val).gameObject.AddComponent<DragonHandController>();
GunExt.SetShortDescription((PickupObject)(object)val, "Malevolent Flames");
GunExt.SetLongDescription((PickupObject)(object)val, "Tenebrose has always had a particular affinity for setting things ablaze, weather it be because he's biologically predisposed to, or perhaps he has an innate love for destruction. We would ask him, but we prefer our faces not to be melted off via purplish flame.");
GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "dragon_hand_idle_001", 8);
GunExt.SetAnimationFPS(val, val.shootAnimation, 16);
GunExt.SetAnimationFPS(val, val.reloadAnimation, 8);
PickupObject byId = PickupObjectDatabase.GetById(125);
GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
PickupObject byId2 = PickupObjectDatabase.GetById(125);
Projectile val2 = Object.Instantiate<Projectile>(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]);
((Component)val2).gameObject.SetActive(false);
FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
val2.damageTypes = (CoreDamageTypes)0;
val2.DefaultTintColor = new Color(0.5f, 0f, 1f);
val2.HasDefaultTint = true;
((Component)val2).GetComponent<PierceProjModifier>().penetration = 0;
Object.DontDestroyOnLoad((Object)(object)val2);
val.DefaultModule.projectiles[0] = val2;
val.DefaultModule.numberOfShotsInClip = 7;
val.reloadTime = 1.4f;
val.StarterGunForAchievement = true;
val.gunHandedness = (GunHandedness)3;
val.InfiniteAmmo = true;
val.muzzleFlashEffects.type = (VFXPoolType)0;
((PickupObject)val).quality = (ItemQuality)(-50);
((Component)val.barrelOffset).transform.localPosition = new Vector3(0.1875f, 0.1875f, 0f);
val.gunSwitchGroup = "BurningHand";
val.gunClass = (GunClass)30;
val2.FireApplyChance = 0.25f;
ProjectileData baseData = val2.baseData;
baseData.damage += 0.8f;
tk2dSpriteAnimationFrame[] frames = ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).frames;
foreach (tk2dSpriteAnimationFrame val3 in frames)
{
tk2dSpriteDefinition def = val3.spriteCollection.spriteDefinitions[val3.spriteId];
MakeOffset(def, new Vector2(0.1875f, 0.125f));
}
int num = 0;
tk2dSpriteAnimationFrame[] frames2 = ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).frames;
foreach (tk2dSpriteAnimationFrame val4 in frames2)
{
if (num == 1 || num == 6)
{
val4.triggerEvent = true;
val4.eventAudio = "Play_WPN_blasphemy_shot_01";
}
tk2dSpriteDefinition def2 = val4.spriteCollection.spriteDefinitions[val4.spriteId];
MakeOffset(def2, new Vector2(0.1875f, 0.125f));
num++;
}
tk2dSpriteAnimationFrame[] frames3 = ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).frames;
foreach (tk2dSpriteAnimationFrame val5 in frames3)
{
tk2dSpriteDefinition def3 = val5.spriteCollection.spriteDefinitions[val5.spriteId];
MakeOffset(def3, new Vector2(0.125f, 0f));
}
((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).frames[0].triggerEvent = true;
((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).frames[0].eventInfo = "extinguish";
((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).wrapMode = (WrapMode)1;
((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).loopStart = 1;
Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
}
public override void PostProcessProjectile(Projectile projectile)
{
((GunBehaviour)this).PostProcessProjectile(projectile);
float num = 1f;
float num2 = 5f;
float num3 = 0.5f;
float num4 = 1.5f;
float num5 = 13f;
int num6 = Random.Range(1, 7) + Random.Range(1, 7);
int num7 = Mathf.Clamp(num6, 1, 100);
float num8 = Mathf.Lerp(num3, num4, Mathf.Clamp01((float)num7 / num5));
float num9 = Mathf.Lerp(num, num2, Mathf.Clamp01((float)num7 / num5));
projectile.AdditionalScaleMultiplier *= num8;
ProjectileData baseData = projectile.baseData;
baseData.damage *= num9;
}
public static void MakeOffset(tk2dSpriteDefinition def, Vector2 offset)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: 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)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: 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_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: 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_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//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_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
float x = offset.x;
float y = offset.y;
def.position0 += new Vector3(x, y, 0f);
def.position1 += new Vector3(x, y, 0f);
def.position2 += new Vector3(x, y, 0f);
def.position3 += new Vector3(x, y, 0f);
def.boundsDataCenter += new Vector3(x, y, 0f);
def.boundsDataExtents += new Vector3(x, y, 0f);
def.untrimmedBoundsDataCenter += new Vector3(x, y, 0f);
def.untrimmedBoundsDataExtents += new Vector3(x, y, 0f);
}
}
[HarmonyPatch]
public class HeartOfFire : PassiveItem
{
private DamageTypeModifier m_fireImmunity;
public static void Init()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
string text = "Heart of Fire";
string resourcePath = "TenebroseItems/Resources/HeartOfFire";
GameObject val = new GameObject(text);
HeartOfFire heartOfFire = val.AddComponent<HeartOfFire>();
ItemBuilder.AddSpriteToObject(text, resourcePath, val);
string shortDesc = "Heat in Every Beat";
string longDesc = "Grants the user immunity to fire, the ability to double jump and increases damage to enemies on fire.\n\nEvery dragon is born with one and Tenebrose is no exception. Within the gungeon dragons are exceedingly rare in the upper levels which normally will make something like it's heart a commodity that would most likely sell for a small fortune. With that knowledge in retrospect, it wasn't such a good idea to come down here was it?";
ItemBuilder.SetupItem((PickupObject)(object)heartOfFire, shortDesc, longDesc, "spapi");
((PickupObject)heartOfFire).quality = (ItemQuality)(-50);
}
[HarmonyPatch(typeof(PlayerController), "CheckDodgeRollDepth")]
[HarmonyILManipulator]
public static void ExtraDodgeRoll_Transpiler(ILContext ctx)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: 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)
ILCursor val = new ILCursor(ctx);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 1)
}))
{
MethodInfo methodInfo = AccessTools.Method(typeof(HeartOfFire), "ExtraDodgeRoll_Add", (Type[])null, (Type[])null);
val.Emit(OpCodes.Ldloca, 1);
val.Emit(OpCodes.Ldarg_0);
val.Emit(OpCodes.Call, (MethodBase)methodInfo);
}
}
public static void ExtraDodgeRoll_Add(ref int current, PlayerController player)
{
if ((Object)(object)player == (Object)null || player.passiveItems == null)
{
return;
}
foreach (PassiveItem passiveItem in player.passiveItems)
{
if (!((Object)(object)passiveItem == (Object)null) && passiveItem is HeartOfFire)
{
current++;
}
}
}
public static bool CheckDodgeRollDepthHook(Func<PlayerController, bool> orig, PlayerController self)
{
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Invalid comparison between Unknown and I4
if (orig(self))
{
return true;
}
if (self.IsSlidingOverSurface && !self.DodgeRollIsBlink)
{
return !self.CurrentRoom.IsShop && (int)GameManager.Instance.CurrentLevelOverrideState != 2;
}
bool flag = PassiveItem.IsFlagSetForCharacter(self, typeof(PegasusBootsItem));
int num = ((!flag) ? 1 : 2);
if (flag && self.HasActiveBonusSynergy((CustomSynergyType)170, false))
{
num++;
}
foreach (PassiveItem passiveItem in self.passiveItems)
{
if ((Object)(object)passiveItem != (Object)null && passiveItem is HeartOfFire)
{
num++;
}
}
if (self.DodgeRollIsBlink)
{
num = 1;
}
return !self.IsDodgeRolling || self.m_currentDodgeRollDepth < num;
}
public override void Pickup(PlayerController player)
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
((PassiveItem)this).Pickup(player);
if ((Object)(object)((BraveBehaviour)player).healthHaver != (Object)null)
{
m_fireImmunity = new DamageTypeModifier
{
damageType = (CoreDamageTypes)4,
damageMultiplier = 0f
};
((BraveBehaviour)player).healthHaver.damageTypeModifiers.Add(m_fireImmunity);
}
player.OnDealtDamageContext += DidDamage;
}
private void DidDamage(PlayerController player, float damage, bool fatal, HealthHaver hh)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)((BraveBehaviour)hh).gameActor != (Object)null && ((BraveBehaviour)hh).gameActor.GetEffect("fire") != null && !hh.IsDead)
{
hh.ApplyDamage(damage / 2f, Vector2.zero, "Heart of Fire Extra Damage", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, false);
}
}
public override DebrisObject Drop(PlayerController player)
{
player.OnDealtDamageContext -= DidDamage;
if (m_fireImmunity != null && (Object)(object)((BraveBehaviour)player).healthHaver != (Object)null)
{
((BraveBehaviour)player).healthHaver.damageTypeModifiers.Remove(m_fireImmunity);
m_fireImmunity = null;
}
return ((PassiveItem)this).Drop(player);
}
}
[BepInPlugin("spapi.etg.tenebroseitems", "Tenebrose Items", "1.0.5")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public const string GUID = "spapi.etg.tenebroseitems";
public void Awake()
{
ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
}
public void GMStart(GameManager man)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new Harmony("spapi.etg.tenebroseitems").PatchAll();
FakePrefabHooks.Init();
ItemBuilder.Init();
HeartOfFire.Init();
DragonBreath.Init();
DragonHandController.Init();
}
}
}