mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added some nullchecks for queen existance, fixing #60
This commit is contained in:
parent
70a15dbfed
commit
3db05a8dce
2 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
- Copy of Infis patch for eating cum from sexperience, #41 and #48
|
- Copy of Infis patch for eating cum from sexperience, #41 and #48
|
||||||
- Updated some Icons to have better backgrounds (thanks @WasmachenDennSachenSo #53)
|
- Updated some Icons to have better backgrounds (thanks @WasmachenDennSachenSo #53)
|
||||||
- Custom Queen- and Drone-Xenotypes should work now.
|
- Custom Queen- and Drone-Xenotypes should work now.
|
||||||
|
- Some more checks if Queen is on Map or not (fixing #60)
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
The pawns that are gender fluid can get pregnant.
|
The pawns that are gender fluid can get pregnant.
|
||||||
|
|
|
@ -61,6 +61,9 @@ namespace RJW_Genes
|
||||||
/// <returns>True if the pawn is on the home-map, False otherwise.</returns>
|
/// <returns>True if the pawn is on the home-map, False otherwise.</returns>
|
||||||
public static bool PawnIsOnHomeMap(Pawn pawn)
|
public static bool PawnIsOnHomeMap(Pawn pawn)
|
||||||
{
|
{
|
||||||
|
if (Find.Maps.NullOrEmpty() || !Find.Maps.Where(mapCandidate => mapCandidate.IsPlayerHome).Any()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Map homeMap = Find.Maps.Where(mapCandidate => mapCandidate.IsPlayerHome).First();
|
Map homeMap = Find.Maps.Where(mapCandidate => mapCandidate.IsPlayerHome).First();
|
||||||
return
|
return
|
||||||
homeMap != null && pawn != null
|
homeMap != null && pawn != null
|
||||||
|
|
Loading…
Reference in a new issue