Merge branch 'core_test' into Gitea/main
commit
e31375310c
@ -0,0 +1 @@
|
|||||||
|
NodeEditor.Core
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ContentModelUserStore">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="RIDER_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$/../.." />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.NodeEditor.iml
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/../../../../../../../:\Users\Liam\NodeEditor\.idea\.idea.NodeEditor\.idea/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ContentModelStore">
|
|
||||||
<e p="C:\Users\jdc10\AppData\Local\JetBrains\Rider2020.3\extResources" t="IncludeRecursive" />
|
|
||||||
<e p="C:\Users\jdc10\AppData\Local\JetBrains\Rider2020.3\resharper-host\Local\Transient\Rider\v203\SolutionCaches\_NodeEditor.784521688.00" t="ExcludeRecursive" />
|
|
||||||
<e p="C:\Users\jdc10\Downloads\NodeEditor" t="IncludeRecursive">
|
|
||||||
<e p=".gitignore" t="Include" />
|
|
||||||
<e p="App.config" t="Include" />
|
|
||||||
<e p="App.xaml" t="Include" />
|
|
||||||
<e p="App.xaml.cs" t="Include" />
|
|
||||||
<e p="bin" t="ExcludeRecursive" />
|
|
||||||
<e p="Controls" t="Include">
|
|
||||||
<e p="EditorCanvas.xaml" t="Include" />
|
|
||||||
<e p="EditorCanvas.xaml.cs" t="Include" />
|
|
||||||
</e>
|
|
||||||
<e p="Extensions" t="Include">
|
|
||||||
<e p="MathExtensions.cs" t="Include" />
|
|
||||||
<e p="MouseExtensions.cs" t="Include" />
|
|
||||||
<e p="ReadJSON.cs" t="Include" />
|
|
||||||
</e>
|
|
||||||
<e p="main-map.png" t="Include" />
|
|
||||||
<e p="MainWindow.xaml" t="Include" />
|
|
||||||
<e p="MainWindow.xaml.cs" t="Include" />
|
|
||||||
<e p="NodeEditor.csproj" t="IncludeRecursive" />
|
|
||||||
<e p="NodeEditor.sln" t="IncludeFlat" />
|
|
||||||
<e p="obj" t="ExcludeRecursive">
|
|
||||||
<e p="Debug" t="Include">
|
|
||||||
<e p="App.g.cs" t="Include" />
|
|
||||||
<e p="Controls" t="Include">
|
|
||||||
<e p="EditorCanvas.g.cs" t="Include" />
|
|
||||||
</e>
|
|
||||||
<e p="GeneratedInternalTypeHelper.g.cs" t="Include" />
|
|
||||||
<e p="MainWindow.g.cs" t="Include" />
|
|
||||||
</e>
|
|
||||||
</e>
|
|
||||||
<e p="packages" t="ExcludeRecursive" />
|
|
||||||
<e p="Properties" t="Include">
|
|
||||||
<e p="AssemblyInfo.cs" t="Include" />
|
|
||||||
<e p="Resources.Designer.cs" t="Include" />
|
|
||||||
<e p="Resources.resx" t="Include" />
|
|
||||||
<e p="Settings.Designer.cs" t="Include" />
|
|
||||||
<e p="Settings.settings" t="Include" />
|
|
||||||
</e>
|
|
||||||
<e p="Solution Items" t="Include" />
|
|
||||||
</e>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="com.jetbrains.rider.android.RiderAndroidMiscFileCreationComponent">
|
||||||
|
<option name="ENSURE_MISC_FILE_EXISTS" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="AutoGeneratedRunConfigurationManager">
|
|
||||||
<projectFile>NodeEditor.csproj</projectFile>
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="8d840f1a-4000-4390-ab3f-2383ed6434d5" name="Default Changelist" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/Controls/EditorCanvas.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/Controls/EditorCanvas.xaml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Controls/EditorCanvas.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Controls/EditorCanvas.xaml.cs" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/main-map.png" beforeDir="false" afterPath="$PROJECT_DIR$/main-map.png" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectId" id="1ltZq4ji537vQS7B5Q2SkaWibqc" />
|
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
||||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
||||||
<property name="node.js.detected.package.eslint" value="true" />
|
|
||||||
<property name="node.js.detected.package.tslint" value="true" />
|
|
||||||
<property name="node.js.path.for.package.eslint" value="project" />
|
|
||||||
<property name="node.js.path.for.package.tslint" value="project" />
|
|
||||||
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
|
||||||
<property name="node.js.selected.package.tslint" value="(autodetect)" />
|
|
||||||
<property name="vue.rearranger.settings.migration" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="RunManager">
|
|
||||||
<configuration name="NodeEditor" type="DotNetProject" factoryName=".NET Project">
|
|
||||||
<option name="EXE_PATH" value="" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
|
||||||
<option name="USE_MONO" value="0" />
|
|
||||||
<option name="RUNTIME_ARGUMENTS" value="" />
|
|
||||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/NodeEditor.csproj" />
|
|
||||||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
|
||||||
<option name="PROJECT_KIND" value="Console" />
|
|
||||||
<option name="PROJECT_TFM" value="" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Build" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="8d840f1a-4000-4390-ab3f-2383ed6434d5" name="Default Changelist" comment="" />
|
|
||||||
<created>1608418540783</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1608418540783</updated>
|
|
||||||
<workItem from="1608418548513" duration="1911000" />
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
<component name="UnityProjectConfiguration" hasMinimizedUI="null" />
|
|
||||||
<component name="UnityUnitTestConfiguration" currentTestLauncher="NUnit" />
|
|
||||||
<component name="VcsManagerConfiguration">
|
|
||||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="RIDER_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$/../.." />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
|
||||||
</startup>
|
|
||||||
</configuration>
|
|
||||||
@ -1,18 +1,20 @@
|
|||||||
<UserControl x:Class="NodeEditor.EditorCanvas"
|
<UserControl x:Class="NodeEditor.Controls.EditorCanvas"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:controls="clr-namespace:NodeEditor.Controls"
|
||||||
xmlns:local="clr-namespace:NodeEditor"
|
xmlns:local="clr-namespace:NodeEditor"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Canvas Name="m_EditorCanvas" Background="Green">
|
<Canvas Name="m_EditorCanvas" Background="Green">
|
||||||
<Canvas Name="mapCanvas" Background="Blue">
|
<Canvas Name="mapCanvas" Background="Blue" Width="100" Height="100">
|
||||||
<Canvas.RenderTransform>
|
<Canvas.RenderTransform>
|
||||||
<MatrixTransform />
|
<MatrixTransform />
|
||||||
</Canvas.RenderTransform>
|
</Canvas.RenderTransform>
|
||||||
<Image Name="map" Source="../main-map.png"></Image>
|
<Image Name="map" Source="../assets/main-map.png" />
|
||||||
|
<controls:Node />
|
||||||
</Canvas>
|
</Canvas>
|
||||||
<TextBox Name="test"></TextBox>
|
<TextBox Name="test" />
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<UserControl x:Class="NodeEditor.Controls.Node"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:NodeEditor.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
|
||||||
|
<Button Height="7" Width="7"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top">
|
||||||
|
<Button.Template>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Grid>
|
||||||
|
<Ellipse Stroke="Black"
|
||||||
|
StrokeThickness="0">
|
||||||
|
<Ellipse.Fill>
|
||||||
|
<RadialGradientBrush>
|
||||||
|
<GradientStop Offset="0" Color="Red"/>
|
||||||
|
<GradientStop Offset="1" Color="Red"/>
|
||||||
|
<GradientStop Offset="1" Color="DarkRed"/>
|
||||||
|
<RadialGradientBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform ScaleY="0.65"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</RadialGradientBrush.Transform>
|
||||||
|
</RadialGradientBrush>
|
||||||
|
</Ellipse.Fill>
|
||||||
|
</Ellipse>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Button.Template>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
<UserControl x:Class="NodeEditor.Controls.Path"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:NodeEditor.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./data.schema.json",
|
||||||
|
"A": {
|
||||||
|
"name": "Nemract",
|
||||||
|
"walk_connections": {
|
||||||
|
"B": {
|
||||||
|
"distance": 100,
|
||||||
|
"terrain_level": 10,
|
||||||
|
"weight": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x": 100,
|
||||||
|
"y": 100,
|
||||||
|
"qt_connections": {
|
||||||
|
"C": {
|
||||||
|
"cost": 100,
|
||||||
|
"mode": "seaskipper",
|
||||||
|
"unlock_lvl": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"B":{
|
||||||
|
"name": "Llevagar",
|
||||||
|
"description": "Description",
|
||||||
|
"x": 10,
|
||||||
|
"y": 111,
|
||||||
|
"walk_connections": {
|
||||||
|
"A": {
|
||||||
|
"distance": 111,
|
||||||
|
"terrain_level": 11,
|
||||||
|
"weight": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/map_node"
|
||||||
|
},
|
||||||
|
"propertyNames": {
|
||||||
|
"$ref": "#/definitions/node_name_regex"
|
||||||
|
},
|
||||||
|
|
||||||
|
"definitions": {
|
||||||
|
"node_name_regex": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "[\\w]+"
|
||||||
|
},
|
||||||
|
"map_node": {
|
||||||
|
"properties": {
|
||||||
|
"x": {
|
||||||
|
"description": "The x coordinate.",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"description": "The y coordinate.",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "Human-readable name.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "Description of node, if needed.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"qt_connections": {
|
||||||
|
"description": "List of connected nodes",
|
||||||
|
"additionalProperties": { "$ref": "#/definitions/qt_connection" },
|
||||||
|
"propertyNames": {
|
||||||
|
"$ref": "#/definitions/node_name_regex"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"walk_connections": {
|
||||||
|
"description": "List of connected nodes",
|
||||||
|
"additionalProperties": { "$ref": "#/definitions/walk_connection" },
|
||||||
|
"propertyNames": {
|
||||||
|
"$ref": "#/definitions/node_name_regex"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["x", "y", "name", "walk_connections"],
|
||||||
|
"additionalItems": false
|
||||||
|
},
|
||||||
|
"qt_connection": {
|
||||||
|
"$comment": "A quick-travel conenction between nodes that should be evaluated first.",
|
||||||
|
"properties": {
|
||||||
|
"mode": {
|
||||||
|
"description": "The mode of the fast travel method.",
|
||||||
|
"enum": ["mageisland", "seaskipper", "tunnels", "skyship", "elevator"]
|
||||||
|
},
|
||||||
|
"cost": {
|
||||||
|
"description": "The cost in emeralds of this route",
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"unlock_lvl": {
|
||||||
|
"description": "The level this fast travel is unlocked at",
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 110
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["mode", "cost", "unlock_lvl"],
|
||||||
|
"additionalItems": false
|
||||||
|
},
|
||||||
|
"walk_connection": {
|
||||||
|
"$comment": "A walking connection between two nodes",
|
||||||
|
"properties": {
|
||||||
|
"distance": {
|
||||||
|
"description": "The better disnance between two nodes, not necisarily as the crow flies. Should be used in the a* calc for distance back.",
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"weight": {
|
||||||
|
"description": "Weight value used to modulate the distance based on passability",
|
||||||
|
"type": "number",
|
||||||
|
"minimum": 0,
|
||||||
|
"default": 1
|
||||||
|
},
|
||||||
|
"terrain_level": {
|
||||||
|
"description": "The highest level of the terain this connection passes through",
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 110
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["distance", "weight", "terrain_level"],
|
||||||
|
"additionalItems": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue