Add AI parent meetings after a class last lesson.
Class teachers rarely keep the homeroom; invited parents walk onto the map, opinions nudge, then parents leave OffCampus. No player schedule API.
This commit is contained in:
@@ -331,7 +331,8 @@ internal static class PresenceSystem
|
||||
var bound = Duty.IsOtherStaff(person)
|
||||
? slot.Kind != DaySlotKind.Outside
|
||||
: slot.Kind == DaySlotKind.Lesson && lessons.Any(lesson => lesson.Period == slot.Index);
|
||||
if (DirectorSummonSystem.IsSummoned(school, person.Id))
|
||||
if (DirectorSummonSystem.IsSummoned(school, person.Id)
|
||||
|| ParentMeetingSystem.IsInMeeting(school, person.Id))
|
||||
{
|
||||
bound = true;
|
||||
}
|
||||
@@ -352,9 +353,24 @@ internal static class PresenceSystem
|
||||
return null;
|
||||
}
|
||||
|
||||
if (activity.IsActive && ActivitySystem.IsParentMeeting(activity.ActionId))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!presence.IsOnCampus)
|
||||
{
|
||||
intent = Intent.None;
|
||||
if (ParentMeetingSystem.TryDutyRoom(school, person.Id, out var meetingArrive))
|
||||
{
|
||||
presence = PresenceStepper.StartWalk(
|
||||
Presence.OffCampus,
|
||||
walks,
|
||||
meetingArrive,
|
||||
headingHome: false);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (plan.AppearAt is { } appear && now >= appear && (plan.WalkHomeAt is null || now < plan.WalkHomeAt))
|
||||
{
|
||||
var dest = plan.FirstRoom ?? Duty.RoomAt(
|
||||
@@ -379,7 +395,10 @@ internal static class PresenceSystem
|
||||
return null;
|
||||
}
|
||||
|
||||
if (plan.WalkHomeAt is { } leave && now >= leave && !DirectorSummonSystem.IsSummoned(school, person.Id))
|
||||
if (plan.WalkHomeAt is { } leave
|
||||
&& now >= leave
|
||||
&& !DirectorSummonSystem.IsSummoned(school, person.Id)
|
||||
&& !ParentMeetingSystem.IsInMeeting(school, person.Id))
|
||||
{
|
||||
activity = PersonActivity.Idle;
|
||||
intent = Intent.None;
|
||||
@@ -399,6 +418,11 @@ internal static class PresenceSystem
|
||||
duty = summonRoom;
|
||||
bound = true;
|
||||
}
|
||||
else if (ParentMeetingSystem.TryDutyRoom(school, person.Id, out var meetingRoom))
|
||||
{
|
||||
duty = meetingRoom;
|
||||
bound = true;
|
||||
}
|
||||
|
||||
if (duty is null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user