Grow lesson skills only when the assigned teacher is standing in the room.
The timetable already named a teacher; learning ignored whether they were in the toilet, still walking, or not a person at all. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,6 +14,7 @@ public static class PersonLogTypes
|
||||
public const string ActionEnded = "action-ended";
|
||||
public const string ApparelReplaced = "apparel-replaced";
|
||||
public const string ApparelChanged = "apparel-changed";
|
||||
public const string LessonNoTeacher = "lesson-no-teacher";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,6 +59,14 @@ public sealed record PersonLogEvent(string PersonId, DateTime Time, string Type,
|
||||
return string.Format(CultureInfo.InvariantCulture, catalog.Text(locale, key), name);
|
||||
}
|
||||
|
||||
if (Type.Equals(PersonLogTypes.LessonNoTeacher, StringComparison.Ordinal))
|
||||
{
|
||||
var name = catalog.Subjects.TryGetValue(ThingDef, out var subject)
|
||||
? catalog.Label(locale, subject)
|
||||
: ThingDef;
|
||||
return string.Format(CultureInfo.InvariantCulture, catalog.Text(locale, "LessonNoTeacher"), name);
|
||||
}
|
||||
|
||||
return Type;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user