Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dialog Tree #5

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
153 changes: 153 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
###############################
# Core EditorConfig Options #
###############################

root = true

# All files
[*]
indent_style = space

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

###############################
# .NET Coding Conventions #
###############################

[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_readonly_field = true:suggestion

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent

###############################
# Naming Conventions #
###############################

# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const

###############################
# C# Code Style Rules #
###############################

[*.cs]
# var preferences
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent

# Expression-bodied members
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent

# Pattern-matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion

# Null-checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion

# Expression-level preferences
csharp_prefer_braces = true:silent
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion

###############################
# C# Formatting Rules #
###############################

# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Space preferences
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_after_comma = true
csharp_space_after_dot = false

# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true

##################################
# Visual Basic Code Style Rules #
##################################

[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
9 changes: 9 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

## xx/xx/2019 V1.1.0

- Add Dialog Tree
- Add Dialog Tree Rant Text Processor

#### Blackboard

- Add Guid to Blackboard's
3 changes: 3 additions & 0 deletions Mallos.Ai.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
},
{
"path": "samples/GoRogueSample"
},
{
"path": "samples/DialogTreeSample"
}
],
"settings": {}
Expand Down
15 changes: 15 additions & 0 deletions Mallos.Ai.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mallos.Ai.Test", "test\Mall
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{686B955D-2972-44E6-9DBD-7BAD6C681387}"
ProjectSection(SolutionItems) = preProject
ChangeLog.md = ChangeLog.md
README.md = README.md
EndProjectSection
EndProject
Expand All @@ -22,6 +23,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GoRogueSample", "samples\Go
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mallos.Ai.SadRogue", "src\Mallos.Ai.SadRogue\Mallos.Ai.SadRogue.csproj", "{3A05163A-22B9-4CC3-8E95-25992346D17E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DialogTreeSample", "samples\DialogTreeSample\DialogTreeSample.csproj", "{D43FC2CA-317B-4F2D-A754-A70CDAFA449A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mallos.Ai.Rant", "src\Mallos.Ai.Rant\Mallos.Ai.Rant.csproj", "{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -44,6 +49,14 @@ Global
{3A05163A-22B9-4CC3-8E95-25992346D17E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A05163A-22B9-4CC3-8E95-25992346D17E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A05163A-22B9-4CC3-8E95-25992346D17E}.Release|Any CPU.Build.0 = Release|Any CPU
{D43FC2CA-317B-4F2D-A754-A70CDAFA449A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D43FC2CA-317B-4F2D-A754-A70CDAFA449A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D43FC2CA-317B-4F2D-A754-A70CDAFA449A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D43FC2CA-317B-4F2D-A754-A70CDAFA449A}.Release|Any CPU.Build.0 = Release|Any CPU
{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -53,6 +66,8 @@ Global
{4A46715F-08B2-4D28-A168-6D6283F577E7} = {A7F516EE-B925-4BC2-B35D-9BD1DFE8AC49}
{6D061BDC-FBDE-4BA4-8297-9FF317B1AD4D} = {32E8C64F-0AEB-4222-BCF6-0DD9E09A2DCE}
{3A05163A-22B9-4CC3-8E95-25992346D17E} = {39D7CB70-98D2-4E3C-9D0B-68033E86C586}
{D43FC2CA-317B-4F2D-A754-A70CDAFA449A} = {32E8C64F-0AEB-4222-BCF6-0DD9E09A2DCE}
{C9BCEAFA-E84C-4904-9135-02D0D3EB36CD} = {39D7CB70-98D2-4E3C-9D0B-68033E86C586}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4D1D27B2-00B1-4652-A93C-8A352929F9AF}
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ A lightweight AI library designed for Games.
|Mallos.Ai.SadRogue|[![Nuget](https://img.shields.io/nuget/v/Mallos.Ai.SadRogue)](https://www.nuget.org/packages/Mallos.Ai.SadRogue)|

## Features
- [x] Behavior Tree
- [ ] Dialog Tree
- Behavior Tree
- A lot of different node types
- Dialog Tree
- History
- Multiple Actors
- Node Properties
- Text Processors

### Supported Frameworks
* [SadConsole with GoRogue](https://github.com/thesadrogue/SadConsole.GoRogueHelpers)
Expand Down
19 changes: 19 additions & 0 deletions samples/DialogTreeSample/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/DialogTreeSample.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"console": "internalConsole"
}
]
}
17 changes: 17 additions & 0 deletions samples/DialogTreeSample/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet build",
"type": "shell",
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
13 changes: 13 additions & 0 deletions samples/DialogTreeSample/DialogTreeSample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Mallos.Ai.Rant\Mallos.Ai.Rant.csproj" />
<ProjectReference Include="..\..\src\Mallos.Ai\Mallos.Ai.csproj" />
</ItemGroup>

</Project>
Loading