Skip to content

Commit ffa7e3a

Browse files
authored
Merge pull request #155 from EverestAPI/floatier-space-block-change
Floatier space block change
2 parents 0dec9e9 + caa08d1 commit ffa7e3a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Ahorn/entities/floatierSpaceBlock.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module SpringCollab2020FloatierSpaceBlock
22

33
using ..Ahorn, Maple
44

5-
@mapdef Entity "SpringCollab2020/floatierSpaceBlock" FloatierSpaceBlock(x::Integer, y::Integer, width::Integer=Maple.defaultBlockWidth, height::Integer=Maple.defaultBlockHeight, tiletype::String="3", disableSpawnOffset::Bool=false, floatinessMultiplier::Number=1.0, bounceBackMultiplier::Number=1.0)
5+
@mapdef Entity "SpringCollab2020/floatierSpaceBlock" FloatierSpaceBlock(x::Integer, y::Integer, width::Integer=Maple.defaultBlockWidth, height::Integer=Maple.defaultBlockHeight, tiletype::String="3", disableSpawnOffset::Bool=false, floatinessMultiplier::Number=1.0, bounceBackMultiplier::Number=1.0, dashOffsetMultiplier::Number=1.0)
66

77
const placements = Ahorn.PlacementDict(
88
"Floatier Space Block (Spring Collab 2020)" => Ahorn.EntityPlacement(

Ahorn/lang/en_gb.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ placements.entities.SpringCollab2020/floatierSpaceBlock.tooltips.disableSpawnOff
3636
placements.entities.SpringCollab2020/floatierSpaceBlock.tooltips.floatinessMultiplier=A multiplier for how far the block sinks.
3737
placements.entities.SpringCollab2020/floatierSpaceBlock.tooltips.tiletype=Determines the visual appearance of the wall.
3838
placements.entities.SpringCollab2020/floatierSpaceBlock.tooltips.bounceBackMultiplier=A multiplier for how fast the block bounces back when dashed into.
39+
placements.entities.SpringCollab2020/floatierSpaceBlock.tooltips.dashOffsetMultiplier=A multiplier for how far the block gets pushed back when dashed into.
3940

4041
# Invisible Light Source
4142
placements.entities.SpringCollab2020/invisibleLightSource.tooltips.alpha=Opacity of the light. Makes the bloom near the light stronger.

Entities/FloatierSpaceBlock.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Celeste.Mod.SpringCollab2020.Entities {
1010
public class FloatierSpaceBlock : FloatySpaceBlock {
1111
public float floatinessBoost;
1212
public float dashEaseMultiplier;
13+
public float dashOffsetMultiplier;
1314

1415
private static FieldInfo sinkTimerInfo = typeof(FloatySpaceBlock).GetField("sinkTimer", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField);
1516
private static FieldInfo yLerpInfo = typeof(FloatySpaceBlock).GetField("yLerp", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField);
@@ -22,6 +23,7 @@ public class FloatierSpaceBlock : FloatySpaceBlock {
2223
public FloatierSpaceBlock(EntityData data, Vector2 offset) : base(data, offset) {
2324
floatinessBoost = data.Float("floatinessMultiplier", 1);
2425
dashEaseMultiplier = data.Float("bounceBackMultiplier", 1);
26+
dashOffsetMultiplier = data.Float("dashOffsetMultiplier", floatinessBoost);
2527
}
2628

2729
public static void Load() {
@@ -81,7 +83,7 @@ public override void Update() {
8183

8284
private void MoveToTarget() {
8385
float sineWavePos = (float) Math.Sin((float)sineWaveInfo.GetValue(this)) * 4f;
84-
Vector2 dashOffset = Calc.YoYo(Ease.QuadIn((float)dashEaseInfo.GetValue(this))) * (Vector2)dashDirectionInfo.GetValue(this) * 8f * floatinessBoost;
86+
Vector2 dashOffset = Calc.YoYo(Ease.QuadIn((float)dashEaseInfo.GetValue(this))) * (Vector2)dashDirectionInfo.GetValue(this) * 8f * dashOffsetMultiplier;
8587
for (int i = 0; i < 2; i++) {
8688
foreach (KeyValuePair<Platform, Vector2> move in Moves) {
8789
Platform key = move.Key;

0 commit comments

Comments
 (0)