Fix PE change-clothes interruption and post-PE mode detection.
Add appropriateness tests for staging PE kit, wearing form before gym, and returning to everyday clothes after the lesson.
This commit is contained in:
@@ -400,15 +400,18 @@ internal static class PresenceSystem
|
||||
state,
|
||||
(node, thing) => occupied.GetValueOrDefault((node, thing)));
|
||||
|
||||
var changing = activity.IsActive && ActivitySystem.IsChangeClothes(activity.ActionId);
|
||||
|
||||
if (decision.WalkTo is not null
|
||||
&& !decision.WalkTo.Equals(presence.NodeId, StringComparison.Ordinal)
|
||||
&& activity.IsActive)
|
||||
&& activity.IsActive
|
||||
&& !changing)
|
||||
{
|
||||
activity = PersonActivity.Idle;
|
||||
}
|
||||
|
||||
intent = decision.Intent;
|
||||
if (decision.WalkTo is not null)
|
||||
if (decision.WalkTo is not null && !changing)
|
||||
{
|
||||
presence = PresenceStepper.StartWalk(presence, walks, decision.WalkTo, headingHome: false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user