diff --git a/EduNetworkBuilder/ActionClass.cs b/EduNetworkBuilder/ActionClass.cs index ba652b2..49a1b07 100644 --- a/EduNetworkBuilder/ActionClass.cs +++ b/EduNetworkBuilder/ActionClass.cs @@ -25,6 +25,11 @@ namespace EduNetworkBuilder CurrentNetAction = new NetworkAction(starting); } + public NetworkAction GetCurrentNetAction() + { + return CurrentNetAction; + } + public void Add(ActionClass What) { if(CurrentNetAction == null || CurrentNetAction.HasBeenStored == true) diff --git a/EduNetworkBuilder/NBSettings.cs b/EduNetworkBuilder/NBSettings.cs index 51f04d6..babd4bf 100644 --- a/EduNetworkBuilder/NBSettings.cs +++ b/EduNetworkBuilder/NBSettings.cs @@ -59,6 +59,18 @@ namespace EduNetworkBuilder { UserActions.Add(What); } + public void RegisterReplayPassed() + { + if (UserActions == null) return; + NetworkAction NA = UserActions.GetCurrentNetAction(); + if (NA != null) NA.SetPassed(); + } + public void RegisterReplayFailed() + { + if (UserActions == null) return; + NetworkAction NA = UserActions.GetCurrentNetAction(); + if (NA != null) NA.SetFailed(); + } public ActionCollection GetUserActionCollection() { return UserActions; diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index b708d3e..331d5f3 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -1688,7 +1688,9 @@ namespace EduNetworkBuilder //replay finished ReplayInProgress = false; //If we have succeeded, we need to mark it as passed + if (PuzzleIsSolved) Settings.RegisterReplayPassed(); //If we have failed to complete, we need to mark it as failed + else Settings.RegisterReplayFailed(); } } }