From 40e277d51d0d1545978562da73df3ec5c90fa2c7 Mon Sep 17 00:00:00 2001 From: patience Date: Mon, 13 Apr 2026 12:40:44 +0100 Subject: [PATCH] Configurable transition time --- TransitionPlayer.cs | 3 ++- TransitionsConfig.cs | 8 +++++++- description.txt | 4 ++-- description_workshop.txt | 2 +- en-US.hjson | 9 +++++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/TransitionPlayer.cs b/TransitionPlayer.cs index 273aa22..5cd0d55 100644 --- a/TransitionPlayer.cs +++ b/TransitionPlayer.cs @@ -48,7 +48,7 @@ namespace smoothDeathTransitions { } public int transitionTicker = 0; - public int transitionTime = 200; + public int transitionTime = ModContent.GetInstance().transitionTime; public string transitionChosen; public override void PreUpdate() @@ -70,6 +70,7 @@ namespace smoothDeathTransitions { float progress = ((float)(transitionTime-transitionTicker)/(float)transitionTime)*100f; // 0-100% Filters.Scene[transitionChosen].GetShader().UseProgress(progress); if(transitionTicker==0){ + transitionTime=ModContent.GetInstance().transitionTime; Filters.Scene[transitionChosen].Deactivate(); } } diff --git a/TransitionsConfig.cs b/TransitionsConfig.cs index 5182482..3529708 100644 --- a/TransitionsConfig.cs +++ b/TransitionsConfig.cs @@ -18,6 +18,12 @@ namespace smoothDeathTransitions [TooltipKey("$DefaultTransitionTooltip")] [DrawTicks] [OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Prideful"])] - public string DefaultTransition; + public string DefaultTransition; + + [DefaultValue(160)] + [Range(10, 400)] + [Increment(10)] + [Slider] + public int transitionTime; } } \ No newline at end of file diff --git a/description.txt b/description.txt index ee4b002..8cae7fc 100644 --- a/description.txt +++ b/description.txt @@ -1,4 +1,4 @@ -Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side, does not alter gameplay. Open-source, if you'd like a shader-specific example mod. +Updates the traditional death screen with configurable, smooth transition shaders when you respawn. Fully client-side, does not alter gameplay. Open-source, if you'd like a shader-specific example mod. Currently available transitions: - Lines - staggered vertical sweep. Default if biome-specific transitions are disabled. @@ -16,4 +16,4 @@ Currently available transitions: Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition. -Successor of the Celeste Death Transition mod, which was a two-hour project I made after getting bored one evening. This one has marginally more thought put into it. +Successor of the Celeste Death Transition mod, which was a short project I made after getting bored one evening. This one has marginally more thought put into it. diff --git a/description_workshop.txt b/description_workshop.txt index 815948a..9da7ea4 100644 --- a/description_workshop.txt +++ b/description_workshop.txt @@ -1,6 +1,6 @@ [h1]Smooth Death Transitions[/h1] -Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side, does not alter gameplay. Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition for your position. +Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side (does not alter gameplay) and configurable. Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition for your position. Currently available transitions: [list] diff --git a/en-US.hjson b/en-US.hjson index dc0af88..071bbbe 100644 --- a/en-US.hjson +++ b/en-US.hjson @@ -14,6 +14,15 @@ Mods: { DisplayName: Transitions Config DefaultTransition.Label: Default Transition + + transitionTime: { + Label: Transition Length + Tooltip: + ''' + How long you'd like the shader to play for. If set to above your death timer, the transition will appear half-complete. + Updates after your next death. + ''' + } } } }