Allow JSON Mods To Disable Progress Clamping (#10114)

* par

* 1. im dumb

2. im stupid
This commit is contained in:
Mythril382
2024-10-05 10:49:12 +08:00
committed by GitHub
parent 78cc5bef36
commit d96667679e
5 changed files with 17 additions and 8 deletions

View File

@@ -96,9 +96,13 @@ public abstract class DrawPart{
}
default float getClamp(PartParams p){
return Mathf.clamp(get(p));
return getClamp(p, true);
}
default float getClamp(PartParams p, boolean clamp){
return clamp ? Mathf.clamp(get(p)) : get(p);
}
default PartProgress inv(){
return p -> 1f - get(p);
}