mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Dead pawns don't get hediff ticks
This commit is contained in:
parent
4fc1d6b4ab
commit
d9dc79f107
2 changed files with 7 additions and 7 deletions
|
@ -166,8 +166,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
!parent.pawn.IsHashIntervalTick(tickInterval) ||
|
!parent.pawn.IsHashIntervalTick(tickInterval) ||
|
||||||
!parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns
|
!parent.pawn.Spawned // TODO: Add option to simulate off-map pawns
|
||||||
parent.pawn.health.Dead
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
|
using RimWorld.Planet;
|
||||||
using rjw;
|
using rjw;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -560,7 +561,6 @@ namespace RJW_Menstruation
|
||||||
if (
|
if (
|
||||||
!parent.pawn.IsHashIntervalTick(tickInterval) ||
|
!parent.pawn.IsHashIntervalTick(tickInterval) ||
|
||||||
!parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns
|
!parent.pawn.Spawned || // TODO: Add option to simulate off-map pawns
|
||||||
parent.pawn.health.Dead ||
|
|
||||||
(parent.pawn.IsAnimal() && !Configurations.EnableAnimalCycle)
|
(parent.pawn.IsAnimal() && !Configurations.EnableAnimalCycle)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1120,10 +1120,11 @@ namespace RJW_Menstruation
|
||||||
public bool IsBreedingSeason()
|
public bool IsBreedingSeason()
|
||||||
{
|
{
|
||||||
if (Props.breedingSeason == SeasonalBreed.Always) return true;
|
if (Props.breedingSeason == SeasonalBreed.Always) return true;
|
||||||
Map map = parent.pawn.Map;
|
|
||||||
if (map == null) map = Find.AnyPlayerHomeMap;
|
int tile = parent.pawn.Tile;
|
||||||
if (map == null) return true;
|
if (tile < 0) tile = Find.AnyPlayerHomeMap?.Tile ?? -1;
|
||||||
switch (GenLocalDate.Season(map))
|
if (tile < 0) return true;
|
||||||
|
switch (GenLocalDate.Season(tile))
|
||||||
{
|
{
|
||||||
case Season.Spring:
|
case Season.Spring:
|
||||||
return (Props.breedingSeason & SeasonalBreed.Spring) != 0;
|
return (Props.breedingSeason & SeasonalBreed.Spring) != 0;
|
||||||
|
|
Loading…
Reference in a new issue