From 4171ec5f7d4c66b0113c5c9145650a468f4ee78f Mon Sep 17 00:00:00 2001 From: bigkahuna443 <13278973+bigkahuna443@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:21:17 -0400 Subject: [PATCH] Add SpeedSetter functions to holdables This allows holdables to be affected by entities that use SpeedSetter (e.g. Frost Helper custom springs) --- Code/FLCC/CustomPuffer.cs | 1 + Code/FLCC/FlagCrystal.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Code/FLCC/CustomPuffer.cs b/Code/FLCC/CustomPuffer.cs index f9f5409..baaa808 100644 --- a/Code/FLCC/CustomPuffer.cs +++ b/Code/FLCC/CustomPuffer.cs @@ -147,6 +147,7 @@ public CustomPuffer(EntityData data, Vector2 offset, EntityID id) Hold.OnPickup = OnPickup; Hold.OnRelease = OnRelease; Hold.SpeedGetter = (() => hitSpeed); + Hold.SpeedSetter = (speed) => hitSpeed = speed; Add(new TransitionListener { OnOut = (f) => needsNewHome = true diff --git a/Code/FLCC/FlagCrystal.cs b/Code/FLCC/FlagCrystal.cs index ad7f22b..f2d6621 100644 --- a/Code/FLCC/FlagCrystal.cs +++ b/Code/FLCC/FlagCrystal.cs @@ -57,6 +57,7 @@ public FlagCrystal(EntityData data, Vector2 offset, EntityID id) : base(data.Pos Hold.OnHitSpring = new Func(HitSpring); Hold.OnHitSpinner = new Action(HitSpinner); Hold.SpeedGetter = () => Speed; + Hold.SpeedSetter = (speed) => Speed = speed; onCollideH = new Collision(OnCollideH); onCollideV = new Collision(OnCollideV); LiftSpeedGraceTime = 0.1f;