Add rain and snow minutes to the morning commute.
Day plans take a precomputed extra; Ai does not know precipitation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -522,6 +522,12 @@ internal static class PeopleDefValidator
|
||||
$"BehaviorDef '{behavior.DefName}' commute slack must be a non-negative range with min ≤ max.");
|
||||
}
|
||||
|
||||
if (behavior.CommuteRainMinutes < 0 || behavior.CommuteSnowMinutes < 0)
|
||||
{
|
||||
throw new ContentLoadException(
|
||||
$"BehaviorDef '{behavior.DefName}' commute rain and snow minutes cannot be negative.");
|
||||
}
|
||||
|
||||
if (behavior.DutyLessonWeight < 0f
|
||||
|| behavior.DutyTravelWeight < 0f
|
||||
|| behavior.NeedWeightAtZero < 0f
|
||||
|
||||
@@ -285,6 +285,15 @@ public sealed class BehaviorDef : Def
|
||||
|
||||
public int CommuteSlackMax { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Extra minutes on a rainy morning. Added to slack when the street is wet. A pack without
|
||||
/// the field adds nothing so the catalog still loads.
|
||||
/// </summary>
|
||||
public int CommuteRainMinutes { get; init; }
|
||||
|
||||
/// <summary>Same as <see cref="CommuteRainMinutes"/> when the street is snow.</summary>
|
||||
public int CommuteSnowMinutes { get; init; }
|
||||
|
||||
/// <summary>A new goal must beat the current one by this much before the person switches.</summary>
|
||||
public float SwitchMargin { get; init; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user