Merge branch 'phase/74-attendance'
This commit is contained in:
@@ -722,6 +722,17 @@ internal static class PeopleDefValidator
|
||||
previous = floor;
|
||||
}
|
||||
}
|
||||
|
||||
if (behavior.AttendanceMax < 0)
|
||||
{
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' attendanceMax cannot be negative.");
|
||||
}
|
||||
|
||||
if (behavior.LessonLateMinutes < 0f)
|
||||
{
|
||||
throw new ContentLoadException(
|
||||
$"BehaviorDef '{behavior.DefName}' lessonLateMinutes cannot be negative.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ValidateTopic(TopicDef topic, DefCatalog catalog)
|
||||
|
||||
@@ -619,6 +619,23 @@ public sealed class BehaviorDef : Def
|
||||
/// </summary>
|
||||
public int? LessonMarkWhenNoTeacher { get; init; } = 2;
|
||||
|
||||
/// <summary>
|
||||
/// How many recent attendance rows a person keeps. Oldest drop first. Zero disables attendance.
|
||||
/// </summary>
|
||||
public int AttendanceMax { get; init; } = 40;
|
||||
|
||||
/// <summary>
|
||||
/// Minutes after the bell: first standing in the room within this window is present;
|
||||
/// later is late. Inclusive — arrival at exactly this many minutes still counts as present.
|
||||
/// </summary>
|
||||
public float LessonLateMinutes { get; init; } = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// When true (vanilla), a late arrival still receives a lesson mark if they are standing in
|
||||
/// the room — stage A quality path. False skips the mark for late pupils.
|
||||
/// </summary>
|
||||
public bool LessonMarkWhenLate { get; init; } = true;
|
||||
|
||||
public static IReadOnlyList<float> DefaultLessonMarkThresholds { get; } =
|
||||
[
|
||||
0.85f,
|
||||
|
||||
Reference in New Issue
Block a user