Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Pale Architect v0.2.2
PaleArchitect/Pale Architect.dll
Decompiled 8 hours ago
The result has been truncated due to the large size, download it to view full contents!
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.Versioning; using System.Security; using System.Security.Permissions; using Architect.Behaviour.Custom; using Architect.Behaviour.Fixers; using Architect.Behaviour.Utility; using Architect.Config; using Architect.Config.Types; using Architect.Content; using Architect.Content.Preloads; using Architect.Events; using Architect.Events.Blocks; using Architect.Events.Blocks.Objects; using Architect.Objects.Categories; using Architect.Objects.Groups; using Architect.Objects.Placeable; using Architect.Utils; using BepInEx; using BepInEx.Configuration; using GlobalEnums; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using JetBrains.Annotations; using Microsoft.CodeAnalysis; using Pale_Architect.Fixers; using Pale_Architect.Groups; using Pale_Architect.Preloads; using Silksong.AssetHelper.ManagedAssets; using UnityEngine; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnitySceneRepacker; [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.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Pale Architect")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.2.2.0")] [assembly: AssemblyInformationalVersion("0.2.2")] [assembly: AssemblyProduct("Pale Architect")] [assembly: AssemblyTitle("PaleArchitect")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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; } } [CompilerGenerated] [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 BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Pale_Architect { [BepInPlugin("com.cometcake575.palearchitect", "PaleArchitect", "0.2.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PaleArchitectPlugin : BaseUnityPlugin { internal static PaleArchitectPlugin Instance; private void Awake() { Instance = this; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Pale Architect has loaded!"); ConfigEntry<string> val = ((BaseUnityPlugin)this).Config.Bind<string>("Source", "Path", UnitySceneRepackerPlugin.NextToThisGame("Hollow Knight"), "A path to a latest patch copy of Hollow Knight"); PaleManager.Init(val.Value); EnemyFixers.Init(); VanillaObjects.Init(); ParticleObjects.Init(); } private void Start() { ((MonoBehaviour)this).StartCoroutine(PaleManager.Process()); } } public static class ParticleObjects { public static void Init() { //IL_0045: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_0149: Unknown result type (might be due to invalid IL or missing references) Categories.Effects.Add(((PlaceableObject)new PaleObject("Falling Crystals", "falling_crystals_pale", ("Mines_31", "Pt Crystal Dropping (13)"), (string)null, (Action<GameObject>)null, (Action<GameObject>)MiscFixers.AddComponent<ParticleObject>, (Func<GameObject, GameObject>)null, ResourceUtils.LoadSpriteResource("falling_crystal", (FilterMode)1), (Sprite)null)).WithConfigGroup(ParticleObjects.Particle).WithInputGroup(InputGroup.Particles).WithReceiverGroup(ReceiverGroup.Particles)); Categories.Effects.Add(((PlaceableObject)new PaleObject("Dust Effect", "dust_effect_pale", ("Deepnest_East_16", "Giant Hopper Summon/Antic Dust 1"), (string)null, (Action<GameObject>)null, (Action<GameObject>)MiscFixers.AddComponent<ParticleObject>, (Func<GameObject, GameObject>)null, ResourceUtils.LoadSpriteResource("dust_particles", (FilterMode)1), (Sprite)null)).WithConfigGroup(ParticleObjects.Particle).WithInputGroup(InputGroup.Particles).WithReceiverGroup(ReceiverGroup.Particles)); Categories.Effects.Add(((PlaceableObject)new PaleObject("Rocks Effect", "rocks_effect_pale", ("Deepnest_East_16", "Giant Hopper Summon/Antic Rocks 1"), (string)null, (Action<GameObject>)null, (Action<GameObject>)MiscFixers.AddComponent<ParticleObject>, (Func<GameObject, GameObject>)null, ResourceUtils.LoadSpriteResource("rock_particles", (FilterMode)1), (Sprite)null)).WithConfigGroup(ParticleObjects.Particle).WithInputGroup(InputGroup.Particles).WithReceiverGroup(ReceiverGroup.Particles)); PaleManager.RegisterPale(new BasicPale("Menu_Title", "_GameCameras", delegate(GameObject o) { GameObject gameObject = ((Component)o.GetComponent<GameCameras>().sceneParticlesPrefab).gameObject; CreateParticleObject(gameObject, "Generic", "default_particles"); CreateParticleObject(gameObject, "Queen's Gardens", "royal_garden_particles"); CreateParticleObject(gameObject, "White Palace", "white_palace_particles"); CreateParticleObject(gameObject, "Dirtmouth", "town_particle_set"); CreateParticleObject(gameObject, "Kingdom's Edge", "outskirts_particles"); CreateParticleObject(gameObject, "Fungus", "fungus_particles"); CreateParticleObject(gameObject, "Crystal Peak", "mines_particles"); CreateParticleObject(gameObject, "Fog Canyon", "fog_canyon_particles"); CreateParticleObject(gameObject, "Waterways", "waterways_particles"); CreateParticleObject(gameObject, "City of Tears", "ruins_interior_particles"); CreateParticleObject(gameObject, "Dream", "dream_particles"); CreateParticleObject(gameObject, "Resting Grounds", "resting_grounds_particles"); CreateParticleObject(gameObject, "Hive", "hive_drip_particles"); CreateParticleObject(gameObject, "Fungal Wastes", "fungal_wastes_particles"); CreateParticleObject(gameObject, "Deepnest", "Deepnest Particles"); CreateParticleObject(gameObject, "Abyss", "abyss particles"); })); } private static void CreateParticleObject(GameObject particles, string name, string path) { //IL_007a: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown GameObject val = Object.Instantiate<GameObject>(((Component)particles.transform.Find(path)).gameObject); val.SetActive(false); Object.DontDestroyOnLoad((Object)(object)val); FollowCamera val2 = val.AddComponent<FollowCamera>(); val2.followX = true; val2.followY = true; val.AddComponent<ParticleObject>(); string text = path.ToLower().Replace(" ", "_"); CustomObject val3 = new CustomObject(name + " Effect", text + "_pale", val, "Affects the whole room.", (Action<GameObject>)null, ResourceUtils.LoadSpriteResource(text, (FilterMode)0, default(Vector4), 75.5f), (Sprite)null) { ParentScale = Vector3.one, LossyScale = Vector3.one, Offset = new Vector3(0f, 0f, 0f - Extensions.GetPositionZ(val.transform)) }; Categories.Effects.Add(((PlaceableObject)val3).WithConfigGroup(ParticleObjects.Particle).WithInputGroup(InputGroup.Particles).WithReceiverGroup(ReceiverGroup.Particles)).DoIgnoreScale(); } } public static class ResourceUtils { internal static Sprite LoadSpriteResource(string spritePath, FilterMode filterMode = (FilterMode)1, Vector4 border = default(Vector4), float ppu = 100f) { //IL_000c: 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_0012: Unknown result type (might be due to invalid IL or missing references) return LoadSpriteResource(spritePath, new Vector2(0.5f, 0.5f), filterMode, border, ppu); } internal static Sprite LoadSpriteResource(string spritePath, Vector2 pivot, FilterMode filterMode = (FilterMode)1, Vector4 border = default(Vector4), float ppu = 100f) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //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_009c: Unknown result type (might be due to invalid IL or missing references) string name = "Pale_Architect.Resources." + spritePath + ".png"; Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(name); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, array, true); ((Texture)val).wrapMode = (TextureWrapMode)1; Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), pivot, ppu, 0u, (SpriteMeshType)1, border); ((Texture)val2.texture).filterMode = filterMode; return val2; } } public static class VanillaObjects { public static void Init() { AddCrossroadsObjects(); AddGreenObjects(); AddWastesObjects(); AddDeepnestObjects(); AddCanyonObjects(); AddCityObjects(); AddWaterwaysObjects(); AddPeakObjects(); AddGardensObjects(); AddEdgeObjects(); AddColosseumObjects(); AddHiveObjects(); AddGroundsObjects(); AddBasinObjects(); AddDreamObjects(); AddGrimmObjects(); AddWpObjects(); AddAbyssObjects(); AddGhostObjects(); AddOrdealObjects(); AddGodObjects(); AddMiscObjects(); } private static void AddCrossroadsObjects() { //IL_08ab: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) Categories.Interactable.Add((PlaceableObject)(object)new PaleObject("Lever", "basic_lever", ("Room_Town_Stag_Station", "Gate Switch"), null, MiscFixers.FixLever)).WithConfigGroup(ConfigGroup.Levers).WithBroadcasterGroup(BroadcasterGroup.Levers) .WithRotationGroup((RotationGroup)4); Categories.Interactable.Add((PlaceableObject)(object)new PaleObject("Station Bell", "station_bell", ("Room_Town_Stag_Station", "Station Bell"), null, MiscFixers.FixStationBell, delegate(GameObject o) { o.GetComponent<tk2dSpriteAnimator>().defaultClipId = 0; })).WithBroadcasterGroup(BroadcasterGroup.Activatable); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Infected Blob S", "i_blob_1", ("Crossroads_07", "Infected Parent/infected_large_blob_010000"), null, null, MiscFixers.BreakableZ)); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Infected Blob L", "i_blob_2", ("Crossroads_07", "Infected Parent/infected_large_blob_030000 (1)"), null, null, MiscFixers.BreakableZ)); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Infected Drip", "i_drip", ("Crossroads_07", "Infected Parent/infected_orange_drip_020000 (3)"), null, null, MiscFixers.BreakableZ)); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Infected Vine", "i_vine", ("Crossroads_07", "Infected Parent/infected_vine_01"), null, null, MiscFixers.BreakableZ)); Categories.Hazards.Add((PlaceableObject)(object)new PaleObject("Falling Stalactite", "falling_stalactite", ("Tutorial_01", "_Props/Stalactite Hazard"))); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Cave Spikes", "cave_spikes", ("Mines_31", "Cave Spikes (4)"), null, null, MiscFixers.FixRotation)).WithRotationGroup((RotationGroup)4)); AddSolid("Crossroads Platform 1", "plat_generic_1", ("Tutorial_01", "_Scenery/plat_float_01")); AddSolid("Crossroads Platform 2", "plat_generic_2", ("Tutorial_01", "_Scenery/plat_float_07")); AddSolid("Crossroads Platform 3", "plat_generic_3", ("Tutorial_01", "_Scenery/plat_float_08")); AddSolid("Crossroads Platform 4", "plat_generic_4", ("Tutorial_01", "_Scenery/plat_float_10")); AddSolid("Crossroads Platform 5", "plat_generic_5", ("Tutorial_01", "_Scenery/plat_float_14")); AddSolid("Lift Platform 1", "plat_lift_1", ("Crossroads_07", "_Scenery/plat_lift_06")); AddSolid("Lift Platform 2", "plat_lift_2", ("Crossroads_07", "_Scenery/plat_lift_05")); AddEnemy("Tiktik", "tiktik", ("Crossroads_07", "_Enemies/Climber 3")).WithRotationGroup((RotationGroup)3); AddEnemy("Gruzzer", "gruzzer", ("Crossroads_07", "Uninfected Parent/Fly")); AddEnemy("Crawlid", "crawlid", ("Crossroads_07", "_Enemies/Crawler")); AddEnemy("Vengefly", "vengefly", ("Crossroads_16", "Uninfected Parent/Buzzer")); AddEnemy("Vengefly King", "vengefly_king", ("GG_Vengefly", "Giant Buzzer Col"), null, null, EnemyFixers.FixVengeflyKing); AddEnemy("Wandering Husk", "wandering_husk", ("Crossroads_21", "non_infected_event/Zombie Runner")); AddEnemy("Husk Bully", "husk_bully", ("Crossroads_21", "Zombie Barger")); AddEnemy("Leaping Husk", "leaping_husk", ("Crossroads_21", "non_infected_event/Zombie Leaper")); AddEnemy("Husk Hornhead", "husk_hornhead", ("Crossroads_16", "_Enemies/Zombie Hornhead")); AddEnemy("Husk Warrior", "husk_warrior", ("Crossroads_15", "_Enemies/Zombie Shield")); AddEnemy("Husk Guard", "husk_guard", ("Crossroads_21", "non_infected_event/Zombie Guard")); AddEnemy("Maggot", "maggot", ("Crossroads_10_boss_defeated", "Prayer Room/Prayer Slug")); AddEnemy("Baldur", "baldur", ("Crossroads_ShamanTemple", "_Enemies/Roller")); AddEnemy("Volatile Gruzzer", "volatile_gruzzer", ("Crossroads_07", "Infected Parent/Bursting Bouncer")); AddEnemy("Furious Vengefly", "furious_vengefly", ("Crossroads_16", "infected_event/Angry Buzzer")); AddEnemy("Violent Husk", "violent_husk", ("Crossroads_21", "infected_event/Bursting Zombie")); AddEnemy("Slobbering Husk", "slobbering_husk", ("Crossroads_15", "Infected Parent/Spitting Zombie")); AddEnemy("Elder Baldur", "elder_baldur", ("Crossroads_ShamanTemple", "Battle Scene/Blocker"), null, null, EnemyFixers.FixElderBaldur).WithFlipAction((Action<GameObject, bool>)EnemyFixers.FlipElderBaldur); AddEnemy("Menderbug", "menderbug", ("Crossroads_01", "_Scenery/Mender Bug"), null, null, EnemyFixers.FixMenderbug); AddEnemy("Aspid Hunter", "aspid_hunter", ("Crossroads_19", "_Enemies/Spitter")); AddEnemy("Aspid Mother", "aspid_mother", ("Crossroads_19", "_Enemies/Hatcher"), null, null, EnemyFixers.FixAspidMother).WithScaleAction((Action<GameObject, float>)EnemyFixers.ScaleHatcher); AddEnemy("Aspid Hatchling", "aspid_hatchling", ("Crossroads_19", "Hatcher Cage (1)/Hatcher Baby Spawner"), null, null, EnemyFixers.FixHatchling); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Bone Gate", "bone_gate", ("Crossroads_ShamanTemple", "Bone Gate"), null, delegate(GameObject o) { FsmUtils.DisableAction(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Bone Gate"), "Idle"), 2); })).WithReceiverGroup(ReceiverGroup.BoneGate)); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Collapser", "collapser_1", ("Crossroads_36", "_Props/Collapser Small 1"))).WithConfigGroup(ConfigGroup.PersistentBreakable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Breakable Door", "breakable_door_1", ("Crossroads_07", "_Props/Tute Door 1"))).WithConfigGroup(ConfigGroup.PersistentBreakable).WithRotationGroup((RotationGroup)3)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Breakable Wall 1", "breakable_wall_1", ("Mines_25", "Breakable Wall"), null, null, MiscFixers.FixBreakableWall)).WithConfigGroup(ConfigGroup.PersistentBreakable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Breakable Wall 2", "breakable_wall_3", ("Mines_16", "Breakable Wall"), null, null, MiscFixers.FixBreakableWall)).WithConfigGroup(ConfigGroup.PersistentBreakable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("One Way Wall", "one_way_wall_1", ("Cliffs_02", "One Way Wall"), null, null, null, null, null, ResourceUtils.LoadSpriteResource("one_way_wall", (FilterMode)1))).WithConfigGroup(ConfigGroup.PersistentBreakable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Breakable Floor", "breakable_floor_1", ("Crossroads_04", "_Scenery/Break Floor 1"), null, null, null, null, null, ResourceUtils.LoadSpriteResource("breakable_floor", (FilterMode)1))).WithConfigGroup(ConfigGroup.PersistentBreakable)); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Goam", "goam", ("Crossroads_12", "_Enemies/Worm"))).WithRotationGroup((RotationGroup)3).WithConfigGroup(ConfigGroup.Goams)); AddEnemy("Gruz Mother", "gruz_mother", ("Crossroads_04", "_Enemies/Giant Fly"), null, null, EnemyFixers.FixGruzMother).WithConfigGroup(ConfigGroup.GruzMother).WithReceiverGroup(ReceiverGroup.Wakeable); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Zote Head", "zote_head", ("Fungus1_20_v02", "Zote Death/Head"), null, null, MiscFixers.FixZoteHead)).WithConfigGroup(ConfigGroup.ZoteHead).WithBroadcasterGroup(BroadcasterGroup.ZoteHead)); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Grubfather", "grubfather", ("Crossroads_38", "Fat Grub King"), null, null, delegate(GameObject o) { ((Behaviour)FSMUtility.LocateMyFSM(o, "FSM")).enabled = false; })); Categories.Misc.Add(((PlaceableObject)new PaleObject("Breakable Barrel", "brk_barrel_1", ("Crossroads_07", "_Scenery/brk_barrel_05"))).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Breakable Cart", "brk_cart_1", ("Crossroads_07", "_Scenery/brk_cart_05"))).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Horned Statue", "statue_horned", ("Crossroads_47", "_Props/Crossroads Statue Horned"), null, null, MiscFixers.BreakableZ)).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Stone Statue", "statue_stone", ("Crossroads_47", "_Props/Crossroads Statue Stone"), null, null, MiscFixers.BreakableZ)).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Grub Bottle", "grub_bottle", ("Crossroads_31", "Grub Bottle"), null, MiscFixers.FixGrubBottle)).WithConfigGroup(ConfigGroup.GrubBottle).WithBroadcasterGroup(BroadcasterGroup.PersistentBreakable)); AddEnemy("Grub Mimic", "grub_mimic", ("Mines_16", "Grub Mimic Top/Grub Mimic")); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Macebug", "macebug", ("GG_False_Knight", "Battle Scene/False Knight New/Staff/Staff Head"), null, null, null, (GameObject o) => FsmUtils.GetAction<CreateObject>(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Mace Control"), "State 2"), 1).gameObject.Value)); AddEnemy("False Knight", "false_knight", ("GG_False_Knight", "Battle Scene/False Knight New"), null, delegate(GameObject o) { ((Renderer)o.GetComponent<MeshRenderer>()).enabled = true; o.GetComponent<tk2dSpriteAnimator>().defaultClipId = 0; }, EnemyFixers.FixFk).WithConfigGroup(ConfigGroup.FalseKnight); AddEnemy("Failed Champion", "failed_champion", ("GG_Failed_Champion", "False Knight Dream"), null, delegate(GameObject o) { ((Renderer)o.GetComponent<MeshRenderer>()).enabled = true; o.GetComponent<tk2dSpriteAnimator>().defaultClipId = 0; }, EnemyFixers.FixFk).WithConfigGroup(ConfigGroup.FalseKnight); } private static void AddGreenObjects() { Categories.Interactable.Add(((PlaceableObject)new PaleObject("Toll Gate", "toll_gate", ("Fungus1_31", "Toll Gate"))).WithReceiverGroup(ReceiverGroup.TollGate)); AddEnemy("Squit", "squit", ("Fungus1_22", "Mosquito")); AddEnemy("Fool Eater", "fool_eater", ("Fungus1_22", "Plant Trap")).WithRotationGroup((RotationGroup)3); AddEnemy("Gulka", "gulka", ("Fungus1_12", "Plant Turret")).WithRotationGroup((RotationGroup)4); AddEnemy("Maskfly", "maskfly", ("Fungus1_12", "Pigeon")); AddEnemy("Moss Charger", "moss_charger", ("Fungus1_17", "Moss Charger")); AddEnemy("Massive Moss Charger", "massive_moss_charger", ("GG_Mega_Moss_Charger", "Mega Moss Charger"), null, null, EnemyFixers.FixMassiveMossCharger).WithScaleAction((Action<GameObject, float>)EnemyFixers.ScaleMassiveMossCharger).WithReceiverGroup(ReceiverGroup.Wakeable).WithConfigGroup(ConfigGroup.Wakeable); AddEnemy("Durandoo", "durandoo", ("Fungus1_12", "Acid Walker")); AddEnemy("Duranda", "duranda", ("Fungus1_09", "Acid Flyer")).WithConfigGroup(ConfigGroup.Duranda); AddEnemy("Mosskin", "mosskin", ("Fungus1_31", "_Enemies/Mossman_Runner")); AddEnemy("Volatile Mosskin", "volatile_mosskin", ("Fungus1_22", "Mossman_Shaker")); AddEnemy("Moss Knight", "moss_knight", ("Fungus1_32", "Moss Knight C"), null, MiscFixers.AddComponent<EnemyFixers.MossKnight>).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); AddAttack("Moss Bullet", "moss_bullet", ("Fungus1_32", "Moss Knight C"), "Moss Knight Control", "Shoot", 2).WithConfigGroup(ConfigGroup.Velocity).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity); AddEnemy("Mosscreep", "mosscreep", ("Fungus1_22", "Moss Walker")); AddEnemy("Obble", "obble", ("Fungus1_31", "_Enemies/Fat Fly (1)")); AddEnemy("Hornet Protector", "hornet_protector_boss", ("GG_Hornet_1", "Boss Holder/Hornet Boss 1"), null, null, EnemyFixers.FixHornetProtector); AddEnemy("Hornet Sentinel", "hornet_sentinel_boss", ("GG_Hornet_2", "Boss Holder/Hornet Boss 2"), null, delegate(GameObject o) { ((Renderer)o.GetComponent<MeshRenderer>()).enabled = true; }, EnemyFixers.FixHornetSentinel); } private static void AddCanyonObjects() { Categories.Hazards.Add(((PlaceableObject)new PaleObject("Jelly Egg Bomb", "jelly_egg_bomb", ("Fungus3_26", "Jelly Egg Bomb"))).WithReceiverGroup(ReceiverGroup.JellyEgg)); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Charged Lumaflies", "charged_lumaflies", ("Fungus3_26", "Zap Cloud"))).WithConfigGroup(ConfigGroup.ChargedLumaflies)); AddEnemy("Ooma", "ooma", ("Fungus3_26", "Jellyfish")); AddEnemy("Uoma", "uoma", ("Fungus3_26", "Jellyfish Baby")); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Ooma Core", "ooma_core", ("Fungus3_26", "Jellyfish"), null, null, MiscFixers.FixOomaCore, (GameObject o) => ((CreateObject)FsmUtils.GetState(FSMUtility.LocateMyFSM(o.GetComponent<EnemyDeathEffects>().corpsePrefab, "corpse"), "Explode").actions[3]).gameObject.value)).WithConfigGroup(ConfigGroup.OomaCore)); AddSolid("Fog Canyon Platform 1", "fog_plat_1", ("Fungus3_26", "fung_plat_float_01")); AddSolid("Fog Canyon Platform 2", "fog_plat_2", ("Fungus3_26", "fung_plat_float_04")); AddSolid("Fog Canyon Platform 4", "fog_plat_4", ("Fungus3_26", "fung_plat_float_06")); AddSolid("Archives Platform 1", "archive_plat_1", ("Fungus3_archive_02", "fung temple_plat_float_small")); AddSolid("Archives Platform 2", "archive_plat_2", ("Fungus3_archive_02", "fung_temple_plat_float (1)")); AddEnemy("Uumuu", "uumuu", ("GG_Uumuu", "Mega Jellyfish GG"), null, null, EnemyFixers.Uumuu); } private static void AddWastesObjects() { AddSolid("Fungal Wastes Platform 1", "wastes_plat_1", ("Fungus2_04", "mush_plat_float_01")); AddSolid("Fungal Wastes Platform 2", "wastes_plat_2", ("Fungus2_18", "_Scenery/mush_plat_float_03")); AddSolid("Fungal Wastes Platform 3", "wastes_plat_3", ("Fungus2_18", "_Scenery/mush_plat_float_04")); AddSolid("Fungal Wastes Platform 4", "wastes_plat_4", ("Fungus2_04", "mush_plat_float_05")); AddEnemy("Fungified Husk", "fungified_husk_a", ("Fungus2_18", "Zombie Fungus A")); AddEnemy("Shrumal Ogre", "shrumal_ogre", ("Fungus2_05", "Battle Scene v2/Completed/Mushroom Brawler"), null, MiscFixers.AddComponent<EnemyFixers.ShrumalOgre>).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); AddEnemy("Shrumeling", "shrumeling", ("Fungus2_05", "Battle Scene v2/Completed/Mushroom Baby")); AddEnemy("Fungling", "fungling", ("Fungus2_18", "_Scenery/Fungoon Baby")); AddEnemy("Fungoon", "fungoon", ("Fungus2_18", "_Scenery/Fungus Flyer")); AddEnemy("Shrumal Warrior", "shrumal_warrior", ("Fungus2_28", "Mushroom Roller")); AddEnemy("Ambloom", "ambloom", ("Fungus2_18", "Fung Crawler")); AddEnemy("Sporg", "sporg", ("Fungus2_04", "Mushroom Turret"), null, delegate(GameObject o) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) Extensions.SetRotation2D(o.transform, 0f); ((Collider2D)((Component)o.transform.Find("Hero Detect")).GetComponent<BoxCollider2D>()).offset = new Vector2(-1.9367f, 4.4328f); }).WithRotationGroup((RotationGroup)4).WithConfigGroup(ConfigGroup.Sporg); AddAttack("Sporg Bullet", "sporg_bullet", ("Fungus2_04", "Mushroom Turret"), "Shroom Turret", "Fire", 2, MiscFixers.FixSporgBullet).WithConfigGroup(ConfigGroup.SporgBullet); AddEnemy("Mantis", "mantis", ("Fungus2_12", "Mantis")).WithConfigGroup(ConfigGroup.Mantis); AddEnemy("Mantis Youth", "mantis_youth", ("Fungus2_12", "Mantis Flyer Child")).WithConfigGroup(ConfigGroup.MantisChild); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Mantis Lever", "mantis_lever", ("Fungus2_04", "Mantis Lever"), null, MiscFixers.FixLever)).WithBroadcasterGroup(BroadcasterGroup.Levers).WithConfigGroup(ConfigGroup.Levers)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Mantis Gate", "mantis_gate", ("Fungus2_04", "Mantis Gate"))).WithReceiverGroup(ReceiverGroup.MantisGate)); AddEnemy("Mantis Lord", "mantis_lord", ("GG_Mantis_Lords", "Mantis Battle/Battle Main/Mantis Lord"), null, null, EnemyFixers.FixMantisLord); } private static void AddDeepnestObjects() { AddEnemy("Corpse Creeper (Wandering Husk)", "corpse_creeper_a", ("Deepnest_33", "Zombie Runner Sp (1)")); AddEnemy("Corpse Creeper (Husk Hornhead)", "corpse_creeper_b", ("Deepnest_33", "Zombie Hornhead Sp (2)")); AddEnemy("Dirtcarver", "dirtcarver", ("Deepnest_17", "Baby Centipede")).SpritePreview = true; AddEnemy("Carver Hatcher", "carver_hatcher", ("Deepnest_26b", "Centipede Hatcher (4)"), null, null, EnemyFixers.FixCarverHatcher).WithScaleAction((Action<GameObject, float>)EnemyFixers.ScaleHatcher); AddEnemy("Flukemarm", "flukemarm", ("GG_Flukemarm", "Fluke Mother"), null, null, EnemyFixers.FixFlukemarm).WithScaleAction((Action<GameObject, float>)EnemyFixers.ScaleHatcher).WithReceiverGroup(ReceiverGroup.Wakeable).WithConfigGroup(ConfigGroup.Wakeable); AddEnemy("Little Weaver", "little_weaver", ("Deepnest_41", "Spider Flyer")).WithConfigGroup(ConfigGroup.LittleWeaver); AddEnemy("Deepling", "deepling", ("Deepnest_Spider_Town", "Tiny Spider"), null, MiscFixers.KeepActive); AddEnemy("Deephunter", "deephunter", ("Deepnest_Spider_Town", "Spider Mini"), null, delegate(GameObject o) { MiscFixers.KeepActive(o); MiscFixers.FixRotation(o); }).WithRotationGroup((RotationGroup)3); AddEnemy("Stalking Devout", "stalking_devout", ("Deepnest_Spider_Town", "Slash Spider"), null, MiscFixers.KeepActive); AddEnemy("Bluggsac", "bluggsac", ("Deepnest_Spider_Town", "Egg Sac")); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Garpede", "garpede", ("Deepnest_37", "Big Centipede (2)"), null, preloadAction: EnemyFixers.FixGarpede, postSpawnAction: EnemyFixers.PostFixGarpede)).WithConfigGroup(ConfigGroup.Garpede).WithFlipAction((Action<GameObject, bool>)delegate(GameObject o, bool f) { if (f) { Extensions.SetScaleY(o.transform, 0f - Extensions.GetScaleY(o.transform)); Extensions.SetRotation2D(o.transform, Extensions.GetRotation2D(o.transform) + 180f); } }).WithRotationGroup((RotationGroup)4)); AddEnemy("Nosk", "nosk", ("GG_Nosk", "Mimic Spider"), null, delegate(GameObject o) { ObjectUtils.DisableChild(o.transform, new int[1] { 1 }); ((Renderer)o.GetComponent<MeshRenderer>()).enabled = true; }, EnemyFixers.FixNosk).WithConfigGroup(ConfigGroup.Wakeable); } private static void AddWaterwaysObjects() { AddEnemy("Hwurmp", "hwurmp", ("Waterways_01", "_Enemies/Inflater")); AddEnemy("Pilflip", "pilflip", ("Waterways_01", "_Enemies/Flip Hopper")); AddEnemy("Flukefey", "flukefey", ("GG_Pipeway", "Fluke Fly")); AddEnemy("Flukemon", "flukemon", ("GG_Pipeway", "Flukeman")); AddEnemy("Flukemunga", "flukemunga", ("GG_Pipeway", "Fat Fluke")); } private static void AddCityObjects() { Categories.Misc.Add(((PlaceableObject)new PaleObject("Standing Lantern", "lantern_stand_1", ("Fungus1_31", "_Scenery/fung_lamp2"), null, null, MiscFixers.BreakableZ)).WithBroadcasterGroup(BroadcasterGroup.Breakable)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Ceiling Lantern", "lantern_ceil_1", ("Ruins_House_02", "ruind_dressing_light_03"), null, null, MiscFixers.BreakableZ)).WithBroadcasterGroup(BroadcasterGroup.Breakable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Reusable Lever", "reusable_lever", ("Ruins1_03", "Lift Call Lever"), null, InteractableFixers.FixReusableLever)).WithRotationGroup((RotationGroup)4).WithBroadcasterGroup(BroadcasterGroup.Activatable)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("City Lever", "city_lever", ("Ruins2_01", "Ruins Lever"), null, preloadAction: MiscFixers.FixRotation, postSpawnAction: MiscFixers.FixLever)).WithBroadcasterGroup(BroadcasterGroup.Levers).WithConfigGroup(ConfigGroup.Levers).WithRotationGroup((RotationGroup)4)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Battle Gate", "battle_gate", ("Ruins2_01", "Battle Gate"))).WithConfigGroup(ConfigGroup.BattleGate).WithReceiverGroup(ReceiverGroup.BattleGate)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Dream Battle Gate", "dream_battle_gate", ("Dream_03_Infected_Knight", "Dream Gate"), null, delegate(GameObject o) { FsmUtils.DisableAction(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Close"), 3); }, delegate(GameObject o) { o.GetComponent<tk2dSpriteAnimator>().defaultClipId = 1; })).WithReceiverGroup(ReceiverGroup.DreamGate).WithConfigGroup(ConfigGroup.DreamGate)); Categories.Interactable.Add(((PlaceableObject)new PaleObject("City Gate", "city_gate", ("Ruins2_01", "Ruins Gate 2"))).WithReceiverGroup(ReceiverGroup.CityGate)); Categories.Hazards.Add((PlaceableObject)(object)new PaleObject("Roof Spikes", "roof_spikes", ("Ruins2_08", "ruind_bridge_roof_01 (1)/ruind_bridge_roof_04_spikes"))); AddSolid("City Platform 1", "plat_city_1", ("Ruins1_03", "_Scenery/ruin_plat_float_01")); AddSolid("City Platform 2", "plat_city_2", ("Ruins1_03", "_Scenery/ruin_plat_float_01_wide")); AddSolid("City Platform 3", "plat_city_3", ("Ruins1_03", "_Scenery/ruin_plat_float_02")); AddSolid("City Platform 4", "plat_city_4", ("Ruins1_03", "_Scenery/ruin_plat_float_05")); AddSolid("Fancy Platform 1", "plat_fancy_1", ("Ruins2_01", "ruins_mage_building_0011_a_royal_plat")); AddSolid("Fancy Platform 2", "plat_fancy_2", ("Ruins2_01", "ruins_plat_royal_02")); AddEnemy("Husk Sentry", "husk_sentry", ("Ruins2_01", "Ruins Sentry 1")); AddEnemy("Winged Sentry", "winged_sentry", ("Ruins2_01", "Ruins Flying Sentry")); AddEnemy("Lance Sentry", "lance_sentry", ("Ruins2_01", "Ruins Flying Sentry Javelin")); AddAttack("Javelin", "lance_sentry_javelin", ("Ruins2_01", "Ruins Flying Sentry Javelin"), "Flying Sentry Javelin", "Throw", 1).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity).WithConfigGroup(ConfigGroup.Velocity); AddEnemy("Heavy Sentry", "heavy_sentry", ("Ruins2_01", "Ruins Sentry Fat")); AddEnemy("Cowardly Husk", "cowardly_husk", ("Ruins2_01", "Royal Zombie Coward (1)")); AddEnemy("Husk Dandy", "husk_dandy", ("Ruins2_01", "Royal Zombie 1 (1)")); AddEnemy("Gluttonous Husk", "gluttonous_husk", ("Ruins2_01", "Royal Zombie Fat (2)")); AddEnemy("Great Husk Sentry", "great_husk_sentry", ("Ruins2_01", "Battle Scene/Great Shield Zombie")); AddEnemy("Gorgeous Husk", "gorgeous_husk", ("Ruins_House_02", "Gorgeous Husk")); AddEnemy("Mistake", "mistake", ("Ruins1_30", "Mage Blob 1"), null, MiscFixers.AddComponent<EnemyFixers.Mistake>).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); AddEnemy("Folly", "folly", ("Ruins1_30", "Mage Balloon"), null, MiscFixers.AddComponent<EnemyFixers.Folly>).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); AddEnemy("Volt Twister", "volt_twister", ("Room_Colosseum_Gold", "Colosseum Manager/Waves/Wave 25/Electric Mage New"), null, null, EnemyFixers.FixVoltTwister).WithConfigGroup(ConfigGroup.Teleplane); AddEnemy("Soul Twister", "soul_twister", ("Ruins1_30", "Mage"), null, null, EnemyFixers.FixSoulTwister).WithConfigGroup(ConfigGroup.Teleplane).SpritePreview = true; AddAttack("Soul Orb", "soul_orb", ("Ruins1_30", "Mage"), "Mage", "Fire", 0, delegate(GameObject o) { tk2dSpriteAnimator component = o.GetComponent<tk2dSpriteAnimator>(); component.defaultClipId = component.GetClipIdByName("Orb Idle"); }).WithScaleAction((Action<GameObject, float>)MiscFixers.ScaleSoulOrb); AddEnemy("Soul Warrior", "soul_warrior", ("GG_Mage_Knight", "Mage Knight"), null, null, EnemyFixers.FixSoulWarrior).SpritePreview = true; AddEnemy("Watcher Knight", "watcher_knight", ("GG_Watcher_Knights", "Battle Control/Black Knight 1"), null, EnemyFixers.FixWatcherKnight).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); } private static void AddPeakObjects() { AddEnemy("Shardmite", "shardmite", ("Mines_20", "Mines Crawler"), null, MiscFixers.FixRotation).WithRotationGroup((RotationGroup)3).WithRotateAction((Action<GameObject, float>)EnemyFixers.RotateShardmite); AddEnemy("Glimback", "glimback", ("Mines_20", "Crystal Crawler")); AddEnemy("Crystal Crawler", "crystal_crawler", ("Mines_20", "Crystallised Lazer Bug (3)"), null, EnemyFixers.FixCrystalCrawler).WithRotationGroup((RotationGroup)3); AddEnemy("Crystal Hunter", "crystal_hunter", ("Mines_25", "Crystal Flyer")); AddAttack("Crystal Bullet", "crystal_bullet", ("Mines_25", "Crystal Flyer"), "Crystal Flyer", "Fire", 3).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity).WithConfigGroup(ConfigGroup.Velocity); AddEnemy("Husk Miner", "husk_miner", ("Mines_20", "Zombie Miner 1")); AddAttack("Pickaxe", "husk_miner_pick", ("Mines_20", "Zombie Miner 1"), "Zombie Miner", "Spawn Bullet R", 0).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity).WithConfigGroup(ConfigGroup.Velocity); AddEnemy("Husk Myla", "husk_myla", ("Crossroads_45", "Zombie Myla"), null, MiscFixers.KeepActive); AddEnemy("Crystallised Husk", "crystallised_husk", ("Mines_25", "Zombie Beam Miner")); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Laser Crystal", "laser_crystal", ("Mines_31", "Laser Turret"), null, delegate(GameObject o) { FsmUtils.DisableAction(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Laser Bug"), "Idle"), 2); }, MiscFixers.FixRotation)).WithConfigGroup(ConfigGroup.LaserCrystal).WithRotationGroup((RotationGroup)4).WithScaleAction((Action<GameObject, float>)delegate(GameObject o, float s) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) Transform transform = o.transform; transform.localScale *= s; Transform val = o.transform.Find("Beam"); if (Object.op_Implicit((Object)(object)val)) { PlayMakerFSM component = ((Component)val).GetComponent<PlayMakerFSM>(); if (Object.op_Implicit((Object)(object)component)) { FsmFloat divideBy = ((FloatDivide)FsmUtils.GetState(component, "Extend").actions[1]).divideBy; divideBy.value *= s; } } })); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Dirtmouth Lift", "dirtmouth_lift", ("Town", "_Scenery/Mines Exit Lift"), null, null, delegate(GameObject o) { Transform val = o.transform.Find("sprites"); ((Component)val.Find("lift_main")).gameObject.AddComponent<SpriteSource>(); ((Component)val.Find("Chains")).gameObject.SetActive(false); o.AddComponent<MiscFixers.Lift>(); })).WithConfigGroup(ConfigGroup.MinesLift)); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Stomper", "stomper", ("Mines_37", "stomper_offset"), null, delegate(GameObject o) { o.GetComponentInChildren<Animator>().cullingMode = (AnimatorCullingMode)0; })).WithConfigGroup(ConfigGroup.Stomper)); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Flipping Platform", "flipping_platform", ("Mines_31", "Mines Platform"))); Categories.Misc.Add(((PlaceableObject)new PaleObject("Breakable Crystal", "crystal_peak_crystals", ("Mines_20", "brk_Crystal3"), null, null, MiscFixers.FixRotation)).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Crystal Barrel", "crystal_peak_barrel", ("Mines_20", "crystal_barrel"), null, null, MiscFixers.BreakableZ)).WithBroadcasterGroup(BroadcasterGroup.Breakable).WithConfigGroup(ConfigGroup.Decorations)); AddSolid("Metal Grate", "metal_grate", ("Mines_20", "mines_metal_grate_06")); AddSolid("Crystal Peak Platform", "peak_plat_1", ("Mines_20", "plat_float_06")); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Metal Gate", "metal_gate", ("Mines_20", "Metal Gate v2"))).WithReceiverGroup(ReceiverGroup.MetalGate).WithRotationGroup((RotationGroup)3)); AddEnemy("Crystal Guardian", "crystal_guardian", ("GG_Crystal_Guardian", "Mega Zombie Beam Miner (1)"), null, null, EnemyFixers.FixCrystalGuardian); AddEnemy("Enraged Guardian", "enraged_guardian", ("GG_Crystal_Guardian_2", "Battle Scene/Zombie Beam Miner Rematch"), null, null, EnemyFixers.FixCrystalGuardian); } private static void AddGardensObjects() { AddEnemy("Mossy Vagabond", "mossy_vagabond", ("Fungus3_39", "Moss Knight Fat"), null, delegate(GameObject o) { Object.Destroy((Object)(object)FSMUtility.LocateMyFSM(o, "FSM")); }); AddEnemy("Spiny Husk", "spiny_husk", ("Fungus3_34", "Garden Zombie")); AddEnemy("Aluba", "aluba", ("Fungus3_48", "Lazy Flyer Enemy")); AddEnemy("Mossfly", "mossfly", ("Fungus3_34", "Moss Flyer")); AddEnemy("Loodle", "loodle", ("Fungus3_48", "Grass Hopper")); AddEnemy("Mantis Traitor", "mantis_traitor", ("Fungus3_10", "Battle Scene/Completed/Mantis Heavy")); AddEnemy("Mantis Petra", "mantis_petra", ("Fungus3_48", "Mantis Heavy Flyer")); AddAttack("Petra Sickle", "mantis_petra_sickle", ("Fungus3_48", "Mantis Heavy Flyer"), "Heavy Flyer", "Shoot", 4).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity).WithConfigGroup(ConfigGroup.Velocity); AddEnemy("Traitor Lord", "traitor_lord", ("Fungus3_23_boss", "Battle Scene/Wave 3/Mantis Traitor Lord"), null, delegate(GameObject o) { ((Renderer)o.GetComponent<MeshRenderer>()).enabled = true; }, EnemyFixers.FixTraitorLord); AddAttack("Traitor Sickle", "traitor_lord_sickle", ("Fungus3_23_boss", "Battle Scene/Wave 3/Mantis Traitor Lord"), "Mantis", "Sickle Throw", 8).WithReceiverGroup(ReceiverGroup.Velocity).WithInputGroup(InputGroup.Velocity).WithConfigGroup(ConfigGroup.Velocity); AddSolid("Queen's Gardens Platform 1", "qg_plat_1", ("Fungus3_44", "Royal_garden_plat_float_08")); AddSolid("Queen's Gardens Platform 2", "qg_plat_2", ("Fungus3_44", "Royal_garden_plat_float_06")); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Collapsing Platform S", "collapsing_plat_s", ("Fungus3_34", "Royal Gardens Plat S"))); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Collapsing Platform L", "collapsing_plat_l", ("Fungus3_34", "Royal Gardens Plat L"))); Categories.Interactable.Add(((PlaceableObject)new PaleObject("Queen's Gardens Door", "qg_door", ("Fungus3_04", "Garden Slide Floor"), (string)null, (Action<GameObject>)delegate(GameObject o) { FsmUtils.DisableAction(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Tween In"), 1); }, (Action<GameObject>)ObjectUtils.RemoveComponent<PersistentBoolItem>, (Func<GameObject, GameObject>)null, (Sprite)null, (Sprite)null)).WithReceiverGroup(ReceiverGroup.Gate).WithConfigGroup(ConfigGroup.QgDoor)); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Cloth (Ally)", "cloth_ally", ("Fungus3_23_boss", "Battle Scene/Cloth Entry/Cloth Fighter"), null, MiscFixers.FixCloth)).SpritePreview = true; } private static void AddEdgeObjects() { AddEnemy("Primal Aspid", "primal_aspid", ("Deepnest_East_07", "Super Spitter")); AddAttack("Infection Bullet", "aspid_bullet", ("Deepnest_East_07", "Super Spitter"), "spitter", "Fire", 1).WithScaleAction((Action<GameObject, float>)MiscFixers.ScaleEnemyBullet).WithConfigGroup(ConfigGroup.Velocity).WithInputGroup(InputGroup.Velocity) .WithBroadcasterGroup(BroadcasterGroup.Hittable) .WithReceiverGroup(ReceiverGroup.Velocity); AddEnemy("Belfly", "belfly", ("Deepnest_East_07", "Ceiling Dropper")); AddEnemy("Boofly", "boofly", ("Deepnest_East_07", "Blow Fly")); AddEnemy("Hopper", "hopper", ("Deepnest_East_06", "Hopper")).WithFlipAction((Action<GameObject, bool>)EnemyFixers.FlipHopper); AddEnemy("Great Hopper", "great_hopper", ("Deepnest_East_06", "Giant Hopper (1)")).WithFlipAction((Action<GameObject, bool>)EnemyFixers.FlipGreatHopper); AddSolid("Love Platform", "love_plat_1", ("Ruins2_11_b", "jar_col_plat")); } private static void AddColosseumObjects() { AddColoEnemy("Heavy Fool", "heavy_fool", "Colosseum Manager/Waves/Wave 1/Colosseum Cage Large"); AddColoEnemy("Sturdy Fool", "sturdy_fool", "Colosseum Manager/Waves/Wave 1/Colosseum Cage Large (1)"); AddColoEnemy("Armoured Squit", "armoured_squit", "Colosseum Manager/Waves/Wave 2/Colosseum Cage Small"); AddColoEnemy("Shielded Fool", "shielded_fool", "Colosseum Manager/Waves/Wave 3/Colosseum Cage Large"); AddColoEnemy("Winged Fool", "winged_fool", "Colosseum Manager/Waves/Wave 4/Colosseum Cage Large"); AddColoEnemy("Sharp Baldur", "sharp_baldur", "Colosseum Manager/Waves/Wave 4/Colosseum Cage Small"); AddColoEnemy("Battle Obble", "battle_obble", "Colosseum Manager/Waves/Wave 6/Colosseum Cage Small"); AddColoEnemy("Death Loodle", "death_loodle", "Colosseum Manager/Waves/Wave 9/Colosseum Cage Small (1)"); AddEnemy("Pale Lurker", "pale_lurker", ("GG_Lurker", "Lurker Control/Pale Lurker"), null, null, EnemyFixers.FixPaleLurker); Categories.Attacks.Add((PlaceableObject)(object)new PaleObject("Lurker Barb", "lurker_barb", ("GG_Lurker", "Lurker Control/Lurker Barb"))).WithConfigGroup(ConfigGroup.LurkerBarb).WithInputGroup(InputGroup.Velocity) .WithReceiverGroup(ReceiverGroup.Velocity); AddEnemy("Brooding Mawlek", "brooding_mawlek", ("GG_Brooding_Mawlek", "Battle Scene/Mawlek Body"), null, null, EnemyFixers.FixBroodingMawlek); AddEnemy("Oblobble", "oblobble", ("GG_Oblobbles", "Mega Fat Bee"), null, MiscFixers.AddComponent<EnemyFixers.Oblobble>).WithConfigGroup(ConfigGroup.Oblobble).WithReceiverGroup(ReceiverGroup.Oblobble); AddEnemy("God Tamer", "god_tamer", ("Room_Colosseum_Gold", "Colosseum Manager/Waves/Lobster Lancer/Entry Object/Lancer"), null, delegate(GameObject o) { o.GetComponent<HealthManager>().smallGeoDrops = 0; }, EnemyFixers.FixTamer); AddEnemy("God Tamer Beast", "god_tamer_beast", ("Room_Colosseum_Gold", "Colosseum Manager/Waves/Lobster Lancer/Entry Object/Lobster"), null, null, EnemyFixers.FixTamerBeast); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Colosseum Wall", "colo_wall", ("Room_Colosseum_Gold", "Colosseum Manager/Walls/Colosseum Wall L"), null, null, MiscFixers.FixColoWall)).WithFlipAction((Action<GameObject, bool>)MiscFixers.FlipColoWall).WithRotateAction((Action<GameObject, float>)MiscFixers.RotateColoWall).WithRotationGroup((RotationGroup)3) .WithConfigGroup(ConfigGroup.ColoWall) .WithReceiverGroup(ReceiverGroup.ColoWall) .WithInputGroup(InputGroup.ColoWall)); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Colosseum Platform", "colo_plat", ("Room_Colosseum_Gold", "Colosseum Manager/Waves/Arena 1/Colosseum Platform"))).WithConfigGroup(ConfigGroup.ColoPlat).WithReceiverGroup(ReceiverGroup.ColoPlat)); static void AddColoEnemy(string name, string id, string path) { Categories.Enemies.Add(((PlaceableObject)new PaleObject(name, id, ("Room_Colosseum_Gold", path), null, null, null, ExtractColoObject)).WithReceiverGroup(ReceiverGroup.Enemies).WithBroadcasterGroup(BroadcasterGroup.Enemies).WithConfigGroup(ConfigGroup.Enemies) .WithOutputGroup(OutputGroup.Enemies)); } static GameObject ExtractColoObject(GameObject obj) { PlayMakerFSM val = FSMUtility.LocateMyFSM(obj, "Spawn"); FsmGameObject val2 = val.FsmVariables.FindFsmGameObject("Corpse to Instantiate"); return (val2 != null) ? val2.value : val.FsmVariables.FindFsmGameObject("Enemy Type").value; } } private static void AddHiveObjects() { AddSolid("Hive Platform 1", "hive_plat_1", ("Hive_03_c", "hive_plat_01 (4)")); AddSolid("Hive Platform 2", "hive_plat_2", ("Hive_03_c", "hive_plat_02 (2)")); AddSolid("Hive Platform 3", "hive_plat_3", ("Hive_03_c", "hive_plat_03 (3)")); AddSolid("Hive Platform 4", "hive_plat_4", ("Hive_03_c", "hive_plat_04 (4)")); AddSolid("Breakable Hive Platform 1", "brk_hive_plat_1", ("Hive_03_c", "hive_plat_brk_02")); AddSolid("Breakable Hive Platform 2", "brk_hive_plat_2", ("Hive_03_c", "hive_plat_brk_03 (1)")); AddSolid("Breakable Hive Platform 3", "brk_hive_plat_3", ("Hive_03_c", "hive_plat_brk_04")); AddEnemy("Hiveling", "hiveling", ("Hive_03_c", "Bee Hatchling Ambient (11)")); AddEnemy("Hive Soldier", "hive_soldier", ("Hive_03_c", "Bee Stinger (4)")); AddEnemy("Husk Hive", "husk_hive", ("Hive_01", "Zombie Hive"), null, null, EnemyFixers.FixHuskHive).WithScaleAction((Action<GameObject, float>)EnemyFixers.ScaleHatcher); AddEnemy("Hive Guardian", "hive_guardian", ("Hive_03_c", "Big Bee")); AddEnemy("Hive Knight", "hive_knight", ("GG_Hive_Knight", "Battle Scene/Hive Knight"), null, null, EnemyFixers.FixHiveKnight); } private static void AddGroundsObjects() { AddSolid("Resting Grounds Platform", "rest_plat_1", ("RestingGrounds_05", "plat_float_08")); AddEnemy("Entombed Husk", "entombed_husk", ("RestingGrounds_10", "Grave Zombie")); } private static void AddBasinObjects() { AddEnemy("Lesser Mawlek", "lesser_mawlek", ("Abyss_17", "Lesser Mawlek")); AddEnemy("Mawlurk", "mawlurk", ("Abyss_20", "Mawlek Turret")).WithRotationGroup((RotationGroup)3).WithRotateAction((Action<GameObject, float>)EnemyFixers.RotateMawlurk); AddEnemy("Infected Balloon", "infected_balloon", ("Abyss_20", "Parasite Balloon (6)"), null, MiscFixers.AddComponent<EnemyFixers.InfectedBalloon>).WithConfigGroup(ConfigGroup.Wakeable).WithReceiverGroup(ReceiverGroup.Wakeable); AddEnemy("Broken Vessel", "broken_vessel", ("GG_Broken_Vessel", "Infected Knight"), null, null, EnemyFixers.FixNormalBrokenVessel); AddEnemy("Lost Kin", "lost_kin", ("Dream_03_Infected_Knight", "Lost Kin"), null, null, EnemyFixers.FixLostKin); } private static void AddWpObjects() { AddSolid("White Palace Platform 1", "wp_plat_1", ("White_Palace_07", "wp_plat_float_01_wide (1)")); AddSolid("White Palace Platform 2", "wp_plat_2", ("White_Palace_07", "wp_plat_float_07")); AddSolid("White Palace Platform 3", "wp_plat_3", ("White_Palace_07", "wp_plat_float_03")); AddSolid("White Palace Platform 4", "wp_plat_4", ("White_Palace_07", "wp_plat_float_05 (1)")); Categories.Hazards.Add(((PlaceableObject)new PaleObject("White Palace Saw", "wp_saw", ("White_Palace_07", "wp_saw"))).WithConfigGroup(ConfigGroup.WhiteSaw)); Categories.Hazards.Add(((PlaceableObject)new PaleObject("White Spikes", "white_spikes", ("White_Palace_03_hub", "White_ Spikes"))).WithRotationGroup((RotationGroup)3)); Categories.Enemies.Add(((PlaceableObject)new PaleObject("Wingsmould", "wingsmould", ("White_Palace_18", "White Palace Fly"))).WithConfigGroup(ConfigGroup.Wingsmould).WithReceiverGroup(ReceiverGroup.Enemies).WithBroadcasterGroup(BroadcasterGroup.Damageable)); AddEnemy("Kingsmould", "kingsmould", ("White_Palace_20", "Battle Scene/Wave 1/Royal Gaurd (1)"), null, EnemyFixers.FixHitEffects); Categories.Interactable.Add(((PlaceableObject)new PaleObject("White Palace Gate", "wp_gate", ("White_Palace_20", "Battle Scene/Gate"), null, delegate(GameObject o) { PlayMakerFSM val = FSMUtility.LocateMyFSM(o, "FSM"); val.fsmTemplate = null; BoxCollider2D bc2d = o.GetComponent<BoxCollider2D>(); FsmUtils.AddAction(FsmUtils.GetState(val, "Downed"), (Action)delegate { ((Behaviour)bc2d).enabled = false; }, -1, false); FsmUtils.AddAction(FsmUtils.GetState(val, "Upped"), (Action)delegate { ((Behaviour)bc2d).enabled = true; }, -1, false); }, delegate(GameObject o) { //IL_0013: 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) BoxCollider2D component = o.GetComponent<BoxCollider2D>(); ((Collider2D)component).offset = new Vector2(0.25f, 0.2165f); component.size = new Vector2(0.25f, 3.5f); })).WithReceiverGroup(ReceiverGroup.WpGate).WithConfigGroup(ConfigGroup.WpGate)); Categories.Platforming.Add(((PlaceableObject)new PaleObject("White Palace Lift", "wp_lift", ("White_Palace_03_hub", "White Palace Lift"), null, null, MiscFixers.AddComponent<MiscFixers.WpLift>)).WithConfigGroup(ConfigGroup.WpLift)); Categories.Misc.Add(((PlaceableObject)new PaleObject("Pale King Corpse", "pk_corpse", ("White_Palace_09", "White King Corpse"), null, preloadAction: MiscFixers.KeepActive, postSpawnAction: MiscFixers.FixPkCorpse)).WithBroadcasterGroup(BroadcasterGroup.Breakable)); } private static void AddDreamObjects() { //IL_00b8: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Disappearing Platform 1", "plat_hide_1", ("Dream_03_Infected_Knight", "dream_plat_small (1)"))); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Disappearing Platform 2", "plat_hide_2", ("Dream_03_Infected_Knight", "dream_plat_med (7)"))); Categories.Platforming.Add((PlaceableObject)(object)new PaleObject("Disappearing Platform 3", "plat_hide_3", ("Dream_03_Infected_Knight", "dream_plat_large (3)"))); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Radiant Platform 1", "plat_rad_1", ("GG_Radiance", "Boss Control/Plat Sets/P2 SetA/Radiant Plat Small (2)"), null, null, null, null, ResourceUtils.LoadSpriteResource("radiance_small", (FilterMode)1, default(Vector4), 64f))).WithConfigGroup(ConfigGroup.RadiancePlat).WithReceiverGroup(ReceiverGroup.RadiancePlat)); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Radiant Platform 2", "plat_rad_2", ("GG_Radiance", "Boss Control/Plat Sets/P2 SetA/Radiant Plat Wide (2)"), null, null, null, null, ResourceUtils.LoadSpriteResource("radiance_wide", (FilterMode)1, default(Vector4), 64f))).WithConfigGroup(ConfigGroup.RadiancePlat).WithReceiverGroup(ReceiverGroup.RadiancePlat)); Categories.Platforming.Add(((PlaceableObject)new PaleObject("Radiant Platform 3", "plat_rad_3", ("GG_Radiance", "Boss Control/Plat Sets/P2 SetA/Radiant Plat Thick (2)"), null, null, null, null, ResourceUtils.LoadSpriteResource("radiance_thick", (FilterMode)1, default(Vector4), 64f))).WithConfigGroup(ConfigGroup.RadiancePlat).WithReceiverGroup(ReceiverGroup.RadiancePlat)); AddAttack("Radiant Orb", "radiant_orb", ("GG_Radiance", "Boss Control/Absolute Radiance"), "Attack Commands", "Spawn Fireball", 1).WithConfigGroup(ConfigGroup.RadiantOrb).WithReceiverGroup(ReceiverGroup.RadiantOrb); AddAttack("Radiant Nail", "radiant_nail", ("GG_Radiance", "Boss Control/Absolute Radiance"), "Attack Commands", "CW Spawn", 0, null, delegate(GameObject o) { FsmUtils.AddEvent(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Fan Ready"), "FAN ATTACK CW", -1); }).WithConfigGroup(ConfigGroup.RadiantNail).WithReceiverGroup(ReceiverGroup.RadiantNail).WithRotationGroup((RotationGroup)4); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Radiant Beam", "radiant_beam", ("GG_Radiance", "Boss Control/Beam Sweeper"), null, null, sprite: ResourceUtils.LoadSpriteResource("radiant_beam", new Vector2(0.5f, 0f), (FilterMode)1, default(Vector4), 6.4f), preloadAction: MiscFixers.AddComponent<MiscFixers.RadiantBeam>)).WithConfigGroup(ConfigGroup.RadiantBeam).WithReceiverGroup(ReceiverGroup.RadiantBeam).WithInputGroup(InputGroup.RadiantBeam)); Categories.Hazards.Add(((PlaceableObject)new PaleObject("Radiant Spike", "radiant_spike", ("GG_Radiance", "Boss Control/Spike Control/Centre/Radiant Spike (8)"), null, null, delegate(GameObject o) { Object.Destroy((Object)(object)FSMUtility.LocateMyFSM(o, "Hero Saver")); })).WithConfigGroup(ConfigGroup.RadiantSpike).WithReceiverGroup(ReceiverGroup.RadiantSpike)); AddSolid("Godhome Platform 1", "gg_plat_1", ("GG_Atrium_Roof", "gg_plat_float_small")); AddSolid("Godhome Platform 2", "gg_plat_2", ("GG_Workshop", "gg_plat_float_wide")); } private static void AddGrimmObjects() { AddFlamebearerEnemy("Grimmkin Novice", "grimmkin_novice", "Ruins1_28", 1); AddFlamebearerEnemy("Grimmkin Master", "grimmkin_master", "Tutorial_01", 2); AddFlamebearerEnemy("Grimmkin Nightmare", "grimmkin_nightmare", "Fungus2_30", 3); AddAttack("Fireball", "grimm_fireball", ("Grimm_Main_Tent_boss", "Grimm Boss"), "Control", "Fire Low R", 0).WithConfigGroup(ConfigGroup.Velocity).WithInputGroup(InputGroup.Velocity).WithReceiverGroup(ReceiverGroup.Velocity); AddAttack("Fire Pillar", "grimm_pillar", ("Grimm_Nightmare", "Grimm Control/Nightmare Grimm Boss"), "Control", "Pillar", 0).WithRotationGroup((RotationGroup)4); AddEnemy("Troupe Master Grimm", "troupe_master_grimm", ("Grimm_Main_Tent_boss", "Grimm Boss"), null, EnemyFixers.FixHitEffects, EnemyFixers.FixTmg); AddEnemy("Nightmare King Grimm", "nightmare_king_grimm", ("Grimm_Nightmare", "Grimm Control/Nightmare Grimm Boss"), null, delegate(GameObject o) { Extensions.SetPositionZ(o.transform, 0.006f); EnemyFixers.FixHitEffects(o); }, EnemyFixers.FixNkg); static void AddFlamebearerEnemy(string name, string id, string scene, int level) { Categories.Enemies.Add(((PlaceableObject)new PaleObject(name, id, (scene, "Flamebearer Spawn"), null, delegate(GameObject o) { EnemyFixers.FixFlamebearer(o, level); }, EnemyFixers.FixHitEffects, ExtractFlamebearer)).WithReceiverGroup(ReceiverGroup.Enemies).WithBroadcasterGroup(BroadcasterGroup.Enemies).WithConfigGroup(ConfigGroup.Enemies) .WithOutputGroup(OutputGroup.Enemies)); } static GameObject ExtractFlamebearer(GameObject o) { return FSMUtility.LocateMyFSM(o, "Spawn Control").FsmVariables.FindFsmGameObject("Grimmkin Obj").Value; } } private static void AddAbyssObjects() { AddEnemy("Shadow Creeper", "shadow_creeper", ("Abyss_04", "Abyss Crawler")).WithRotationGroup((RotationGroup)3); AddSolid("Abyss Platform 1", "plat_abyss_1", ("Abyss_06_Core", "_Scenery/abyss_plat_float_01")); AddSolid("Abyss Platform 2", "plat_abyss_2", ("Abyss_06_Core", "_Scenery/abyss_plat_float_02")); AddSolid("Abyss Platform 3", "plat_abyss_3", ("Abyss_06_Core", "_Scenery/abyss_plat_float_03")); AddSolid("Abyss Platform 4", "plat_abyss_4", ("Abyss_06_Core", "_Scenery/abyss_plat_float_04")); Categories.Enemies.Add(((PlaceableObject)new PaleObject("Shade Sibling", "shade_sibling", ("Abyss_06_Core", "Shade Sibling Spawner"), null, delegate(GameObject o) { Extensions.SetPositionY(o.transform, Extensions.GetPositionY(o.transform) - 6.5f); }, null, (GameObject o) => o.GetComponent<PersonalObjectPool>().startupPool[0].prefab)).WithConfigGroup(ConfigGroup.ShadeSibling).WithReceiverGroup(ReceiverGroup.Enemies).WithBroadcasterGroup(BroadcasterGroup.Shades) .WithOutputGroup(OutputGroup.Enemies)).SpritePreview = true; Categories.Hazards.Add(((PlaceableObject)new PaleObject("Void Tendrils", "void_tendrils", ("Abyss_16", "Abyss Tendrils"))).WithConfigGroup(ConfigGroup.AbyssTendrils)); } private static void AddOrdealObjects() { AddEnemy("Zoteling the Mighty", "zoteling", ("GG_Mighty_Zote", "Battle Control/Dormant Warriors/Zote Crew Normal (1)"), null, null, EnemyFixers.FixZoteling); AddEnemy("Winged Zoteling", "zoteling_winged", ("GG_Mighty_Zote", "Battle Control/Zotelings/Ordeal Zoteling"), null, null, EnemyFixers.FixWingedZoteling); AddEnemy("Hopping Zoteling", "zoteling_hop", ("GG_Mighty_Zote", "Battle Control/Zotelings/Ordeal Zoteling"), null, null, EnemyFixers.FixHopZoteling); AddEnemy("Heavy Zoteling", "zoteling_heavy", ("GG_Mighty_Zote", "Battle Control/Fat Zotes/Zote Crew Fat (1)"), null, null, EnemyFixers.FixHeavyZoteling); AddEnemy("Lanky Zoteling", "zoteling_lanky", ("GG_Mighty_Zote", "Battle Control/Tall Zotes/Zote Crew Tall (1)"), null, null, EnemyFixers.FixLankyZoteling); AddEnemy("Fluke Zoteling", "zoteling_fluke", ("GG_Mighty_Zote", "Battle Control/Zote Fluke"), null, null, EnemyFixers.FixFlukeZoteling); AddEnemy("Head of Zote", "head_of_zote", ("GG_Mighty_Zote", "Battle Control/Zote Thwomp"), null, null, EnemyFixers.FixHeadOfZote); } private static void AddGhostObjects() { AddEnemy("Marmu", "marmu", ("GG_Ghost_Marmu", "Warrior/Ghost Warrior Marmu"), null, null, EnemyFixers.FixMarmu); } private static PlaceableObject AddEnemy(string name, string id, (string, string) path, string description = null, Action<GameObject> preloadAction = null, Action<GameObject> postSpawnAction = null) { return Categories.Enemies.Add(((PlaceableObject)new PaleObject(name, id, path, description, postSpawnAction, preloadAction)).WithReceiverGroup(ReceiverGroup.Enemies).WithBroadcasterGroup(BroadcasterGroup.Enemies).WithConfigGroup(ConfigGroup.Enemies) .WithOutputGroup(OutputGroup.Enemies)); } private static PlaceableObject AddAttack(string name, string id, (string, string) path, string fsmName, string stateName, int index, Action<GameObject> preloadAction = null, Action<GameObject> postSpawnAction = null) { return Categories.Attacks.Add((PlaceableObject)(object)new PaleObject(name, id, path, null, postSpawnAction, preloadAction, delegate(GameObject o) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) PlayMakerFSM val = FSMUtility.LocateMyFSM(o, fsmName); val.Preprocess(); return ((SpawnObjectFromGlobalPool)FsmUtils.GetState(val, stateName).actions[index]).gameObject.value; })); } private static void AddGodObjects() { AddEnemy("The Hollow Knight", "hollow_knight", ("Room_Final_Boss_Core", "Boss Control/Hollow Knight Boss"), null, null, EnemyFixers.FixThk).WithConfigGroup(ConfigGroup.Thk); Categories.Misc.Add((PlaceableObject)(object)new PaleObject("Standard Godhome Arena", "godhome_arena", ("GG_False_Knight", "GG_Arena_Prefab"))); } private static void AddMiscObjects() { Categories.Effects.Add(((PlaceableObject)new PaleObject("Lumafly", "lumafly_effect", ("Tutorial_01", "_Scenery/Glow Bug 1"))).WithConfigGroup(ConfigGroup.Lumafly)); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Vengeful Spirit", "vengeful_spirit", ("Knight_Pickup", "Knight"), null, MiscFixers.FixVs, null, (GameObject o) => ((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Spell Control"), "Fireball 1").Actions[3]).gameObject.value, "Fireball Cast"), "Cast Right").Actions[7]).gameObject.value)).WithRotateAction((Action<GameObject, float>)MiscFixers.RotateFireball).WithConfigGroup(ConfigGroup.Fireball)); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Shade Soul", "shade_soul", ("Knight_Pickup", "Knight"), null, MiscFixers.FixSs, null, (GameObject o) => ((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Spell Control"), "Fireball 2").Actions[3]).gameObject.value, "Fireball Cast"), "Cast Right").Actions[4]).gameObject.value)).WithRotateAction((Action<GameObject, float>)MiscFixers.RotateFireball).WithConfigGroup(ConfigGroup.Fireball)); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Howling Wraiths", "howling_wraiths", ("Knight_Pickup", "Knight/Spells/Scr Heads"), null, MiscFixers.FixScream)).WithConfigGroup(ConfigGroup.Scream)); Categories.Attacks.Add(((PlaceableObject)new PaleObject("Abyss Shriek", "abyss_shriek", ("Knight_Pickup", "Knight/Spells/Scr Heads 2"), null, MiscFixers.FixScream)).WithConfigGroup(ConfigGroup.Scream)); } private static void AddSolid(string name, string id, (string, string) path, [CanBeNull] Action<GameObject> preloadAction = null) { Categories.Solids.Add((PlaceableObject)(object)new PaleObject(name, id, path, null, null, preloadAction)).WithRotationGroup((RotationGroup)3).WithConfigGroup(ConfigGroup.Colliders); } } } namespace Pale_Architect.Preloads { public class BasicPale(string scene, string path, Action<GameObject> callback) : IPale { public string Scene => scene; public string Path => path; public bool Loaded { get; private set; } public RepackedAsset Asset { get; set; } public bool ShouldAlwaysLoad => true; public void OnPreload(GameObject preload) { callback(preload); Loaded = true; } } public interface IPale { string Scene { get; } string Path { get; } bool Loaded { get; } RepackedAsset Asset { get; set; } bool ShouldAlwaysLoad { get; } void OnPreload(GameObject preload); } public static class PaleManager { private static RepackedAssets _hollowKnightAssets; private static readonly Dictionary<string, List<(string, IPale)>> ToPreload = new Dictionary<string, List<(string, IPale)>>(); private static ManagedAsset<EnemyHitEffectsProfile> _uninfectedHitEffectsAsset; internal static EnemyHitEffectsProfile UninfectedHitEffects; private static GameObject _canvasObj; private static Text _status; public static void Init(string path) { _hollowKnightAssets = UnitySceneRepackerPlugin.RepackedAssets(path, "palearchitect"); _uninfectedHitEffectsAsset = ManagedAsset<EnemyHitEffectsProfile>.FromNonSceneAsset("Assets/Data Assets/Profiles/Hit Effects/Uninfected Hit Effect.asset", "dataassets_assets_assets/dataassets/profiles"); } public static IEnumerator Process() { yield return (object)new WaitUntil((Func<bool>)(() => PreloadManager.HasPreloaded)); PreloadManager.IsLoading = true; SetupCanvas(); int count = 0; int totalCount = ToPreload.Values.SelectMany((List<(string, IPale)> p) => p).Count(((string, IPale) p) => p.Item2.ShouldAlwaysLoad); ((ManagedAssetBase<EnemyHitEffectsProfile>)(object)_uninfectedHitEffectsAsset).Load(); yield return ((ManagedAssetBase<EnemyHitEffectsProfile>)(object)_uninfectedHitEffectsAsset).Handle; UninfectedHitEffects = ((ManagedAssetBase<EnemyHitEffectsProfile>)(object)_uninfectedHitEffectsAsset).Handle.Result; foreach (var (scene, preloads) in ToPreload) { foreach (var item in preloads) { string path = item.Item1; IPale preload = item.Item2; preload.Asset = _hollowKnightAssets.Request(scene, path); } } _hollowKnightAssets.Prepare(); foreach (List<(string, IPale)> preloads2 in ToPreload.Values) { foreach (var item2 in preloads2) { IPale preload2 = item2.Item2; if (!preload2.Loaded && preload2.ShouldAlwaysLoad) { AsyncOperationHandle<GameObject> op = preload2.Asset.Load(); yield return op; preload2.OnPreload(op.Result); count++; _status.text = $"{count} / {totalCount}\n(Pale Architect)"; } } } Object.Destroy((Object)(object)_canvasObj); PreloadManager.IsLoading = false; } private static void SetupCanvas() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00da: Unknown result type (might be due to invalid IL or missing references) _canvasObj = new GameObject("[Architect] Preload Status"); Object.DontDestroyOnLoad((Object)(object)_canvasObj); _canvasObj.AddComponent<Canvas>().renderMode = (RenderMode)0; CanvasScaler val = _canvasObj.AddComponent<CanvasScaler>(); val.uiScaleMode = (ScaleMode)1; val.screenMatchMode = (ScreenMatchMode)1; _canvasObj.AddComponent<GraphicRaycaster>(); UIUtils.MakeImage("Preload BG", _canvasObj, Vector2.zero, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(3000f, 3000f)).sprite = ResourceUtils.LoadSpriteResource("preloader_bg", (FilterMode)1); Label val2 = UIUtils.MakeLabel("Progress", _canvasObj, Vector2.zero, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), 80f, 80f, (HorizontalWrapMode)1); val2.font = "TrajanPro-Bold"; ((Component)val2).transform.SetAsLastSibling(); _status = (Text)(object)val2.textComponent; _status.text = "Repacking HK objects..."; _status.alignment = (TextAnchor)1; _status.fontSize = 32; } public static void RegisterPale(IPale obj) { if (!ToPreload.ContainsKey(obj.Scene)) { ToPreload[obj.Scene] = new List<(string, IPale)>(); } ToPreload[obj.Scene].Add((obj.Path, obj)); } } public class PaleObject : PlaceableObject, IPale { private readonly Action<GameObject> _preloadAction; private readonly Func<GameObject, GameObject> _extraction; public string Scene { get; } public string Path { get; } public RepackedAsset Asset { get; set; } public bool ShouldAlwaysLoad => base.ShouldLoad; public PaleObject(string name, string id, (string, string) path, string description = null, Action<GameObject> postSpawnAction = null, Action<GameObject> preloadAction = null, Func<GameObject, GameObject> extraction = null, Sprite sprite = null, Sprite uiSprite = null) : base(name, id + "_pale", description, postSpawnAction, sprite, uiSprite) { ((PlaceableObject)this).Loaded = false; Scene = path.Item1; Path = path.Item2; _preloadAction = preloadAction; _extraction = extraction; PaleManager.RegisterPale(this); } public override IEnumerator EnsureLoaded() { if (!((PlaceableObject)this).Loaded) { PreloadManager.IsLoading = true; AsyncOperationHandle<GameObject> load = Asset.Load(); yield return load; if (load.OperationException != null || ((PlaceableObject)this).Loaded) { PreloadManager.IsLoading = false; yield break; } ((PlaceableObject)this).Loaded = true; OnPreload(load.Result); PreloadManager.IsLoading = false; } } public void OnPreload(GameObject preload) { if (_extraction != null) { preload = _extraction(preload); } _preloadAction?.Invoke(preload); ((PlaceableObject)this).FinishSetup(preload); ((PlaceableObject)this).Loaded = true; } } } namespace Pale_Architect.Groups { public static class BroadcasterGroup { public static readonly List<string> Damageable = new List<string>(1) { "OnDamage" }; public static readonly List<string> Shades = new List<string>(2) { "OnDeath", "OnDamage" }; public static readonly List<string> Enemies = new List<string>(4) { "OnDeath", "FirstDeath", "LoadedDead", "OnDamage" }; public static readonly List<string> ZoteHead = new List<string>(3) { "OnHit", "OnAir", "OnLand" }; public static readonly List<string> Activatable = new List<string>(1) { "OnActivate" }; public static readonly List<string> Breakable = new List<string>(1) { "OnBreak" }; public static readonly List<string> PersistentBreakable = new List<string>(3) { "OnBreak", "FirstBreak", "LoadedBroken" }; public static readonly List<string> Levers = new List<string>(3) { "OnPull", "FirstPull", "LoadedPulled" }; public static readonly List<string> Hittable = new List<string>(1) { "OnHit" }; } public static class ConfigGroup { public class BounceRandomnessDisabler : MonoBehaviour { } public class EnemyInvulnerabilityMarker : MonoBehaviour { } public class JournalKillDisablerMarker : MonoBehaviour { } public static readonly List<ConfigType> Generic = ConfigGroup.Generic; public static readonly List<ConfigType> Visible = ConfigGroup.Visible; public static readonly List<ConfigType> ColoWall = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(2) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Move Distance", "colo_wall_move", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<MiscFixers.ColoWall>().moveDistance = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(5f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Move Speed", "colo_wall_speed", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<MiscFixers.ColoWall>().moveSpeed = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(28f)) }); public static readonly List<ConfigType> ColoPlat = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Start Up", "colo_plat_start_up", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { PlayMakerFSM fsm = FSMUtility.LocateMyFSM(o, "Control"); bool goneUp = false; FsmUtils.AddAction(FsmUtils.GetState(fsm, "Retracted"), (Action)delegate { if (!goneUp) { goneUp = true; fsm.SendEvent("PLAT EXPAND"); } }, -1, false); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> LaserCrystal = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(4) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Start Pause", "laser_crystal_pause", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "Laser Bug").FsmVariables.FindFsmFloat("Start Pause").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(0.5f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Idle Time", "laser_crystal_idle", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "Laser Bug").FsmVariables.FindFsmFloat("Idle Time").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Charge Time", "laser_crystal_charge", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "Laser Bug").FsmVariables.FindFsmFloat("Antic Time").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(0.75f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Beam Time", "laser_crystal_beam", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "Laser Bug").FsmVariables.FindFsmFloat("Beam Time").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1.5f)) }); private static readonly List<ConfigType> Stretchable = ConfigGroup.Stretchable; public static readonly List<ConfigType> Fireball = GroupUtils.Merge<ConfigType>(Stretchable, GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(3) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Enemy Damage", "fireball_enemy_damage", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { PlayMakerFSM val = FSMUtility.LocateMyFSM(o, "damages_enemy"); if (value.GetValue() == 0) { ((Behaviour)val).enabled = false; } else { val.FsmVariables.FindFsmInt("damageDealt").value = value.GetValue(); } }, (Action<GameObject, IntConfigValue, PreviewContext>)null).WithDefaultValue(15)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Player Damage", "fireball_player_damage", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { if (value.GetValue() != 0) { o.AddComponent<DamageHero>().damageDealt = value.GetValue(); } }, (Action<GameObject, IntConfigValue, PreviewContext>)null).WithDefaultValue(0)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Can Pogo", "fireball_can_pogo", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { o.AddComponent<NonBouncer>(); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) })); public static readonly List<ConfigType> Scream = GroupUtils.Merge<ConfigType>(Stretchable, GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(3) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Enemy Damage", "scream_enemy_damage", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { IEnumerable<PlayMakerFSM> enumerable = from f in o.GetComponentsInChildren<PlayMakerFSM>() where f.FsmName == "damages_enemy" select f; foreach (PlayMakerFSM item in enumerable) { if (value.GetValue() == 0) { ((Behaviour)item).enabled = false; } else { item.FsmVariables.FindFsmInt("damageDealt").value = value.GetValue(); } } }, (Action<GameObject, IntConfigValue, PreviewContext>)null).WithDefaultValue(20)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Player Damage", "scream_player_damage", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { if (value.GetValue() == 0) { return; } IEnumerable<PlayMakerFSM> enumerable = from f in o.GetComponentsInChildren<PlayMakerFSM>() where f.FsmName == "damages_enemy" select f; foreach (PlayMakerFSM item2 in enumerable) { ((Component)item2).gameObject.AddComponent<DamageHero>().damageDealt = value.GetValue(); } }, (Action<GameObject, IntConfigValue, PreviewContext>)null).WithDefaultValue(0)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Can Pogo", "scream_can_pogo", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { return; } IEnumerable<PlayMakerFSM> enumerable = from f in o.GetComponentsInChildren<PlayMakerFSM>() where f.FsmName == "damages_enemy" select f; foreach (PlayMakerFSM item3 in enumerable) { ((Component)item3).gameObject.AddComponent<NonBouncer>(); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) })); public static readonly List<ConfigType> Conveyor = GroupUtils.Merge<ConfigType>(Stretchable, GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Belt Speed", "conveyor_speed", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { float value2 = value.GetValue(); if (value2 < 0f) { Extensions.SetScaleX(o.transform, 0f - Extensions.GetScaleX(o.transform)); } ConveyorBelt componentInChildren = o.GetComponentInChildren<ConveyorBelt>(); componentInChildren.speed *= value2; Animator[] componentsInChildren = o.GetComponentsInChildren<Animator>(); foreach (Animator val in componentsInChildren) { val.speed *= Math.Abs(value2); } }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1f)) })); public static readonly List<ConfigType> DreamBlock = GroupUtils.Merge<ConfigType>(Visible, GroupUtils.Merge<ConfigType>(Stretchable, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Show Particles", "dream_block_particles", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { o.GetComponent<DreamBlock>().SetupParticles(); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) })); public static readonly List<ConfigType> Goams = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Start Up", "goam_start_up", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { FSMUtility.LocateMyFSM(o, "Worm Control").FsmVariables.FindFsmBool("Start Down").Value = true; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> Garpede = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(5) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Speed", "garpede_speed", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<BigCentipede>().moveSpeed = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(20f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Burrow Time", "garpede_burrow_time", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<BigCentipede>().burrowTime = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1.7f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Entry Offset", "garpede_entry_offset", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { Extensions.SetLocalPositionX(o.transform.Find("Entry"), value.GetValue()); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(-12f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Exit Offset", "garpede_exit_offset", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { Extensions.SetLocalPositionX(o.transform.Find("Exit"), value.GetValue()); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(6f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Segments", "garpede_segments", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { EnemyFixers.Garpede component = o.GetComponent<EnemyFixers.Garpede>(); component.segments = Math.Max(0, value.GetValue()); component.Setup(); }, (Action<GameObject, IntConfigValue, PreviewContext>)delegate(GameObject o, IntConfigValue value, PreviewContext ctx) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)ctx != 1) { EnemyFixers.Garpede component = o.GetComponent<EnemyFixers.Garpede>(); component.segments = Math.Max(0, value.GetValue()); component.Setup(); } }).WithDefaultValue(3)) }); public static readonly List<ConfigType> Levers = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)MakePersistenceConfigType("Stay Pulled", "lever_stay")) }); public static readonly List<ConfigType> QgDoor = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new Vector2ConfigType("Open Offset", "qg_door_open_offset", (Action<GameObject, Vector2ConfigValue>)delegate(GameObject o, Vector2ConfigValue value) { //IL_001d: 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_002d: 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) ((iTweenMoveBy)FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Slide").actions[0]).vector.value = Vector2.op_Implicit(value.GetValue()); }, (Action<GameObject, Vector2ConfigValue, PreviewContext>)null).WithDefaultValue(new Vector2(4.7f, 0f))) }); public static readonly List<ConfigType> BattleGate = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Start Closed", "bg_start_closed", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { FSMUtility.LocateMyFSM(o, "BG Control").FsmVariables.FindFsmBool("Start Closed").Value = false; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> DreamGate = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Start Closed", "dg_start_closed", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { FsmUtils.AddEvent(FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Init"), "DREAM GATE CLOSE", -1); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> WpGate = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(3) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Start Closed", "wp_gate_start_closed", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { FSMUtility.LocateMyFSM(o, "FSM").FsmVariables.FindFsmBool("Auto Up").Value = true; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Fade Up Time", "wp_gate_fade_up", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "FSM").FsmVariables.FindFsmFloat("Up Time").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1f)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new FloatConfigType("Fade Down Time", "wp_gate_fade_down", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { FSMUtility.LocateMyFSM(o, "FSM").FsmVariables.FindFsmFloat("Down Time").Value = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(1f)) }); public static readonly List<ConfigType> WpLift = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new Vector2ConfigType("Travel Distance", "wp_lift_distance", (Action<GameObject, Vector2ConfigValue>)delegate(GameObject o, Vector2ConfigValue value) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) o.GetComponent<MiscFixers.WpLift>().move = value.GetValue(); }, (Action<GameObject, Vector2ConfigValue, PreviewContext>)null).WithDefaultValue(new Vector2(0f, 20f))) }); public static readonly List<ConfigType> GrubBottle = GroupUtils.Merge<ConfigType>(ConfigGroup.PersistentBreakable, new List<ConfigType>(2) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Breakable", "bottle_can_break", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { ObjectUtils.RemoveComponent<PlayMakerFSM>(o); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Contains Grub", "bottle_has_grub", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { ((Component)o.transform.GetChild(0).GetChild(0)).gameObject.SetActive(false); ((Component)o.transform.GetChild(1)).gameObject.SetActive(false); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> Wingsmould = GroupUtils.Merge<ConfigType>(ConfigGroup.SimpleEnemies, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Stationary", "wingsmould_stationary", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { FSMUtility.LocateMyFSM(o, "Control").FsmVariables.FindFsmBool("Stationary").Value = true; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> WhiteSaw = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Accurate Hitbox", "wp_saw_accurate", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (!value.GetValue()) { CircleCollider2D val = null; CircleCollider2D[] components = o.GetComponents<CircleCollider2D>(); foreach (CircleCollider2D val2 in components) { if (!Object.op_Implicit((Object)(object)val) || val2.radius > val.radius) { val = val2; } } if (Object.op_Implicit((Object)(object)val)) { ((Behaviour)val).enabled = false; } } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> Duranda = GroupUtils.Merge<ConfigType>(ConfigGroup.Enemies, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new Vector2ConfigType("Move Offset", "duranda_move_offset", (Action<GameObject, Vector2ConfigValue>)delegate(GameObject o, Vector2ConfigValue value) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) FSMUtility.LocateMyFSM(o, "Tween").FsmVariables.FindFsmVector3("Move Vector").Value = Vector2.op_Implicit(value.GetValue()); }, (Action<GameObject, Vector2ConfigValue, PreviewContext>)null).WithDefaultValue(new Vector2(0f, 5f))) }); public static readonly List<ConfigType> FalseKnight = GroupUtils.Merge<ConfigType>(ConfigGroup.Enemies, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new IntConfigType("Stun Count", "false_knight_stun_count", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { FSMUtility.LocateMyFSM(o, "FalseyControl").FsmVariables.FindFsmInt("Stunned Amount").Value = 3 - value.GetValue(); }, (Action<GameObject, IntConfigValue, PreviewContext>)null).WithDefaultValue(3)) }); public static readonly List<ConfigType> OomaCore = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Can Pogo Explosion", "can_pogo_ooma_core_explosion", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (value.GetValue()) { ((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Lil Jelly"), "Die").actions[1]).gameObject = FsmGameObject.op_Implicit(MiscFixers.PogoableExplosionL); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> SporgBullet = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Can Pogo Explosion", "can_pogo_sporg_bullet_explosion", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (value.GetValue()) { ((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Spore Bomb"), "Explode").actions[1]).gameObject = FsmGameObject.op_Implicit(MiscFixers.PogoableExplosionM); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> Sporg = GroupUtils.Merge<ConfigType>(ConfigGroup.Enemies, new List<ConfigType>(2) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Can Pogo Bullet Explosion", "can_pogo_sporg_explosion", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { PlayMakerFSM val = FSMUtility.LocateMyFSM(o, "Shroom Turret"); FsmGameObject projectile = val.FsmVariables.FindFsmGameObject("Projectile"); FsmUtils.AddAction(FsmUtils.GetState(val, "Fire"), (Action)delegate { //IL_0038: Unknown result type (might be due to invalid IL or missing references) GameObject value2 = projectile.value; if (Object.op_Implicit((Object)(object)value2)) { ((SpawnObjectFromGlobalPool)FsmUtils.GetState(FSMUtility.LocateMyFSM(value2, "Spore Bomb"), "Explode").actions[1]).gameObject = FsmGameObject.op_Implicit(MiscFixers.PogoableExplosionM); } }, 3, false); } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new Vector2ConfigType("Alert Range", "sporg_alert_range", (Action<GameObject, Vector2ConfigValue>)delegate(GameObject o, Vector2ConfigValue value) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) ((Component)o.transform.Find("Hero Detect")).GetComponent<BoxCollider2D>().size = value.GetValue(); }, (Action<GameObject, Vector2ConfigValue, PreviewContext>)null).WithDefaultValue(new Vector2(25f, 10f))) }); public static readonly List<ConfigType> Teleplane = GroupUtils.Merge<ConfigType>(ConfigGroup.Enemies, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new Vector2ConfigType("Teleplane Size", "teleplane_size", (Action<GameObject, Vector2ConfigValue>)delegate(GameObject o, Vector2ConfigValue value) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) o.GetComponent<EnemyFixers.Teleplane>().collider.size = value.GetValue(); }, (Action<GameObject, Vector2ConfigValue, PreviewContext>)null).WithDefaultValue(new Vector2(10f, 10f))) }); public static readonly List<ConfigType> ShadeSibling = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Ignore Void Heart", "shade_ignore_vh", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { FsmState state = FsmUtils.GetState(FSMUtility.LocateMyFSM(o, "Control"), "Friendly?"); for (int i = 2; i <= 7; i++) { FsmUtils.DisableAction(state, i); } } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> MinesLift = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(3) { ConfigurationManager.RegisterConfigType((ConfigType)(object)((ConfigType<FloatConfigValue>)(object)new FloatConfigType("Speed", "mines_lift_speed", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<MiscFixers.Lift>().speed = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(8f)).WithPriority(-1)), ConfigurationManager.RegisterConfigType((ConfigType)(object)((ConfigType<BoolConfigValue>)(object)new BoolConfigType("Start Up", "mines_lift_start_up", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { o.GetComponent<MiscFixers.Lift>().startUp = value.GetValue(); }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)).WithPriority(-1)), ConfigurationManager.RegisterConfigType((ConfigType)(object)((ConfigType<FloatConfigValue>)(object)new FloatConfigType("Up Offset", "mines_lift_up_offset", (Action<GameObject, FloatConfigValue>)delegate(GameObject o, FloatConfigValue value) { o.GetComponent<MiscFixers.Lift>().offset = value.GetValue(); }, (Action<GameObject, FloatConfigValue, PreviewContext>)null).WithDefaultValue(10f)).WithPriority(-1)) }); public static readonly List<ConfigType> Shade = GroupUtils.Merge<ConfigType>(Visible, new List<ConfigType>(6) { ConfigurationManager.RegisterConfigType((ConfigType)new IntConfigType("Health Override", "player_shade_hp", (Action<GameObject, IntConfigValue>)delegate(GameObject o, IntConfigValue value) { o.GetComponent<EnemyFixers.Shade>().hp = value.GetValue(); }, (Action<GameObject, IntConfigValue, PreviewContext>)null)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new ChoiceConfigType("Fireball Level", "player_shade_fireball", (Action<GameObject, ChoiceConfigValue>)delegate(GameObject o, ChoiceConfigValue value) { o.GetComponent<EnemyFixers.Shade>().spirit = value.GetValue(); }, (Action<GameObject, ChoiceConfigValue, PreviewContext>)null).WithOptions(new string[4] { "Default", "None", "1", "2" })), ConfigurationManager.RegisterConfigType((ConfigType)(object)new ChoiceConfigType("Dive Level", "player_shade_dive", (Action<GameObject, ChoiceConfigValue>)delegate(GameObject o, ChoiceConfigValue value) { o.GetComponent<EnemyFixers.Shade>().dive = value.GetValue(); }, (Action<GameObject, ChoiceConfigValue, PreviewContext>)null).WithOptions(new string[4] { "Default", "None", "1", "2" })), ConfigurationManager.RegisterConfigType((ConfigType)(object)new ChoiceConfigType("Wraiths Level", "player_shade_wraths", (Action<GameObject, ChoiceConfigValue>)delegate(GameObject o, ChoiceConfigValue value) { o.GetComponent<EnemyFixers.Shade>().wraiths = value.GetValue(); }, (Action<GameObject, ChoiceConfigValue, PreviewContext>)null).WithOptions(new string[4] { "Default", "None", "1", "2" })), ConfigurationManager.RegisterConfigType((ConfigType)(object)new ChoiceConfigType("Friendly", "player_shade_friendly", (Action<GameObject, ChoiceConfigValue>)delegate(GameObject o, ChoiceConfigValue value) { if (value.GetValue() != 0) { o.GetComponent<EnemyFixers.Shade>().friendly = value.GetValue(); } }, (Action<GameObject, ChoiceConfigValue, PreviewContext>)null).WithOptions(new string[3] { "Default", "Friendly", "Unfriendly" }).WithDefaultValue(0)), ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Shade Death Counts", "player_shade_counts", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { o.GetComponent<EnemyFixers.Shade>().countDead = true; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(false)) }); public static readonly List<ConfigType> AbyssTendrils = GroupUtils.Merge<ConfigType>(Generic, new List<ConfigType>(1) { ConfigurationManager.RegisterConfigType((ConfigType)(object)new BoolConfigType("Ignore Void Heart", "tendrils_ignore_vh", (Action<GameObject, BoolConfigValue>)delegate(GameObject o, BoolConfigValue value) { if (value.GetValue()) { ((Behaviour)FSMUtility.LocateMyFSM(o, "Black Charm")).enabled = false; } }, (Action<GameObject, BoolConfigValue, PreviewContext>)null).WithDefaultValue(true)) }); public static readonly List<ConfigType> Swooper