Skip to content

Commit 509e1e8

Browse files
committed
Add sound option to Reskinnable Star Track Spinners
1 parent af3a574 commit 509e1e8

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

Ahorn/entities/maxHelpingHandReskinnableStarTrackSpinner.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
using ..Ahorn, Maple
44

5-
@pardef ReskinnableStarTrackSpinner(x1::Integer, y1::Integer, x2::Integer=x1 + 16, y2::Integer=y1, speed::String="Normal", startCenter::Bool=false, spriteFolder::String="danger/MaxHelpingHand/starSpinner", particleColors::String="EA64B7|3EE852,67DFEA|E85351,EA582C|33BDE8", immuneToGuneline::Bool=false) =
6-
Entity("MaxHelpingHand/ReskinnableStarTrackSpinner", x=x1, y=y1, nodes=Tuple{Int, Int}[(x2, y2)], speed=speed, startCenter=startCenter, spriteFolder=spriteFolder, particleColors=particleColors, immuneToGuneline=immuneToGuneline)
5+
@pardef ReskinnableStarTrackSpinner(x1::Integer, y1::Integer, x2::Integer=x1 + 16, y2::Integer=y1, speed::String="Normal", startCenter::Bool=false,
6+
spriteFolder::String="danger/MaxHelpingHand/starSpinner", particleColors::String="EA64B7|3EE852,67DFEA|E85351,EA582C|33BDE8",
7+
immuneToGuneline::Bool=false, sound::String="event:/game/05_mirror_temple/bladespinner_spin") =
8+
Entity("MaxHelpingHand/ReskinnableStarTrackSpinner", x=x1, y=y1, nodes=Tuple{Int, Int}[(x2, y2)], speed=speed, startCenter=startCenter, spriteFolder=spriteFolder,
9+
particleColors=particleColors, immuneToGuneline=immuneToGuneline, sound=sound)
710

811
const placements = Ahorn.PlacementDict(
912
"Star (Track, $(uppercasefirst(speed)), Reskinnable) (Maddie's Helping Hand)" => Ahorn.EntityPlacement(

Ahorn/lang/en_gb.lang

+1
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ placements.entities.MaxHelpingHand/ReskinnableStarTrackSpinner.tooltips.startCen
483483
placements.entities.MaxHelpingHand/ReskinnableStarTrackSpinner.tooltips.spriteFolder=The folder containing the star sprites. You can make your own by taking example on the Graphics/Atlases/Gameplay/danger/MaxHelpingHand/starSpinner folder that ships with the mod.
484484
placements.entities.MaxHelpingHand/ReskinnableStarTrackSpinner.tooltips.particleColors=The colors for the particles following the stars, in the format color1|color2,color1|color2... There should be the same amount of color pairs as there are different sprites for the star spinners.
485485
placements.entities.MaxHelpingHand/ReskinnableStarTrackSpinner.tooltips.immuneToGuneline=Whether the spinner should be immune to gunshots (with the Guneline mod).
486+
placements.entities.MaxHelpingHand/ReskinnableStarTrackSpinner.tooltips.sound=The sound the spinner makes when moving.
486487

487488
# Reskinnable Star Rotate Spinner
488489
placements.entities.MaxHelpingHand/ReskinnableStarRotateSpinner.tooltips.clockwise=The spinning star will run clockwise.

Entities/ReskinnableStarTrackSpinner.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class ReskinnableStarTrackSpinner : TrackSpinner {
1616
private int colorID;
1717
private bool trail;
1818
private bool immuneToGuneline;
19+
private string sound;
1920

2021
private static ILHook modGunelineCollisionCheck = null;
2122

@@ -35,6 +36,7 @@ public static void Unload() {
3536

3637
public ReskinnableStarTrackSpinner(EntityData data, Vector2 offset) : base(data, offset) {
3738
immuneToGuneline = data.Bool("immuneToGuneline");
39+
sound = data.Attr("sound", defaultValue: "event:/game/05_mirror_temple/bladespinner_spin");
3840

3941
string[] particleColorsAsStrings = data.Attr("particleColors", "EA64B7|3EE852,67DFEA|E85351,EA582C|33BDE8").Split(',');
4042
trailParticles = new ParticleType[particleColorsAsStrings.Length];
@@ -72,7 +74,7 @@ public override void OnTrackStart() {
7274
colorID %= trailParticles.Length;
7375
sprite.Play("spin" + colorID);
7476
if (hasStarted) {
75-
Audio.Play("event:/game/05_mirror_temple/bladespinner_spin", Position);
77+
Audio.Play(sound, Position);
7678
}
7779
hasStarted = true;
7880
trail = true;

Loenn/entities/reskinnableStarTrackSpinner.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ for speedName, speedValue in pairs(speeds) do
3131
startCenter = false,
3232
spriteFolder = "danger/MaxHelpingHand/starSpinner",
3333
particleColors = "EA64B7|3EE852,67DFEA|E85351,EA582C|33BDE8",
34-
immuneToGuneline = false
34+
immuneToGuneline = false,
35+
sound = "event:/game/05_mirror_temple/bladespinner_spin"
3536
}
3637
})
3738
end

Loenn/lang/en_gb.lang

+1
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ entities.MaxHelpingHand/ReskinnableStarTrackSpinner.attributes.description.start
650650
entities.MaxHelpingHand/ReskinnableStarTrackSpinner.attributes.description.spriteFolder=The folder containing the star sprites. You can make your own by taking example on the Graphics/Atlases/Gameplay/danger/MaxHelpingHand/starSpinner folder that ships with the mod.
651651
entities.MaxHelpingHand/ReskinnableStarTrackSpinner.attributes.description.particleColors=The colors for the particles following the stars, in the format color1|color2,color1|color2... There should be the same amount of color pairs as there are different sprites for the star spinners.
652652
entities.MaxHelpingHand/ReskinnableStarTrackSpinner.attributes.description.immuneToGuneline=Whether the spinner should be immune to gunshots (with the Guneline mod).
653+
entities.MaxHelpingHand/ReskinnableStarTrackSpinner.attributes.description.sound=The sound the spinner makes when moving.
653654

654655
# Reskinnable Swap Block
655656
entities.MaxHelpingHand/ReskinnableSwapBlock.placements.name.swapblock=Swap Block (Reskinnable)

0 commit comments

Comments
 (0)