Add lesson whispers, teacher catch chance, and after-bell teacher talk.
Whispering cuts lesson skill gain from BehaviorDef; a teacher in the room may interrupt into a discipline circle, and pedagogy scales the pupil's opinion of the teacher. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -250,7 +250,7 @@ public static class DecisionPlanner
|
||||
OccupiedCount occupied,
|
||||
ActionDef action)
|
||||
{
|
||||
if (action.Abstract || action.Weight <= 0 || !RoleFits(action, state))
|
||||
if (action.Abstract || !RoleFits(action, state))
|
||||
{
|
||||
return Intent.None;
|
||||
}
|
||||
@@ -260,6 +260,32 @@ public static class DecisionPlanner
|
||||
return Intent.None;
|
||||
}
|
||||
|
||||
if (TalkActions.IsTeacherTalk(action.DefName))
|
||||
{
|
||||
if (state.BoundToLesson)
|
||||
{
|
||||
return Intent.None;
|
||||
}
|
||||
|
||||
var teacherWeight = catalog.BehaviorRules?.TeacherAfterLessonWeight ?? 0f;
|
||||
if (teacherWeight <= 0)
|
||||
{
|
||||
return Intent.None;
|
||||
}
|
||||
|
||||
if (RoomFor(catalog, map, walks, state, occupied, action) is null)
|
||||
{
|
||||
return Intent.None;
|
||||
}
|
||||
|
||||
return new Intent(GoalKind.Leisure, action.DefName, teacherWeight, action.DefName);
|
||||
}
|
||||
|
||||
if (action.Weight <= 0)
|
||||
{
|
||||
return Intent.None;
|
||||
}
|
||||
|
||||
if (action.DefName.Equals(TalkActions.PhoneChat, StringComparison.Ordinal) && !state.Talk.HasPhone)
|
||||
{
|
||||
return Intent.None;
|
||||
@@ -371,7 +397,8 @@ public static class DecisionPlanner
|
||||
{
|
||||
if (action.Abstract
|
||||
|| !need.Equals(action.Need, StringComparison.Ordinal)
|
||||
|| !RoleFits(action, state))
|
||||
|| !RoleFits(action, state)
|
||||
|| (state.BoundToLesson && TalkCircles.BlocksOnLesson(action.DefName)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user