From 3cdccbd8cb5cbe0a7bc0133ae1b2091e9b68758a Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sun, 14 Apr 2024 21:47:14 -0700 Subject: [PATCH] Replace exact float comparison with Approximately --- .../RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 7ed79bd..9adbd95 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -1480,7 +1480,7 @@ namespace RJW_Menstruation float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer); float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor; Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, " + - (interspeciesFactor != 1.0f ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") + + ((!Mathf.Approximately(interspeciesFactor, 1.0f)) ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") + $"father {egg.fertilizer})"); } deadeggs.Add(egg);