From 2f446c9ba181e06dde7f0eddfb3e848cb4188c21 Mon Sep 17 00:00:00 2001 From: vitellaryjr <43586575+vitellaryjr@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:01:10 -0700 Subject: [PATCH] refill dashes/stamina options --- Code/CoyoteBounceTrigger.cs | 14 ++++++++++++-- Loenn/lang/en_gb.lang | 2 ++ Loenn/triggers/coyote_bounce_trigger.lua | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Code/CoyoteBounceTrigger.cs b/Code/CoyoteBounceTrigger.cs index 77655d6..bba049d 100644 --- a/Code/CoyoteBounceTrigger.cs +++ b/Code/CoyoteBounceTrigger.cs @@ -77,8 +77,14 @@ private static void HookDashCollision(DashCollisionResults result, Player player if (CoyoteBounceTrigger.MatchDirection(direction, bouncer.refill)) { - player.RefillDash(); - player.RefillStamina(); + if (bouncer.dashes) + { + player.RefillDash(); + } + if (bouncer.stamina) + { + player.RefillStamina(); + } } } @@ -93,6 +99,8 @@ public static void Unload() { public float time; public BounceDirections refill; public bool setGrounded; + public bool dashes; + public bool stamina; public static CoyoteBounceTrigger CoyoteTriggerInside; public static bool GroundedOverride; @@ -107,6 +115,8 @@ public CoyoteBounceTrigger(EntityData data, Vector2 offset) : base(data, offset) refill = data.Enum("refillDirections", BounceDirections.Top); } setGrounded = data.Bool("setGrounded", false); + dashes = data.Bool("refillDashes", true); + stamina = data.Bool("refillStamina", true); } public override void OnEnter(Player player) { diff --git a/Loenn/lang/en_gb.lang b/Loenn/lang/en_gb.lang index 490f964..e3d9b31 100644 --- a/Loenn/lang/en_gb.lang +++ b/Loenn/lang/en_gb.lang @@ -419,6 +419,8 @@ triggers.vitellary/coyotebounce.attributes.description.directions=The sides of t triggers.vitellary/coyotebounce.attributes.description.refillDirections=The directions that you can regain dashes and stamina from upon collision.\n"Match Coyote" means it will match the behavior of the "Directions" field. triggers.vitellary/coyotebounce.attributes.description.dashTypes=What type of collision should grant the coyote frames.\nPreviously, this defaulted to "All", which was unintended behavior. triggers.vitellary/coyotebounce.attributes.description.setGrounded=Whether the player should be considered grounded during the coyote frame period.\nThis is NOT the vanilla behavior, and may be jank. +triggers.vitellary/coyotebounce.attributes.description.refillDashes=Whether the 'Refill Directions' property should refill dashes or not. +triggers.vitellary/coyotebounce.attributes.description.refillStamina=Whether the 'Refill Directions' property should refill stamina or not. # Flag Inside Trigger triggers.vitellary/flaginsidetrigger.attributes.description.flag=The flag to set while the player is inside the trigger. diff --git a/Loenn/triggers/coyote_bounce_trigger.lua b/Loenn/triggers/coyote_bounce_trigger.lua index bdbab2a..b83520e 100644 --- a/Loenn/triggers/coyote_bounce_trigger.lua +++ b/Loenn/triggers/coyote_bounce_trigger.lua @@ -29,6 +29,8 @@ coyoteBounceTrigger.placements = { refillDirections = "MatchCoyote", dashTypes = "Rebound", setGrounded = false, + refillDashes = true, + refillStamina = true, } } }