Add functions to set passed / set failed
This commit is contained in:
parent
864c697f8e
commit
5264bd482d
@ -130,6 +130,8 @@ namespace EduNetworkBuilder
|
||||
/// This tells us if it has been stored to the long-term action list.
|
||||
/// </summary>
|
||||
public bool HasBeenStored = false;
|
||||
public bool HasPassed = false;
|
||||
public bool HasFailed = false;
|
||||
public NetworkAction() { }
|
||||
public NetworkAction(string Name)
|
||||
{
|
||||
@ -150,6 +152,16 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
Actions.Add(What);
|
||||
}
|
||||
public void SetPassed()
|
||||
{
|
||||
HasPassed = true;
|
||||
HasFailed = false;
|
||||
}
|
||||
public void SetFailed()
|
||||
{
|
||||
HasPassed = false;
|
||||
HasFailed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public class ActionClass
|
||||
|
@ -165,6 +165,8 @@ namespace EduNetworkBuilder
|
||||
foreach (NetworkAction NetAction in UserActions.NetActions)
|
||||
{
|
||||
NetAction.HasBeenStored = true; //All of them start out stored
|
||||
NetAction.HasFailed = false;
|
||||
NetAction.HasPassed = false;
|
||||
}
|
||||
UserActions.HasUnsavedChanges = false; //we have just loaded a clean thing. Nothing to save
|
||||
}
|
||||
@ -177,6 +179,18 @@ namespace EduNetworkBuilder
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetPassed(string networkname)
|
||||
{
|
||||
if (UserActions == null) return;
|
||||
NetworkAction NA = UserActions.FindAction(networkname);
|
||||
NA.SetPassed();
|
||||
}
|
||||
public void SetFailed(string networkname)
|
||||
{
|
||||
if (UserActions == null) return;
|
||||
NetworkAction NA = UserActions.FindAction(networkname);
|
||||
NA.SetFailed();
|
||||
}
|
||||
public bool CheckIfDone(string PuzzleName)
|
||||
{
|
||||
//we just mark it in the settings class
|
||||
|
Loading…
Reference in New Issue
Block a user