Configurable transition time

This commit is contained in:
patience 2026-04-13 12:40:44 +01:00
parent 0f25359625
commit 40e277d51d
No known key found for this signature in database
5 changed files with 21 additions and 5 deletions

View file

@ -48,7 +48,7 @@ namespace smoothDeathTransitions {
}
public int transitionTicker = 0;
public int transitionTime = 200;
public int transitionTime = ModContent.GetInstance<TransitionsConfig>().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<TransitionsConfig>().transitionTime;
Filters.Scene[transitionChosen].Deactivate();
}
}

View file

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

View file

@ -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.

View file

@ -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]

View file

@ -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.
'''
}
}
}
}