mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Reworked radiation math with the reacher equipped
This change makes reachers reduce incoming radiation that is under 1 RAD/tick.
This commit is contained in:
parent
b9ca43d578
commit
4d38e301d1
@ -34,7 +34,7 @@ public class HazardTypeRadiation extends HazardTypeBase {
|
||||
float rad = level / 20F;
|
||||
|
||||
if(reacher)
|
||||
rad = (float) Math.min(Math.sqrt(rad), rad); //to prevent radiation from going up when being <1
|
||||
rad = (float) Math.sqrt(rad + 1F / ((rad + 2F) * (rad + 2F))) - 1F / (rad + 2F); //Reworked radiation function: sqrt(x+1/(x+2)^2)-1/(x+2)
|
||||
|
||||
ContaminationUtil.contaminate(target, HazardType.RADIATION, ContaminationType.CREATIVE, rad);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user