Remove unnecessary "?? null"

This commit is contained in:
lutepickle 2024-05-17 20:19:04 -07:00
parent 514ffdf324
commit 16d17e01d7
2 changed files with 5 additions and 5 deletions

View file

@ -217,7 +217,7 @@ namespace RJW_Menstruation
if (info != null)
{
res = info.GetHybridWith(opposite.def.defName) ?? null;
res = info.GetHybridWith(opposite.def.defName);
}
if (res != null) return res;
@ -226,14 +226,14 @@ namespace RJW_Menstruation
dna = first.def.GetModExtension<PawnDNAModExtension>();
if (dna != null)
{
res = dna.GetHybridWith(second.def.defName) ?? null;
res = dna.GetHybridWith(second.def.defName);
}
else
{
dna = second.def.GetModExtension<PawnDNAModExtension>();
if (dna != null)
{
res = dna.GetHybridWith(first.def.defName) ?? null;
res = dna.GetHybridWith(first.def.defName);
}
}
return res;

View file

@ -25,7 +25,7 @@ namespace RJW_Menstruation
public PawnKindDef GetHybridWith(string race)
{
return GetHybridExtension(race)?.ChooseOne() ?? null;
return GetHybridExtension(race)?.ChooseOne();
}
}
@ -128,7 +128,7 @@ namespace RJW_Menstruation
public PawnKindDef GetHybridWith(string race)
{
return GetHybridExtension(race)?.ChooseOne() ?? null;
return GetHybridExtension(race)?.ChooseOne();
}
public void ExposeData()