diff --git a/Entities/WaterRocketLaunchingComponent.cs b/Entities/WaterRocketLaunchingComponent.cs deleted file mode 100755 index f41c0b5..0000000 --- a/Entities/WaterRocketLaunchingComponent.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Xna.Framework; -using Monocle; -using System.Linq; - -namespace Celeste.Mod.SpringCollab2020.Entities { - /// - /// This is a replica of the "water zipping fix" from Isa's Grab Bag. - /// This has side effects so this is technically a bug, but these side effects are used in ProXas's entry - /// to give insane amounts of speed to the player with small spots of water. - /// So this should stay in the collab where needed, even if fixed on Isa's side. - /// - public class WaterRocketLaunchingComponent : Component { - public static void Load() { - On.Celeste.Player.Added += onPlayerAdded; - } - - public static void Unload() { - On.Celeste.Player.Added -= onPlayerAdded; - } - - private static void onPlayerAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { - orig(self, scene); - - string mapSID = self.SceneAs().Session.Area.GetSID(); - if (!self.Components.Any(component => component.GetType().ToString() == "Celeste.Mod.IsaGrabBag.WaterFix") && - (mapSID == "SpringCollab2020/2-Intermediate/ProXas" || mapSID == "SpringCollab2020/2-Intermediate/ZZ-HeartSide")) { - - // Isa's Grab Bag didn't add the "water fix" and the current map needs it, so add it ourselves. - self.Add(new WaterRocketLaunchingComponent(true, false)); - } - } - - public WaterRocketLaunchingComponent(bool active, bool visible) : base(active, visible) { } - - private Player player; - - public override void Update() { - player = Entity as Player; - if (player == null || !player.Collidable) { - return; - } - - Vector2 posOffset = player.Position + player.Speed * Engine.DeltaTime * 2; - - bool isInWater = player.CollideCheck(posOffset) || player.CollideCheck(posOffset + Vector2.UnitY * -8f); - - if (!isInWater && player.StateMachine.State == 3 && (player.Speed.Y < 0 || Input.MoveY.Value == -1 || Input.Jump.Check)) { - player.Speed.Y = (Input.MoveY.Value == -1 || Input.Jump.Check) ? -110 : 0; - if (player.Speed.Y < -1) { - player.Speed.X *= 1.1f; - } - } - } - } -} diff --git a/SpringCollab2020Module.cs b/SpringCollab2020Module.cs index fa74b4f..6bcf696 100644 --- a/SpringCollab2020Module.cs +++ b/SpringCollab2020Module.cs @@ -48,7 +48,6 @@ public override void Load() { StaticPuffer.Load(); LeaveTheoBehindTrigger.Load(); BadelineBounceDirectionTrigger.Load(); - WaterRocketLaunchingComponent.Load(); SpikeJumpThroughController.Load(); Everest.Events.Level.OnLoadBackdrop += onLoadBackdrop; @@ -99,7 +98,6 @@ public override void Unload() { StaticPuffer.Unload(); LeaveTheoBehindTrigger.Unload(); BadelineBounceDirectionTrigger.Unload(); - WaterRocketLaunchingComponent.Unload(); SpikeJumpThroughController.Unload(); Everest.Events.Level.OnLoadBackdrop -= onLoadBackdrop;