diff --git a/.gitignore b/.gitignore index 50c0415..8d76898 100644 --- a/.gitignore +++ b/.gitignore @@ -250,4 +250,5 @@ ModelManifest.xml .paket/paket.exe # FAKE - F# Make -.fake/ \ No newline at end of file +.fake/ +GameBinaries diff --git a/Torch.API/Torch.API.csproj b/Torch.API/Torch.API.csproj index 4c93e33..d66de92 100644 --- a/Torch.API/Torch.API.csproj +++ b/Torch.API/Torch.API.csproj @@ -32,29 +32,43 @@ MinimumRecommendedRules.ruleset + + False + ..\GameBinaries\HavokWrapper.dll + ..\packages\NLog.4.4.1\lib\net45\NLog.dll True - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Common.dll + + False + ..\GameBinaries\Sandbox.Common.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Game.dll + + False + ..\GameBinaries\Sandbox.Game.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Graphics.dll + + False + ..\GameBinaries\Sandbox.Graphics.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SpaceEngineers.Game.dll + + False + ..\GameBinaries\SpaceEngineers.Game.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SpaceEngineers.ObjectBuilders.dll + + False + ..\GameBinaries\SpaceEngineers.ObjectBuilders.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SpaceEngineers.ObjectBuilders.XmlSerializers.dll + + False + ..\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll + + + False + ..\GameBinaries\SteamSDK.dll @@ -69,44 +83,57 @@ + + ..\Torch.Server\bin\x64\Release\Torch.dll + - C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.dll - False + ..\GameBinaries\VRage.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Audio.dll - - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Game.dll - - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Game.XmlSerializers.dll - - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Input.dll - - + False - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Library.dll - False + ..\GameBinaries\VRage.Audio.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Math.dll + + ..\GameBinaries\VRage.Dedicated.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Native.dll + + False + ..\GameBinaries\VRage.Game.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.OpenVRWrapper.dll + + False + ..\GameBinaries\VRage.Game.XmlSerializers.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Render.dll + + False + ..\GameBinaries\VRage.Input.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Render11.dll + + ..\GameBinaries\VRage.Library.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Scripting.dll + + False + ..\GameBinaries\VRage.Math.dll + + + False + ..\GameBinaries\VRage.Native.dll + + + False + ..\GameBinaries\VRage.OpenVRWrapper.dll + + + False + ..\GameBinaries\VRage.Render.dll + + + False + ..\GameBinaries\VRage.Render11.dll + + + False + ..\GameBinaries\VRage.Scripting.dll diff --git a/Torch.Client/Properties/AssemblyInfo.cs b/Torch.Client/Properties/AssemblyInfo.cs index ea6cf1e..7aa4672 100644 --- a/Torch.Client/Properties/AssemblyInfo.cs +++ b/Torch.Client/Properties/AssemblyInfo.cs @@ -1,16 +1,4 @@ - -using System.Reflection; -using System.Runtime.InteropServices; +using System.Reflection; -[assembly: AssemblyTitle("Torch Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Torch")] -[assembly: AssemblyCopyright("Copyright © Torch API 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.89.540")] -[assembly: AssemblyFileVersion("1.0.89.540")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.105.498")] +[assembly: AssemblyFileVersion("1.0.105.498")] \ No newline at end of file diff --git a/Torch.Client/Properties/AssemblyInfo.tt b/Torch.Client/Properties/AssemblyInfo.tt index c1b48cf..9937cb7 100644 --- a/Torch.Client/Properties/AssemblyInfo.tt +++ b/Torch.Client/Properties/AssemblyInfo.tt @@ -4,19 +4,7 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> - using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Torch Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Torch")] -[assembly: AssemblyCopyright("Copyright © Torch API 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] <# var dt = DateTime.Now; int major = 1; diff --git a/Torch.Client/Properties/AssemblyInfo1.cs b/Torch.Client/Properties/AssemblyInfo1.cs new file mode 100644 index 0000000..013f62e --- /dev/null +++ b/Torch.Client/Properties/AssemblyInfo1.cs @@ -0,0 +1,12 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Torch Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Torch")] +[assembly: AssemblyCopyright("Copyright © Torch API 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/Torch.Client/Torch.Client.csproj b/Torch.Client/Torch.Client.csproj index cafcd96..6dacd83 100644 --- a/Torch.Client/Torch.Client.csproj +++ b/Torch.Client/Torch.Client.csproj @@ -108,6 +108,7 @@ True True + diff --git a/Torch.Server/Properties/AssemblyInfo.cs b/Torch.Server/Properties/AssemblyInfo.cs index 68a074f..7aa4672 100644 --- a/Torch.Server/Properties/AssemblyInfo.cs +++ b/Torch.Server/Properties/AssemblyInfo.cs @@ -1,16 +1,4 @@ - -using System.Reflection; -using System.Runtime.InteropServices; +using System.Reflection; -[assembly: AssemblyTitle("Torch Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Torch")] -[assembly: AssemblyCopyright("Copyright © Torch API 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.89.540")] -[assembly: AssemblyFileVersion("1.0.89.540")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.105.498")] +[assembly: AssemblyFileVersion("1.0.105.498")] \ No newline at end of file diff --git a/Torch.Server/Properties/AssemblyInfo.tt b/Torch.Server/Properties/AssemblyInfo.tt index eee6580..9937cb7 100644 --- a/Torch.Server/Properties/AssemblyInfo.tt +++ b/Torch.Server/Properties/AssemblyInfo.tt @@ -4,19 +4,7 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <#@ output extension=".cs" #> - using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Torch Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Torch")] -[assembly: AssemblyCopyright("Copyright © Torch API 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] <# var dt = DateTime.Now; int major = 1; diff --git a/Torch.Server/Properties/AssemblyInfo1.cs b/Torch.Server/Properties/AssemblyInfo1.cs new file mode 100644 index 0000000..c1db141 --- /dev/null +++ b/Torch.Server/Properties/AssemblyInfo1.cs @@ -0,0 +1,12 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Torch Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Torch")] +[assembly: AssemblyCopyright("Copyright © Torch API 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] \ No newline at end of file diff --git a/Torch.Server/Torch.Server.csproj b/Torch.Server/Torch.Server.csproj index 4026157..571a865 100644 --- a/Torch.Server/Torch.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -45,46 +45,48 @@ False - C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\DedicatedServer64\HavokWrapper.dll + ..\GameBinaries\HavokWrapper.dll False False - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Microsoft.CodeAnalysis.dll + ..\GameBinaries\Microsoft.CodeAnalysis.dll False - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Microsoft.CodeAnalysis.CSharp.dll + ..\GameBinaries\Microsoft.CodeAnalysis.CSharp.dll ..\packages\NLog.4.4.1\lib\net45\NLog.dll True - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Common.dll - - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Game.dll - - + False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Graphics.dll + ..\GameBinaries\Sandbox.Common.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.Game.dll + + False + ..\GameBinaries\Sandbox.Game.dll + + + False + ..\GameBinaries\Sandbox.Graphics.dll + + + False + ..\GameBinaries\SpaceEngineers.Game.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.ObjectBuilders.dll + ..\GameBinaries\SpaceEngineers.ObjectBuilders.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.ObjectBuilders.XmlSerializers.dll + ..\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll False - C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SteamSDK.dll - False + ..\GameBinaries\SteamSDK.dll @@ -101,51 +103,57 @@ 4.0 - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.dll + + False + ..\GameBinaries\VRage.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Audio.dll + ..\GameBinaries\VRage.Audio.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Dedicated.dll + + False + ..\GameBinaries\VRage.Dedicated.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Game.dll + + False + ..\GameBinaries\VRage.Game.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Game.XmlSerializers.dll + + False + ..\GameBinaries\VRage.Game.XmlSerializers.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Input.dll + + False + ..\GameBinaries\VRage.Input.dll - - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Library.dll + + False + ..\GameBinaries\VRage.Library.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Math.dll + ..\GameBinaries\VRage.Math.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Native.dll + ..\GameBinaries\VRage.Native.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.OpenVRWrapper.dll + ..\GameBinaries\VRage.OpenVRWrapper.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Render.dll + ..\GameBinaries\VRage.Render.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Render11.dll + ..\GameBinaries\VRage.Render11.dll False - ..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Scripting.dll + ..\GameBinaries\VRage.Scripting.dll @@ -158,6 +166,7 @@ True AssemblyInfo.tt + Component diff --git a/Torch.Server/TorchServer.cs b/Torch.Server/TorchServer.cs index 711ab5a..32a6748 100644 --- a/Torch.Server/TorchServer.cs +++ b/Torch.Server/TorchServer.cs @@ -24,6 +24,7 @@ using VRage.Dedicated; using VRage.FileSystem; using VRage.Game; using VRage.Game.ModAPI; +using VRage.Game.ObjectBuilder; using VRage.Game.SessionComponents; using VRage.Profiler; @@ -59,11 +60,11 @@ namespace Torch.Server MyPerServerSettings.GameDSName = MyPerServerSettings.GameNameSafe + "Dedicated"; MyPerServerSettings.GameDSDescription = "Your place for space engineering, destruction and exploring."; MySessionComponentExtDebug.ForceDisable = true; - MyPerServerSettings.AppId = 244850u; - var gameVersion = MyPerGameSettings.BasicGameInfo.GameVersion; - MyFinalBuildConstants.APP_VERSION = gameVersion ?? 0; + MyPerServerSettings.AppId = 244850; + MyFinalBuildConstants.APP_VERSION = MyPerGameSettings.BasicGameInfo.GameVersion; + //MyGlobalTypeMetadata.Static.Init(); - //TODO: Allows players to filter servers for Torch in the server browser. + //TODO: Allows players to filter servers for Torch in the server browser. Need to init Steam before this //SteamServerAPI.Instance.GameServer.SetKeyValue("SM", "Torch"); } diff --git a/Torch.Server/ViewModels/SteamUserViewModel.cs b/Torch.Server/ViewModels/SteamUserViewModel.cs new file mode 100644 index 0000000..30c3096 --- /dev/null +++ b/Torch.Server/ViewModels/SteamUserViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Torch.Server.ViewModels +{ + class SteamUserViewModel + { + } +} diff --git a/Torch.Server/Views/ConfigControl.xaml b/Torch.Server/Views/ConfigControl.xaml index 68e5b92..0bf2f5e 100644 --- a/Torch.Server/Views/ConfigControl.xaml +++ b/Torch.Server/Views/ConfigControl.xaml @@ -1,185 +1,207 @@  - + - - - - - + + \ No newline at end of file diff --git a/Torch.Server/Views/PluginsControl.xaml b/Torch.Server/Views/PluginsControl.xaml index 1b7261d..b2229d7 100644 --- a/Torch.Server/Views/PluginsControl.xaml +++ b/Torch.Server/Views/PluginsControl.xaml @@ -11,16 +11,19 @@ - - - - - - - + + + + + + + + + + diff --git a/Torch.Server/Views/PropertyGrid.xaml b/Torch.Server/Views/PropertyGrid.xaml new file mode 100644 index 0000000..28d01e6 --- /dev/null +++ b/Torch.Server/Views/PropertyGrid.xaml @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/Torch.Server/Views/PropertyGrid.xaml.cs b/Torch.Server/Views/PropertyGrid.xaml.cs new file mode 100644 index 0000000..f26fef4 --- /dev/null +++ b/Torch.Server/Views/PropertyGrid.xaml.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Torch.Server.Views +{ + /// + /// Interaction logic for PropertyGrid.xaml + /// + public partial class PropertyGrid : UserControl + { + public PropertyGrid() + { + InitializeComponent(); + } + + public void SetObject(object obj) + { + var props = obj.GetType().GetProperties(); + foreach (var prop in props) + { + var p = prop.GetValue(obj); + Grid.Items.Add(new PropertyView(p, prop.Name)); + } + } + } + + public class PropertyView : ViewModel + { + private object _obj; + + public string Name { get; } + public string Value { get { return _obj.ToString(); } } + public DataTemplate ValueEditTemplate; + + public PropertyView(object obj, string name) + { + Name = name; + _obj = obj; + + ValueEditTemplate = new DataTemplate(); + } + } + + /* + public class PropertyGridDataTemplateSelector : DataTemplateSelector + { + public override DataTemplate SelectTemplate(object item, DependencyObject container) + { + if (item is IEnumerable) + { + + } + } + }*/ +} diff --git a/Torch.Server/Views/TorchUI.xaml b/Torch.Server/Views/TorchUI.xaml index 6be87f3..c8dd984 100644 --- a/Torch.Server/Views/TorchUI.xaml +++ b/Torch.Server/Views/TorchUI.xaml @@ -6,7 +6,7 @@ xmlns:local="clr-namespace:Torch.Server" xmlns:views="clr-namespace:Torch.Server.Views" mc:Ignorable="d" - Title="Torch" Height="600" Width="800"> + Title="Torch" Height="800" Width="800">