diff --git a/Audio/VortexHelperBank.bank b/Audio/VortexHelperBank.bank index e39e1b9..3a0ba12 100644 Binary files a/Audio/VortexHelperBank.bank and b/Audio/VortexHelperBank.bank differ diff --git a/Audio/VortexHelperBank.guids.txt b/Audio/VortexHelperBank.guids.txt index a48177f..8004b43 100644 --- a/Audio/VortexHelperBank.guids.txt +++ b/Audio/VortexHelperBank.guids.txt @@ -2,6 +2,7 @@ {0fd9651a-4cf1-4c0d-8f09-66c8ce319a5c} event:/vortexHelperEvents/game/killLightningTrigger/break {c68117b9-84b5-4055-b05d-f9acb84d5a2c} event:/vortexHelperEvents/game/switchBlock/switch {6a582f2f-d8b6-43ca-a068-4f9259bc3311} event:/vortexHelperEvents/game/lilly/dashed +{ccdb0965-ce51-4400-974f-f8dbc7525b78} event:/vortexHelperEvents/game/lilly/OCdashed {439237fc-531b-4cdb-b80e-55218f4eea18} event:/vortexHelperEvents/game/lilly/arm_conveyor {88156450-b139-45fa-a4d4-f1eadc56e38c} event:/vortexHelperEvents/game/lilly/arm_impact -{29b11458-c153-4eb0-a380-c24ca1aa17b5} bank:/VortexHelperBank \ No newline at end of file +{29b11458-c153-4eb0-a380-c24ca1aa17b5} bank:/VortexHelperBank diff --git a/Code/CustomSFX.cs b/Code/CustomSFX.cs index 73a812a..7cc7054 100644 --- a/Code/CustomSFX.cs +++ b/Code/CustomSFX.cs @@ -10,6 +10,7 @@ public class CustomSFX // Lilly public const string game_lilly_dashed = "event:/vortexHelperEvents/game/lilly/dashed"; + public const string game_lilly_OCdashed = "event:/vortexHelperEvents/game/lilly/OCdashed"; public const string game_lilly_conveyor = "event:/vortexHelperEvents/game/lilly/arm_conveyor"; public const string game_lilly_arm_impact = "event:/vortexHelperEvents/game/lilly/arm_impact"; diff --git a/Code/Entities/Lilly.cs b/Code/Entities/Lilly.cs index 16b4564..ee054ea 100644 --- a/Code/Entities/Lilly.cs +++ b/Code/Entities/Lilly.cs @@ -43,15 +43,33 @@ public LillyArm(Vector2 position, LillyArmEnd to, int fromX, int endOffset) this.SurfaceSoundIndex = SurfaceIndex.CassetteBlock; } - public void UpdateArm(float move) + public void UpdateArm(float move, bool armsGiveLiftSpeed) { MoveH(move); + if (this.Collidable && armsGiveLiftSpeed) + { + foreach (Actor entity in Scene.Tracker.GetEntities()) + { + if (entity.IsRiding(this)) + { + if (entity.TreatNaive) + { + entity.LiftSpeed = LiftSpeed; + } + else + { + entity.LiftSpeed = LiftSpeed; + } + } + } + } + this.X = this.From; this.Collider = Math.Abs(this.end.Distance) > 0 ? new Hitbox(this.To - this.From, 5) : null; } } - - public const float ArmSpeed = 240; + + public float ArmSpeed; public const float ArmSpeedRetract = 112; private readonly Color idleColor = Calc.HexToColor("0061ff"); @@ -92,8 +110,8 @@ public enum FaceState * k ---> frame of the texture, between 0 and 1. * l ---> state of the texture (0 = 'block', 1 = 'active_block'). */ - private static readonly MTexture[,,,] blockTextures = new MTexture[3, 4, 2, 2]; - private static readonly MTexture[] armEndTextures = new MTexture[4]; + private readonly MTexture[,,,] blockTextures = new MTexture[3, 4, 2, 2]; + private readonly MTexture[] armEndTextures = new MTexture[4]; private readonly int maxLength; @@ -101,6 +119,10 @@ public enum FaceState private bool Activated => this.faceState is FaceState.Dash or FaceState.Retract; private bool WasUsedOnce => this.faceState is FaceState.IdleAlt or FaceState.ClimbedOnAlt; + + private readonly bool overClocked; + + public readonly bool armsGiveLiftSpeed; private readonly BloomPoint bloom; @@ -108,17 +130,17 @@ public enum FaceState private readonly List rightStaticMovers = new(); public Lilly(EntityData data, Vector2 offset) - : this(data.Position + offset, data.Height, data.Int("maxLength"), data.Attr("spriteDir", "").Trim().TrimEnd('/'), + : this(data.Position + offset, data.Height, data.Int("maxLength"), data.Attr("spriteDir", "").Trim().TrimEnd('/'), data.Bool("overclocked"), data.Bool("armsGiveLiftSpeed"), data.HexColor("idleColor", Calc.HexToColor("0061ff")), data.HexColor("climbedOnColor", Calc.HexToColor("ff38f1")), data.HexColor("dashColor", Calc.HexToColor("ff0033")), data.HexColor("retractColor", Calc.HexToColor("4800ff")), data.HexColor("idleAltColor", Calc.HexToColor("00d0ff")), data.HexColor("climbedOnAltColor", Calc.HexToColor("f432ff")), data.HexColor("horrifiedColor", Calc.HexToColor("bc51ff"))) { } - public Lilly(Vector2 position, int height, int maxLength, string spriteDir, + public Lilly(Vector2 position, int height, int maxLength, string spriteDir, bool overClocked, bool armsGiveLiftSpeed, Color idleColor, Color climbedOnColor, Color dashColor, Color retractColor, Color idleAltColor, Color climbedOnAltColor, Color horrifiedColor) : base(position, 24, height, true) { this.SurfaceSoundIndex = SurfaceIndex.CassetteBlock; - this.arm = GFX.Game.GetAtlasSubtextures(string.IsNullOrEmpty(spriteDir) ? "objects/VortexHelper/squareBumperNew/arm" : spriteDir + "/arm"); + this.arm = GFX.Game.GetAtlasSubtextures(string.IsNullOrEmpty(spriteDir) ? (overClocked ? "objects/VortexHelper/squareBumperNew/OCarm" : "objects/VortexHelper/squareBumperNew/arm") : spriteDir + "/arm"); this.maxLength = Math.Abs(maxLength); @@ -129,6 +151,8 @@ public Lilly(Vector2 position, int height, int maxLength, string spriteDir, Position = middle }); + this.armsGiveLiftSpeed = armsGiveLiftSpeed; + this.overClocked = overClocked; this.idleColor = idleColor; this.climbedOnColor = climbedOnColor; this.dashColor = dashColor; @@ -143,15 +167,21 @@ public Lilly(Vector2 position, int height, int maxLength, string spriteDir, this.face.Color = this.idleColor; Add(this.face); - if (!string.IsNullOrEmpty(spriteDir)) InitializeTextures(spriteDir); + if (!string.IsNullOrEmpty(spriteDir)) + InitializeTextures(spriteDir); + else + InitializeTextures("objects/VortexHelper/squareBumperNew"); this.OnDashCollide = OnDashed; + this.ArmSpeed = overClocked ? 360f : 240f; + Add(this.bloom = new BloomPoint(.65f, 16f) { Position = middle, - Visible = false + Visible = false, }); + } private static Sprite BuildCustomFaceSprite(string path) @@ -203,10 +233,12 @@ private IEnumerator DashedSequence() // Dashed in, shaking. this.faceState = FaceState.Dash; this.face.Play("dashed", true); + if (this.overClocked) + this.face.Rate = 2; ChangeColor(dashColor); - StartShaking(0.375f); - Audio.Play(CustomSFX.game_lilly_dashed, this.Center); - yield return 0.5f; + StartShaking(this.overClocked ? 0.1875f : 0.375f); + Audio.Play(this.overClocked ? CustomSFX.game_lilly_OCdashed : CustomSFX.game_lilly_dashed, this.Center); + yield return this.overClocked ? 0.25f : 0.5f; // Arms extend. this.rightLength = this.leftLength = 0f; @@ -239,7 +271,7 @@ private IEnumerator DashedSequence() }); moveAmount = rightArmEnd.X - moveAmount; - rightArm.UpdateArm(moveAmount); + rightArm.UpdateArm(moveAmount, this.armsGiveLiftSpeed); if (rightArmExtended) { @@ -261,7 +293,7 @@ private IEnumerator DashedSequence() }); moveAmount = leftArmEnd.X - moveAmount; - leftArm.UpdateArm(moveAmount); + leftArm.UpdateArm(moveAmount, this.armsGiveLiftSpeed); if (leftArmExtended) { @@ -309,7 +341,7 @@ private IEnumerator DashedSequence() float move = newX - rightArmEnd.X; rightArmEnd.MoveH(move); - rightArm.UpdateArm(move); + rightArm.UpdateArm(move, this.armsGiveLiftSpeed); rightArmExtended = !finished; } @@ -328,7 +360,7 @@ private IEnumerator DashedSequence() float move = newX - leftArmEnd.X; leftArmEnd.MoveH(move); - leftArm.UpdateArm(move); + leftArm.UpdateArm(move, this.armsGiveLiftSpeed); leftArmExtended = !finished; } @@ -514,12 +546,12 @@ public override void Render() this.Position = pos; } - public static void InitializeTextures(string path = "objects/VortexHelper/squareBumperNew") + public void InitializeTextures (string path) { - MTexture block00 = GFX.Game[path + "/block00"]; - MTexture block01 = GFX.Game[path + "/block01"]; - MTexture active_block00 = GFX.Game[path + "/active_block00"]; - MTexture active_block01 = GFX.Game[path + "/active_block01"]; + MTexture block00 = GFX.Game[path + (this.overClocked ? "/OCblock00" : "/block00")]; + MTexture block01 = GFX.Game[path + (this.overClocked ? "/OCblock01" : "/block01")]; + MTexture active_block00 = GFX.Game[path + (this.overClocked ? "/OCactive_block00" : "/active_block00")]; + MTexture active_block01 = GFX.Game[path + (this.overClocked ? "/OCactive_block01" : "/active_block01")]; MTexture armend = GFX.Game[path + "/armend"]; for (int j = 0; j < 4; j++) diff --git a/Code/VortexHelper.csproj b/Code/VortexHelper.csproj index 514ac84..62c0fcf 100644 --- a/Code/VortexHelper.csproj +++ b/Code/VortexHelper.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 VortexHelper Celeste.Mod.VortexHelper latest diff --git a/Code/VortexHelperModule.cs b/Code/VortexHelperModule.cs index c5fd84d..db62ac2 100644 --- a/Code/VortexHelperModule.cs +++ b/Code/VortexHelperModule.cs @@ -54,7 +54,6 @@ public override void LoadContent(bool firstLoad) LavenderBooster.InitializeParticles(); VortexBumper.InitializeParticles(); BubbleWrapBlock.InitializeParticles(); - Lilly.InitializeTextures(); } public override void Load() diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block00.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block00.png new file mode 100644 index 0000000..b3790e8 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block00.png differ diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block01.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block01.png new file mode 100644 index 0000000..4ebb8a1 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCactive_block01.png differ diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm00.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm00.png new file mode 100644 index 0000000..bb9aa90 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm00.png differ diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm01.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm01.png new file mode 100644 index 0000000..b322e94 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCarm01.png differ diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock00.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock00.png new file mode 100644 index 0000000..8920672 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock00.png differ diff --git a/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock01.png b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock01.png new file mode 100644 index 0000000..5672787 Binary files /dev/null and b/Graphics/Atlases/Gameplay/objects/VortexHelper/squareBumperNew/OCblock01.png differ diff --git a/Loenn/entities/lilly.lua b/Loenn/entities/lilly.lua index 3240d15..8dd3293 100644 --- a/Loenn/entities/lilly.lua +++ b/Loenn/entities/lilly.lua @@ -49,6 +49,8 @@ lilly.placements = { height = 24, maxLength = 64, spriteDir = "", + overclocked = false, + armsGiveLiftSpeed = false, idleColor = "0061ff", climbedOnColor = "ff38f1", dashColor = "ff0033", @@ -68,10 +70,10 @@ local color local function reloadSprites(entity) local spriteDir = (entity.spriteDir ~= "" and entity.spriteDir) and entity.spriteDir or defaultSpriteDir - block = spriteDir .. "/block00" + block = spriteDir .. (entity.overclocked and "/OCblock00" or "/block00") face = spriteDir .. "/face12" armend = spriteDir .. "/armend" - arm = spriteDir .. "/arm00" + arm = spriteDir .. (entity.overclocked and "/OCarm00" or "/arm00") color = entity.idleColor or { 0.0, 208 / 255, 1.0, 1.0 } end diff --git a/Loenn/lang/en_gb.lang b/Loenn/lang/en_gb.lang index 09e4aab..04afc25 100644 --- a/Loenn/lang/en_gb.lang +++ b/Loenn/lang/en_gb.lang @@ -68,6 +68,8 @@ entities.VortexHelper/FloorBooster.attributes.description.notAttached=If ticked, entities.VortexHelper/Lilly.placements.name.lilly=Lilly entities.VortexHelper/Lilly.attributes.description.maxLength=The maximum distance at which this Lilly's arms can extend. entities.VortexHelper/Lilly.attributes.description.spriteDir=Custom sprite path for this Lilly that leads to custom frames.\nThe frame count and image names must match the ones from the original skin.\nFor instance: face00.png, face01.png, face02.png, ..., arm00.png, arm01.png, etc.\nThe sprites must be located somewhere in the Gameplay atlas (somewhere in Graphics/Atlases/Gameplay/).\n\nExample: objects/myMap/myCustomLilly\n..should be valid if there exists files whose paths are Graphics/Atlases/Gameplay/objects/myMap/myCustomLilly/face00.png, etc. +entities.VortexHelper/Lilly.attributes.description.overclocked=This Lilly will become overclocked! Halves the activation time and increases the arm extension speed by 50% (total of 360 speed). (Warranty void if enabled) +entities.VortexHelper/Lilly.attributes.description.armsGiveLiftSpeed=By default, the platform part of the arms don't give any liftspeed to the player, only the block at the end of each arm does. This setting allows any part of the arms to provide liftspeed to the player. (Enjoy the multiboosts :3c) # Puffer Barrier