diff --git a/Ahorn/entities/maxHelpingHandReskinnableFloatingDebris.jl b/Ahorn/entities/maxHelpingHandReskinnableFloatingDebris.jl index c5a7e6b..02b3374 100644 --- a/Ahorn/entities/maxHelpingHandReskinnableFloatingDebris.jl +++ b/Ahorn/entities/maxHelpingHandReskinnableFloatingDebris.jl @@ -3,7 +3,7 @@ using ..Ahorn, Maple @mapdef Entity "MaxHelpingHand/ReskinnableFloatingDebris" ReskinnableFloatingDebris(x::Integer, y::Integer, texture::String="scenery/debris", depth::Int=-5, - interactWithPlayer::Bool=true, debrisWidth::Int=8, debrisHeight::Int=8, rotateSpeed::String="", scrollX::Number=0.0, scrollY::Number=0.0) + interactWithPlayer::Bool=true, debrisWidth::Int=8, debrisHeight::Int=8, rotateSpeed::String="", scrollX::Number=0.0, scrollY::Number=0.0, floating::Bool=true) const placements = Ahorn.PlacementDict( "Floating Debris (Reskinnable) (Maddie's Helping Hand)" => Ahorn.EntityPlacement( diff --git a/Ahorn/lang/en_gb.lang b/Ahorn/lang/en_gb.lang index 43f5d9d..3ac8726 100644 --- a/Ahorn/lang/en_gb.lang +++ b/Ahorn/lang/en_gb.lang @@ -641,6 +641,7 @@ placements.entities.MaxHelpingHand/ReskinnableFloatingDebris.tooltips.debrisHeig placements.entities.MaxHelpingHand/ReskinnableFloatingDebris.tooltips.rotateSpeed=The rotation speed of the debris (in radians/s). Use negative values for counterclockwise rotation.\nLeave empty to get the vanilla behavior: a random integer value from -2 to 2. placements.entities.MaxHelpingHand/ReskinnableFloatingDebris.tooltips.scrollX=The amount of pixels the debris move horizontally when the camera moves right by 1 pixel.\nOnly works with "Interact With Player" disabled.\nThe X position of the debris will be: X + (scroll X * amount of pixels the camera scrolled from the left of the room). placements.entities.MaxHelpingHand/ReskinnableFloatingDebris.tooltips.scrollY=The amount of pixels the debris move vertically when the camera moves down by 1 pixel.\nOnly works with "Interact With Player" disabled.\nThe Y position of the debris will be: Y + (scroll Y * amount of pixels the camera scrolled from the top of the room). +placements.entities.MaxHelpingHand/ReskinnableFloatingDebris.tooltips.floating=Whether the debris continually float up and down, like vanilla debris. # Sideways Lava placements.entities.MaxHelpingHand/SidewaysLava.tooltips.intro=Determines whether the lava moves into the screen or starts already present on the screen. Not suitable for sandwich lava. diff --git a/Entities/ReskinnableFloatingDebris.cs b/Entities/ReskinnableFloatingDebris.cs index 5e698e0..1491833 100644 --- a/Entities/ReskinnableFloatingDebris.cs +++ b/Entities/ReskinnableFloatingDebris.cs @@ -46,6 +46,13 @@ public static Entity Load(Level level, LevelData levelData, Vector2 offset, Enti debris.Add(new TransitionListener() { OnIn = _ => positionUpdater.Update(), OnOut = _ => positionUpdater.Update() }); } + // Floating option + if (!entityData.Bool("floating", defaultValue: true)) { + SineWave sine = debris.Get(); + debris.Remove(sine); + sine.Reset(); + } + floatingDebrisSkin = null; floatingDebrisWidth = null; floatingDebrisHeight = null; diff --git a/Loenn/entities/reskinnableFloatingDebris.lua b/Loenn/entities/reskinnableFloatingDebris.lua index d71cac4..a887b63 100644 --- a/Loenn/entities/reskinnableFloatingDebris.lua +++ b/Loenn/entities/reskinnableFloatingDebris.lua @@ -15,7 +15,8 @@ floatingDebris.placements = { interactWithPlayer = true, rotateSpeed = "", scrollX = 0, - scrollY = 0 + scrollY = 0, + floating = true } } diff --git a/Loenn/lang/en_gb.lang b/Loenn/lang/en_gb.lang index e2e856d..5b2bad0 100644 --- a/Loenn/lang/en_gb.lang +++ b/Loenn/lang/en_gb.lang @@ -600,6 +600,7 @@ entities.MaxHelpingHand/ReskinnableFloatingDebris.attributes.description.debrisH entities.MaxHelpingHand/ReskinnableFloatingDebris.attributes.description.rotateSpeed=The rotation speed of the debris (in radians/s). Use negative values for counterclockwise rotation.\nLeave empty to get the vanilla behavior: a random integer value from -2 to 2. entities.MaxHelpingHand/ReskinnableFloatingDebris.attributes.description.scrollX=The amount of pixels the debris move horizontally when the camera moves right by 1 pixel.\nOnly works with "Interact With Player" disabled.\nThe X position of the debris will be: X + (scroll X * amount of pixels the camera scrolled from the left of the room). entities.MaxHelpingHand/ReskinnableFloatingDebris.attributes.description.scrollY=The amount of pixels the debris move vertically when the camera moves down by 1 pixel.\nOnly works with "Interact With Player" disabled.\nThe Y position of the debris will be: Y + (scroll Y * amount of pixels the camera scrolled from the top of the room). +entities.MaxHelpingHand/ReskinnableFloatingDebris.attributes.description.floating=Whether the debris continually float up and down, like vanilla debris. # Reskinnable Star Rotate Spinner entities.MaxHelpingHand/ReskinnableStarRotateSpinner.placements.name.clockwise=Rotating Spinner (Starfish, Clockwise, Reskinnable) diff --git a/everest.yaml b/everest.yaml index 8169cc2..9aafe69 100644 --- a/everest.yaml +++ b/everest.yaml @@ -1,6 +1,6 @@ # The mod used to be known as "max480's Helping Hand", and wasn't renamed for compatibility reasons - Name: MaxHelpingHand - Version: 1.28.2 + Version: 1.28.3 DLL: bin/Release/net452/MaxHelpingHand.dll Dependencies: - Name: Everest