Updated to core

core_test
Julie 5 years ago
parent bb392ba72d
commit 9ab7a49ccf
Signed by: cobular
GPG Key ID: 8CAB39FC9A8F13FB

@ -28,10 +28,9 @@
</select>
</component>
<component name="ChangeListManager">
<list default="true" id="8d840f1a-4000-4390-ab3f-2383ed6434d5" name="Default Changelist" comment="Updated Paths with a direction enum, and added seaskipper costs enum">
<list default="true" id="8d840f1a-4000-4390-ab3f-2383ed6434d5" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.NodeEditor/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.NodeEditor/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Controls/Node.xaml" beforeDir="false" afterPath="$PROJECT_DIR$/Controls/Node.xaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Controls/Node.xaml.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Controls/Node.xaml.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/NodeEditor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/NodeEditor.csproj" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -46,25 +45,10 @@
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/Controls/Node.xaml.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Extensions/Modes.cs" root0="FORCE_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/Controls/Path.xaml" />
<option value="$PROJECT_DIR$/Extensions/Modes.cs" />
<option value="$PROJECT_DIR$/Extensions/SeaskipperCosts.cs" />
<option value="$PROJECT_DIR$/Extensions/Direction.cs" />
<option value="$PROJECT_DIR$/Controls/Path.xaml.cs" />
<option value="$PROJECT_DIR$/NodeEditor.csproj" />
<option value="$PROJECT_DIR$/Controls/EditorCanvas.xaml.cs" />
<option value="$PROJECT_DIR$/Controls/EditorCanvas.xaml" />
<option value="$PROJECT_DIR$/Controls/Node.xaml" />
<option value="$PROJECT_DIR$/Controls/Node.xaml.cs" />
</list>
</option>
<changedPaths>
<option value="$PROJECT_DIR$/MainWindow.xaml" />
</changedPaths>
</component>
<component name="ProjectId" id="1ltZq4ji537vQS7B5Q2SkaWibqc" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
@ -119,9 +103,7 @@
<option name="presentableId" value="Default" />
<updated>1608418540783</updated>
<workItem from="1608418548513" duration="1911000" />
<workItem from="1608578473230" duration="1904000" />
<workItem from="1608581445298" duration="4238000" />
<workItem from="1608585736986" duration="1797000" />
<workItem from="1608580538066" duration="345000" />
</task>
<task id="LOCAL-00001" summary="Added custom Node control">
<created>1608580007149</created>

@ -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>

@ -5,14 +5,7 @@
xmlns:local="clr-namespace:NodeEditor"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources />
<ui:XamlControlsResources />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
</Application.Resources>
</Application>

@ -12,8 +12,7 @@
<Canvas.RenderTransform>
<MatrixTransform />
</Canvas.RenderTransform>
<Image Name="map" Source="../main-map.png" />
<controls:Node />
<Image Name="map" Source="../assets/main-map_yellow.png"></Image>
</Canvas>
<TextBox Name="test" />
</Canvas>

@ -1,7 +1,16 @@
using System.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using NodeEditor.Extensions;
namespace NodeEditor.Controls
{

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net5.0-windows10.0.19041.0</TargetFrameworks>
<UseWPF>true</UseWPF>
<RootNamespace>NodeEditor</RootNamespace>
<AssemblyName>NodeEditor</AssemblyName>
<LangVersion>8</LangVersion>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.1.0" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0" />
</ItemGroup>
</Project>

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodeEditor.Core", "NodeEditor.Core.csproj", "{7128BB4E-70F6-499C-B0A8-D6775CE49B98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7128BB4E-70F6-499C-B0A8-D6775CE49B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7128BB4E-70F6-499C-B0A8-D6775CE49B98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7128BB4E-70F6-499C-B0A8-D6775CE49B98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7128BB4E-70F6-499C-B0A8-D6775CE49B98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E026FADA-21ED-4144-8336-A570FD7F4A2A}
EndGlobalSection
EndGlobal

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{789876C7-6864-435A-A06B-1B51FE952783}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>NodeEditor</RootNamespace>
<AssemblyName>NodeEditor</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<RuntimeIdentifiers>win</RuntimeIdentifiers>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="netstandard" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Windows.Foundation.UniversalApiContract" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Controls\EditorCanvas.xaml.cs">
<DependentUpon>EditorCanvas.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Node.xaml.cs">
<DependentUpon>Node.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Path.xaml.cs">
<DependentUpon>Path.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions\Direction.cs" />
<Compile Include="Extensions\MathExtensions.cs" />
<Compile Include="Extensions\Modes.cs" />
<Compile Include="Extensions\MouseExtensions.cs" />
<Compile Include="Extensions\ReadJSON.cs" />
<Page Include="Controls\EditorCanvas.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Node.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Path.xaml" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Extensions\SeaskipperCosts.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="main-map.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0" />
<PackageReference Include="ModernWpfUI.MahApps">
<Version>0.9.2</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -1,30 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NodeEditor", "NodeEditor.csproj", "{789876C7-6864-435A-A06B-1B51FE952783}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C46C4EE2-1291-47C9-BF82-29915DE75727}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{789876C7-6864-435A-A06B-1B51FE952783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{789876C7-6864-435A-A06B-1B51FE952783}.Debug|Any CPU.Build.0 = Debug|Any CPU
{789876C7-6864-435A-A06B-1B51FE952783}.Release|Any CPU.ActiveCfg = Release|Any CPU
{789876C7-6864-435A-A06B-1B51FE952783}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7946BFFB-A64F-4F59-8D29-20725D1A4D76}
EndGlobalSection
EndGlobal

@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("NodeEditor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NodeEditor")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -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…
Cancel
Save