Merge pull request #315 from TehTemmie/patch-1

Reworked radiation math with the reacher equipped
This commit is contained in:
HbmMods 2021-10-22 13:10:32 +02:00 committed by GitHub
commit 414cca55af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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