-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created variable registration system so that they are no longer restr…
…icted to the 4 types
- Loading branch information
1 parent
7b7b7f4
commit 8257e88
Showing
38 changed files
with
676 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using Avalon; | ||
using ValkyrieFSMCore; | ||
|
||
using System.Text.Json; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
| ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace ValkyrieFSMCore | ||
{ | ||
/// <summary> | ||
/// The variable type | ||
/// </summary> | ||
public class Project | ||
{ | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } = ""; | ||
|
||
/// <summary> | ||
/// The name of the project | ||
/// </summary> | ||
[JsonPropertyName ("name")] | ||
public string Name { get; set; } = ""; | ||
|
||
/// <summary> | ||
/// the description of the project | ||
/// </summary> | ||
[JsonPropertyName("startDate")] | ||
public string StartDate { get; set; } = ""; | ||
|
||
/// <summary> | ||
/// the id of the sector that the project is associated with | ||
/// </summary> | ||
[JsonPropertyName("endDate")] | ||
public string EndDate { get; set; } = ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace ValkyrieFSMCore | ||
{ | ||
public class Sector | ||
{ | ||
public string Id { get; set; } = ""; | ||
public string Name { get; set; } = ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
| ||
|
||
namespace ValkyrieFSMCore | ||
{ | ||
/// <summary> | ||
/// The custom variable library | ||
/// </summary> | ||
public class CustomVariableLibrary | ||
{ | ||
/// <summary> | ||
/// The dictionary of custom variables created | ||
/// </summary> | ||
public Dictionary<string, IVariableSignature> CustomVariables { get; set; } = new Dictionary<string, IVariableSignature>(); | ||
|
||
public CustomVariableLibrary() | ||
{ | ||
// Add your custom variables here | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
namespace ValkyrieFSMCore | ||
{ | ||
public class EachProject : FunctionDefinition | ||
{ | ||
|
||
int iterator = 0; | ||
|
||
public EachProject() | ||
{ | ||
Setup(); | ||
DefineFunction(); | ||
} | ||
|
||
void Setup() | ||
{ | ||
Name = "EachProject"; | ||
ExpectedParameters = new Dictionary<string, Parameter>() | ||
{ | ||
{ "projects", new Parameter("projects") }, | ||
{ "project", new Parameter("project", VariableIO.Out) } | ||
}; | ||
} | ||
|
||
protected override void DefineFunction() | ||
{ | ||
Function = () => | ||
{ | ||
var proj = Get<List<Project>>("project"); | ||
|
||
if (proj is List<Project> projects) | ||
{ | ||
if (iterator < projects.Count) | ||
{ | ||
Set("project", projects[iterator]); | ||
iterator++; | ||
return 0; | ||
} | ||
else | ||
{ | ||
iterator = 0; | ||
return 1; | ||
} | ||
} | ||
|
||
return -1; | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.