mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Introduce TickIntervalMaximum constant
This commit is contained in:
parent
f40a5f2246
commit
aba8ea1693
2 changed files with 6 additions and 4 deletions
|
@ -22,6 +22,7 @@ namespace RJW_Menstruation
|
|||
public const int NonColonistTickIntervalDefault = GenDate.TicksPerHour;
|
||||
public const int AnimalTickIntervalDefault = GenDate.TicksPerHour;
|
||||
public const int TickIntervalMinimum = 20;
|
||||
public const int TickIntervalMaximum = 4 * GenDate.TicksPerHour;
|
||||
public const float EnzygoticTwinsChanceDefault = 0.002f;
|
||||
public const int EnzygoticTwinsChanceAdjustDefault = 2;
|
||||
public const int MaxEnzygoticTwinsDefault = 9;
|
||||
|
@ -435,15 +436,15 @@ namespace RJW_Menstruation
|
|||
Configurations.CycleAcceleration = (int)listmain.Slider(Configurations.CycleAcceleration, 1, 50);
|
||||
|
||||
listmain.LabelDouble(Translations.Option_ColonistUpdateInterval_Label, GenDate.ToStringTicksToPeriod(Configurations.ColonistTickInterval), Translations.Option_ColonistUpdateInterval_Desc);
|
||||
Configurations.ColonistTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.ColonistTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(4 * GenDate.TicksPerHour)));
|
||||
Configurations.ColonistTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.ColonistTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(Configurations.TickIntervalMaximum)));
|
||||
|
||||
listmain.LabelDouble(Translations.Option_NonColonistUpdateInterval_Label, GenDate.ToStringTicksToPeriod(Configurations.NonColonistTickInterval), Translations.Option_NonColonistUpdateInterval_Desc);
|
||||
Configurations.NonColonistTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.NonColonistTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(4 * GenDate.TicksPerHour)));
|
||||
Configurations.NonColonistTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.NonColonistTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(Configurations.TickIntervalMaximum)));
|
||||
|
||||
if(Configurations.EnableAnimalCycle)
|
||||
{
|
||||
listmain.LabelDouble(Translations.Option_AnimalUpdateInterval_Label, GenDate.ToStringTicksToPeriod(Configurations.AnimalTickInterval), Translations.Option_AnimalUpdateInterval_Desc);
|
||||
Configurations.AnimalTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.AnimalTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(4 * GenDate.TicksPerHour)));
|
||||
Configurations.AnimalTickInterval = (int)Mathf.Exp(listmain.Slider(Mathf.Log(Configurations.AnimalTickInterval), Mathf.Log(Configurations.TickIntervalMinimum), Mathf.Log(Configurations.TickIntervalMaximum)));
|
||||
}
|
||||
|
||||
float var2 = EstimatedBleedingAmountPerHour;
|
||||
|
|
|
@ -169,7 +169,8 @@ namespace RJW_Menstruation
|
|||
if (Pawn.IsAnimal()) tickInterval = Configurations.AnimalTickInterval;
|
||||
else if (Pawn.IsColonist || Pawn.IsPrisonerOfColony || Pawn.IsSlaveOfColony) tickInterval = Configurations.ColonistTickInterval;
|
||||
else tickInterval = Configurations.NonColonistTickInterval;
|
||||
if (tickInterval <= Configurations.TickIntervalMinimum) tickInterval = Configurations.TickIntervalMinimum;
|
||||
if (tickInterval < Configurations.TickIntervalMinimum) tickInterval = Configurations.TickIntervalMinimum;
|
||||
else if (tickInterval > Configurations.TickIntervalMaximum) tickInterval = Configurations.TickIntervalMaximum;
|
||||
}
|
||||
return tickInterval;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue