Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Audio/VortexHelperBank.bank
Binary file not shown.
3 changes: 2 additions & 1 deletion Audio/VortexHelperBank.guids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
{29b11458-c153-4eb0-a380-c24ca1aa17b5} bank:/VortexHelperBank
1 change: 1 addition & 0 deletions Code/CustomSFX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
76 changes: 54 additions & 22 deletions Code/Entities/Lilly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Actor>())
{
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");
Expand Down Expand Up @@ -92,33 +110,37 @@ 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;

private readonly SoundSource sfx;

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;

private readonly List<StaticMover> leftStaticMovers = new();
private readonly List<StaticMover> 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);

Expand All @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -239,7 +271,7 @@ private IEnumerator DashedSequence()
});

moveAmount = rightArmEnd.X - moveAmount;
rightArm.UpdateArm(moveAmount);
rightArm.UpdateArm(moveAmount, this.armsGiveLiftSpeed);

if (rightArmExtended)
{
Expand All @@ -261,7 +293,7 @@ private IEnumerator DashedSequence()
});

moveAmount = leftArmEnd.X - moveAmount;
leftArm.UpdateArm(moveAmount);
leftArm.UpdateArm(moveAmount, this.armsGiveLiftSpeed);

if (leftArmExtended)
{
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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++)
Expand Down
2 changes: 1 addition & 1 deletion Code/VortexHelper.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>VortexHelper</AssemblyName>
<RootNamespace>Celeste.Mod.VortexHelper</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
1 change: 0 additions & 1 deletion Code/VortexHelperModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public override void LoadContent(bool firstLoad)
LavenderBooster.InitializeParticles();
VortexBumper.InitializeParticles();
BubbleWrapBlock.InitializeParticles();
Lilly.InitializeTextures();
}

public override void Load()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions Loenn/entities/lilly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ lilly.placements = {
height = 24,
maxLength = 64,
spriteDir = "",
overclocked = false,
armsGiveLiftSpeed = false,
idleColor = "0061ff",
climbedOnColor = "ff38f1",
dashColor = "ff0033",
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Loenn/lang/en_gb.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down