mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Refactor allraces and allkinds
This commit is contained in:
parent
ebb486179b
commit
8306439576
1 changed files with 2 additions and 4 deletions
|
@ -58,9 +58,8 @@ namespace RJW_Menstruation
|
|||
get
|
||||
{
|
||||
if (allraces != null) return allraces;
|
||||
allraces = DefDatabase<ThingDef>.AllDefsListForReading.Where(thingdef => thingdef.race?.IsFlesh ?? false).ToList();
|
||||
|
||||
List<ThingDef> allThings = DefDatabase<ThingDef>.AllDefsListForReading;
|
||||
allraces = allThings.FindAll(x => x.race != null && x.race.IsFlesh);
|
||||
return allraces;
|
||||
}
|
||||
}
|
||||
|
@ -69,9 +68,8 @@ namespace RJW_Menstruation
|
|||
get
|
||||
{
|
||||
if (allkinds != null) return allkinds;
|
||||
allkinds = DefDatabase<PawnKindDef>.AllDefsListForReading.Where(pawnkinddef => pawnkinddef.race != null).ToList();
|
||||
|
||||
List<PawnKindDef> allKinds = DefDatabase<PawnKindDef>.AllDefsListForReading;
|
||||
allkinds = allKinds.FindAll(x => x.race != null);
|
||||
return allkinds;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue