Halve lesson gain when the bag has no textbook for the subject.
Locker and home do not count. A pack without the field keeps vanilla 0.5. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,8 +8,9 @@ namespace HSchool.Simulation;
|
||||
|
||||
/// <summary>
|
||||
/// Grows skills for people who are actually in the lesson: at the room, not walking, not off
|
||||
/// doing something else, and with the assigned teacher standing there. The formula lives in
|
||||
/// <see cref="HSchool.Ai.LessonLearning"/>.
|
||||
/// doing something else, and with the assigned teacher standing there. A pupil without today's
|
||||
/// textbook in the bag learns at <see cref="BehaviorDef.LessonNoTextbookFactor"/>. The formula
|
||||
/// lives in <see cref="HSchool.Ai.LessonLearning"/>.
|
||||
/// </summary>
|
||||
internal static class LessonLearningSystem
|
||||
{
|
||||
@@ -90,6 +91,13 @@ internal static class LessonLearningSystem
|
||||
school.TryLogLessonOnce(personId, PersonLogTypes.LessonCold, lesson.Subject);
|
||||
}
|
||||
|
||||
var textbookFactor = 1f;
|
||||
if (person.IsStudent && !LessonLearning.HasTextbookInBag(person.Items, lesson.Subject))
|
||||
{
|
||||
textbookFactor = rules.LessonNoTextbookFactor;
|
||||
school.TryLogLessonOnce(personId, PersonLogTypes.LessonNoTextbook, lesson.Subject);
|
||||
}
|
||||
|
||||
IReadOnlyDictionary<string, float> taught = teacherSkills.TryGetValue(lesson.TeacherId, out var found)
|
||||
? found
|
||||
: new Dictionary<string, float>(StringComparer.Ordinal);
|
||||
@@ -115,7 +123,8 @@ internal static class LessonLearningSystem
|
||||
hunger,
|
||||
TraitOffset(catalog, traits, share.Skill),
|
||||
teacherSkill,
|
||||
warmth);
|
||||
warmth,
|
||||
textbookFactor);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user