From 05f8519c1cbb3e46707cc4b755dfa95499fd7037 Mon Sep 17 00:00:00 2001 From: nerthul11 <=> Date: Sat, 29 Jun 2024 11:08:08 -0300 Subject: [PATCH] Hotfix for unbreakable walls. --- BreakableWallRandomizer.cs | 2 +- BreakableWallRandomizer.csproj | 4 ++-- IC/BreakableWallLocation.cs | 14 ++++++++------ Resources/Data/BreakableWallObjects.json | 10 +++++----- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/BreakableWallRandomizer.cs b/BreakableWallRandomizer.cs index a38fb61..a9d76bf 100644 --- a/BreakableWallRandomizer.cs +++ b/BreakableWallRandomizer.cs @@ -9,7 +9,7 @@ namespace BreakableWallRandomizer public class BreakableWallRandomizer : Mod, IGlobalSettings { new public string GetName() => "Breakable Wall Randomizer"; - public override string GetVersion() => "3.0.0.1"; + public override string GetVersion() => "3.0.0.2"; public BWR_Settings GS { get; set; } = new(); private static BreakableWallRandomizer _instance; public BreakableWallRandomizer() : base() diff --git a/BreakableWallRandomizer.csproj b/BreakableWallRandomizer.csproj index bcb39ae..840f4b0 100644 --- a/BreakableWallRandomizer.csproj +++ b/BreakableWallRandomizer.csproj @@ -8,8 +8,8 @@ BreakableWallRandomizer A Randomizer add-on for wall and floor objects. Copyright ©2023 - 3.0.0.1 - 3.0.0.1 + 3.0.0.2 + 3.0.0.2 bin\$(Configuration)\ latest diff --git a/IC/BreakableWallLocation.cs b/IC/BreakableWallLocation.cs index 44bb500..e41a644 100644 --- a/IC/BreakableWallLocation.cs +++ b/IC/BreakableWallLocation.cs @@ -45,6 +45,8 @@ private InteropTag BreakableWallLocationTag(float x, float y) sprite = "wood_plank_02"; if (name.StartsWith("Dive_Floor-")) sprite = "break_floor_glass"; + if (name.StartsWith("Wall_Group-")) + sprite = "mine_break_wall_03_0deg"; // Replace map for pinless-maps string mapSceneName = sceneName; @@ -171,6 +173,9 @@ private void ModifyWallBehaviour(PlayMakerFSM fsm) if (wall.fsmType != fsm.FsmName) continue; + BreakableWallRandomizer.Instance.Log(fsm.gameObject); + BreakableWallRandomizer.Instance.Log(wall.gameObject); + // If a location is present, it means that it's not vanilla BreakableWallModule.Instance.vanillaWalls.RemoveAll(wall => wall.name == name); @@ -244,8 +249,7 @@ private void ModifyWallBehaviour(PlayMakerFSM fsm) // If items are left, make wall semi-transparent and passable if (!Placement.AllObtained()) { - foreach (CondensedWallObject w in wallList) - MakeWallPassable(GameObject.Find(w.gameObject)); + MakeWallPassable(fsm.gameObject); } else { @@ -311,16 +315,14 @@ private void ModifyWallBehaviour(PlayMakerFSM fsm) { if (Placement.AllObtained()) { - foreach (CondensedWallObject w in wallList) - MakeWallPassable(GameObject.Find(w.gameObject)); + MakeWallPassable(fsm.gameObject); fsm.SetState(originalIdleStateName); } else { if (wall.fsmType == "quake_floor") { - foreach (CondensedWallObject w in wallList) - MakeWallPassable(GameObject.Find(w.gameObject)); + MakeWallPassable(fsm.gameObject); } // ensure everything is passable. fsm.SetState(originalBreakStateName); } diff --git a/Resources/Data/BreakableWallObjects.json b/Resources/Data/BreakableWallObjects.json index 6fad9a4..51ad9b4 100644 --- a/Resources/Data/BreakableWallObjects.json +++ b/Resources/Data/BreakableWallObjects.json @@ -1580,11 +1580,11 @@ "exit": false, "groupWalls": [], "group": "", - "logic": "(Mines_35[left1] + Broke_Crystallized_Mound_Quake_Floor + (LEFTCLAW | RIGHTCLAW + PRECISEMOVEMENT + (RIGHTDASH | OBSCURESKIPS + DIFFICULTSKIPS) | WINGS + OBSCURESKIPS)) | Mines_35[left1] + Plank-Crystallized_Mound", + "logic": "(Mines_35[left1] + Dive_Floor-Crystallized_Mound + (LEFTCLAW | RIGHTCLAW + PRECISEMOVEMENT + (RIGHTDASH | OBSCURESKIPS + DIFFICULTSKIPS) | WINGS + OBSCURESKIPS)) | Mines_35[left1] + (RIGHTDASH | RIGHTSUPERDASH | RIGHTCLAW | WINGS | (FIREBALLSKIPS + (LEFTFIREBALL | SCREAM)) + $CASTSPELL[3]) + Plank-Crystallized_Mound", "logicOverrides": { - "Descending_Dark": "(ORIG) | Mines_35[left1] + Plank-Crystallized_Mound", - "Grub-Crystallized_Mound": "(ORIG) | Mines_35[left1] + Plank-Crystallized_Mound + (RIGHTCLAW | WINGS + LEFTCLAW + BACKGROUNDPOGOS)", - "Soul_Totem-Crystallized_Mound": "(ORIG) | Mines_35[left1] + Plank-Crystallized_Mound + (RIGHTCLAW | WINGS + LEFTCLAW + BACKGROUNDPOGOS) + LEFTDASH" + "Descending_Dark": "(ORIG) | Mines_35[left1] + (RIGHTDASH | RIGHTSUPERDASH | RIGHTCLAW | WINGS | (FIREBALLSKIPS + (LEFTFIREBALL | SCREAM)) + $CASTSPELL[3]) + Plank-Crystallized_Mound", + "Grub-Crystallized_Mound": "(ORIG) | Mines_35[left1] + (RIGHTDASH | RIGHTSUPERDASH | RIGHTCLAW | WINGS | (FIREBALLSKIPS + (LEFTFIREBALL | SCREAM)) + $CASTSPELL[3]) + Plank-Crystallized_Mound + (RIGHTCLAW | WINGS + LEFTCLAW + BACKGROUNDPOGOS)", + "Soul_Totem-Crystallized_Mound": "(ORIG) | Mines_35[left1] + (RIGHTDASH | RIGHTSUPERDASH | RIGHTCLAW | WINGS | (FIREBALLSKIPS + (LEFTFIREBALL | SCREAM)) + $CASTSPELL[3]) + Plank-Crystallized_Mound + (RIGHTCLAW | WINGS + LEFTCLAW + BACKGROUNDPOGOS) + LEFTDASH" }, "logicSubstitutions": {} }, @@ -2875,7 +2875,7 @@ "alsoDestroy": [], "exit": false, "groupWalls": [], - "group": "King's_Pass_Walls", + "group": "", "logic": "Tutorial_01", "logicOverrides": { "Geo_Rock-King's_Pass_Above_Fury": "(ORIG + Plank-King's_Pass) | (Tutorial_01 + (RIGHTCLAW | LEFTCLAW + WINGS + RIGHTDASH + LONGMARK + BACKGROUNDPOGOS))",