From fb521abbda22ea4eda1bff48392ce3399c92adc7 Mon Sep 17 00:00:00 2001 From: John Gross Date: Sat, 17 Dec 2016 01:59:03 -0800 Subject: [PATCH] Rename to Torch, add command system --- PistonAPI/PistonAPI.cs | 15 --- TestPlugin/Properties/AssemblyInfo.cs | 36 ------- TestPlugin/TestPlugin.cs | 35 ------- TestPlugin/TestPlugin.csproj | 81 ---------------- {PistonAPI => Torch.API}/IEnvironmentInfo.cs | 2 +- {PistonAPI => Torch.API}/IServerControls.cs | 2 +- .../ITorchPlugin.cs | 5 +- Torch.API/ITorchServer.cs | 14 +++ {PistonAPI => Torch.API}/PluginAttribute.cs | 0 .../Properties/AssemblyInfo.cs | 4 +- .../Torch.API.csproj | 9 +- Torch.API/TorchAPI.cs | 11 +++ .../GameInitializer.cs | 11 +-- {PistonClient => Torch.Client}/Program.cs | 4 +- .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 4 +- .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 2 +- .../Properties/Settings.settings | 0 .../Torch.Client.csproj | 12 +-- .../TorchConsoleScreen.cs | 14 +-- .../TorchSettingsScreen.cs | 6 +- .../App.config | 0 {Piston.Launcher => Torch.Launcher}/App.xaml | 4 +- .../App.xaml.cs | 2 +- {Piston.Launcher => Torch.Launcher}/Config.cs | 2 +- .../MainWindow.xaml | 4 +- .../MainWindow.xaml.cs | 6 +- .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 4 +- .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 2 +- .../Properties/Settings.settings | 0 .../SpaceDirPrompt.xaml | 4 +- .../SpaceDirPrompt.xaml.cs | 2 +- .../Torch.Launcher.csproj | 6 +- .../TorchFileManager.cs | 6 +- .../MultiplayerManager.cs | 27 +++--- {PistonServer => Torch.Server}/Program.cs | 22 +++-- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/Resources.Designer.cs | 4 +- .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 2 +- .../Properties/Settings.settings | 0 .../ServerManager.cs | 32 +++---- .../SpaceEngineers.ico | Bin .../Torch.Server.csproj | 20 ++-- .../TorchServer.cs | 42 ++++++--- .../ViewModels/ChatItemInfo.cs | 2 +- .../ViewModels/ConfigDedicatedViewModel.cs | 2 +- .../Views/AddWorkshopItemsDialog.xaml | 4 +- .../Views/AddWorkshopItemsDialog.xaml.cs | 2 +- .../Views/ChatControl.xaml | 4 +- .../Views/ChatControl.xaml.cs | 8 +- .../Views/ModsControl.xaml | 4 +- .../Views/ModsControl.xaml.cs | 2 +- .../Views/PistonUI.xaml | 6 +- .../Views/PistonUI.xaml.cs | 8 +- .../Views/PlayerListControl.xaml | 4 +- .../Views/PlayerListControl.xaml.cs | 10 +- .../Views/PropertyGrid.xaml | 4 +- .../Views/PropertyGrid.xaml.cs | 2 +- .../packages.config | 0 Piston.sln => Torch.sln | 18 ++-- .../Collections/MTObservableCollection.cs | 2 +- .../Collections/PlayerInfoCache.cs | 2 +- Torch/Commands/ChatCommand.cs | 11 +++ Torch/Commands/ChatCommandAttribute.cs | 13 +++ Torch/Commands/ChatCommandModule.cs | 10 ++ Torch/Commands/CommandContext.cs | 8 ++ Torch/Commands/CommandSystem.cs | 89 ++++++++++++++++++ {Piston => Torch}/ConnectionState.cs | 2 +- .../MyPlayerCollectionExtensions.cs | 2 +- .../Extensions/StringExtensions.cs | 2 +- {Piston => Torch}/Logger.cs | 2 +- {Piston => Torch}/PlayerInfo.cs | 2 +- {Piston => Torch}/PluginManager.cs | 8 +- {Piston => Torch}/Properties/AssemblyInfo.cs | 0 {Piston => Torch}/SteamHelper.cs | 2 +- {Piston => Torch}/SteamService.cs | 2 +- Piston/Piston.csproj => Torch/Torch.csproj | 11 ++- .../PistonPlugin.cs => Torch/TorchPlugin.cs | 4 +- {Piston => Torch}/ViewModels/ModViewModel.cs | 2 +- .../ViewModels/PluginViewModel.cs | 2 +- {Piston => Torch}/ViewModels/ViewModel.cs | 2 +- 85 files changed, 366 insertions(+), 354 deletions(-) delete mode 100644 PistonAPI/PistonAPI.cs delete mode 100644 TestPlugin/Properties/AssemblyInfo.cs delete mode 100644 TestPlugin/TestPlugin.cs delete mode 100644 TestPlugin/TestPlugin.csproj rename {PistonAPI => Torch.API}/IEnvironmentInfo.cs (88%) rename {PistonAPI => Torch.API}/IServerControls.cs (89%) rename PistonAPI/IPistonPlugin.cs => Torch.API/ITorchPlugin.cs (69%) create mode 100644 Torch.API/ITorchServer.cs rename {PistonAPI => Torch.API}/PluginAttribute.cs (100%) rename {PistonAPI => Torch.API}/Properties/AssemblyInfo.cs (94%) rename PistonAPI/Piston.API.csproj => Torch.API/Torch.API.csproj (93%) create mode 100644 Torch.API/TorchAPI.cs rename {PistonClient => Torch.Client}/GameInitializer.cs (94%) rename {PistonClient => Torch.Client}/Program.cs (74%) rename {PistonClient => Torch.Client}/Properties/AssemblyInfo.cs (100%) rename {PistonServer => Torch.Client}/Properties/Resources.Designer.cs (94%) rename {Piston.Launcher => Torch.Client}/Properties/Resources.resx (100%) rename {PistonClient => Torch.Client}/Properties/Settings.Designer.cs (96%) rename {Piston.Launcher => Torch.Client}/Properties/Settings.settings (100%) rename PistonClient/Piston.Client.csproj => Torch.Client/Torch.Client.csproj (95%) rename PistonClient/PistonConsoleScreen.cs => Torch.Client/TorchConsoleScreen.cs (84%) rename PistonClient/PistonSettingsScreen.cs => Torch.Client/TorchSettingsScreen.cs (75%) rename {Piston.Launcher => Torch.Launcher}/App.config (100%) rename {Piston.Launcher => Torch.Launcher}/App.xaml (72%) rename {Piston.Launcher => Torch.Launcher}/App.xaml.cs (92%) rename {Piston.Launcher => Torch.Launcher}/Config.cs (98%) rename {Piston.Launcher => Torch.Launcher}/MainWindow.xaml (89%) rename {Piston.Launcher => Torch.Launcher}/MainWindow.xaml.cs (95%) rename {Piston.Launcher => Torch.Launcher}/Properties/AssemblyInfo.cs (100%) rename {Piston.Launcher => Torch.Launcher}/Properties/Resources.Designer.cs (94%) rename {PistonClient => Torch.Launcher}/Properties/Resources.resx (100%) rename {Piston.Launcher => Torch.Launcher}/Properties/Settings.Designer.cs (96%) rename {PistonClient => Torch.Launcher}/Properties/Settings.settings (100%) rename {Piston.Launcher => Torch.Launcher}/SpaceDirPrompt.xaml (87%) rename {Piston.Launcher => Torch.Launcher}/SpaceDirPrompt.xaml.cs (98%) rename Piston.Launcher/Piston.Launcher.csproj => Torch.Launcher/Torch.Launcher.csproj (97%) rename Piston.Launcher/PistonFileManager.cs => Torch.Launcher/TorchFileManager.cs (96%) rename {PistonServer => Torch.Server}/MultiplayerManager.cs (93%) rename {PistonServer => Torch.Server}/Program.cs (58%) rename {PistonServer => Torch.Server}/Properties/AssemblyInfo.cs (96%) rename {PistonClient => Torch.Server}/Properties/Resources.Designer.cs (94%) rename {PistonServer => Torch.Server}/Properties/Resources.resx (100%) rename {PistonServer => Torch.Server}/Properties/Settings.Designer.cs (96%) rename {PistonServer => Torch.Server}/Properties/Settings.settings (100%) rename {PistonServer => Torch.Server}/ServerManager.cs (88%) rename {PistonServer => Torch.Server}/SpaceEngineers.ico (100%) rename PistonServer/Piston.Server.csproj => Torch.Server/Torch.Server.csproj (93%) rename PistonServer/PistonServer.cs => Torch.Server/TorchServer.cs (55%) rename {PistonServer => Torch.Server}/ViewModels/ChatItemInfo.cs (96%) rename {PistonServer => Torch.Server}/ViewModels/ConfigDedicatedViewModel.cs (96%) rename {PistonServer => Torch.Server}/Views/AddWorkshopItemsDialog.xaml (88%) rename {PistonServer => Torch.Server}/Views/AddWorkshopItemsDialog.xaml.cs (98%) rename {PistonServer => Torch.Server}/Views/ChatControl.xaml (92%) rename {PistonServer => Torch.Server}/Views/ChatControl.xaml.cs (88%) rename {PistonServer => Torch.Server}/Views/ModsControl.xaml (91%) rename {PistonServer => Torch.Server}/Views/ModsControl.xaml.cs (98%) rename {PistonServer => Torch.Server}/Views/PistonUI.xaml (92%) rename {PistonServer => Torch.Server}/Views/PistonUI.xaml.cs (93%) rename {PistonServer => Torch.Server}/Views/PlayerListControl.xaml (91%) rename {PistonServer => Torch.Server}/Views/PlayerListControl.xaml.cs (82%) rename {PistonServer => Torch.Server}/Views/PropertyGrid.xaml (85%) rename {PistonServer => Torch.Server}/Views/PropertyGrid.xaml.cs (98%) rename {PistonServer => Torch.Server}/packages.config (100%) rename Piston.sln => Torch.sln (62%) rename {Piston => Torch}/Collections/MTObservableCollection.cs (98%) rename {Piston => Torch}/Collections/PlayerInfoCache.cs (98%) create mode 100644 Torch/Commands/ChatCommand.cs create mode 100644 Torch/Commands/ChatCommandAttribute.cs create mode 100644 Torch/Commands/ChatCommandModule.cs create mode 100644 Torch/Commands/CommandContext.cs create mode 100644 Torch/Commands/CommandSystem.cs rename {Piston => Torch}/ConnectionState.cs (94%) rename {Piston => Torch}/Extensions/MyPlayerCollectionExtensions.cs (97%) rename {Piston => Torch}/Extensions/StringExtensions.cs (98%) rename {Piston => Torch}/Logger.cs (97%) rename {Piston => Torch}/PlayerInfo.cs (98%) rename {Piston => Torch}/PluginManager.cs (97%) rename {Piston => Torch}/Properties/AssemblyInfo.cs (100%) rename {Piston => Torch}/SteamHelper.cs (99%) rename {Piston => Torch}/SteamService.cs (99%) rename Piston/Piston.csproj => Torch/Torch.csproj (97%) rename Piston/PistonPlugin.cs => Torch/TorchPlugin.cs (74%) rename {Piston => Torch}/ViewModels/ModViewModel.cs (97%) rename {Piston => Torch}/ViewModels/PluginViewModel.cs (86%) rename {Piston => Torch}/ViewModels/ViewModel.cs (97%) diff --git a/PistonAPI/PistonAPI.cs b/PistonAPI/PistonAPI.cs deleted file mode 100644 index 6fd51c7..0000000 --- a/PistonAPI/PistonAPI.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Controls; - -namespace Piston.API -{ - public static class PistonAPI - { - public static IServerControls ServerControls { get; } - public static IEnvironmentInfo EnvironmentInfo { get; } - } -} diff --git a/TestPlugin/Properties/AssemblyInfo.cs b/TestPlugin/Properties/AssemblyInfo.cs deleted file mode 100644 index 460f610..0000000 --- a/TestPlugin/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("TestPlugin")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestPlugin")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("bf0d9941-b488-4880-b378-a9bf942d140d")] - -// 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")] diff --git a/TestPlugin/TestPlugin.cs b/TestPlugin/TestPlugin.cs deleted file mode 100644 index 38b5cff..0000000 --- a/TestPlugin/TestPlugin.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Piston.API; -using PistonAPI; -using Sandbox; - -namespace TestPlugin -{ - [Plugin("Test Plugin")] - public class TestPlugin : IPistonPlugin - { - public void Dispose() - { - MySandboxGame.Log.WriteLineAndConsole("TestDispose"); - } - - public void Init(object gameInstance) - { - MySandboxGame.Log.WriteLineAndConsole("TestInit"); - } - - public void Update() - { - MySandboxGame.Log.WriteLineAndConsole("TestUpdate"); - } - - public void Reload() - { - MySandboxGame.Log.WriteLineAndConsole("TestReload"); - } - } -} diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj deleted file mode 100644 index c3326bc..0000000 --- a/TestPlugin/TestPlugin.csproj +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Debug - AnyCPU - {BF0D9941-B488-4880-B378-A9BF942D140D} - Library - Properties - TestPlugin - TestPlugin - v4.6.1 - 512 - - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - - - - False - C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Game.dll - - - - - - - - - - - C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.dll - - - - - - - - - {fba5d932-6254-4a1e-baf4-e229fa94e3c2} - Piston.API - - - {e36df745-260b-4956-a2e8-09f08b2e7161} - Piston.Client - - - {ca50886b-7b22-4cd8-93a0-c06f38d4f77d} - Piston.Server - - - {7e01635c-3b67-472e-bcd6-c5539564f214} - Piston - - - - - \ No newline at end of file diff --git a/PistonAPI/IEnvironmentInfo.cs b/Torch.API/IEnvironmentInfo.cs similarity index 88% rename from PistonAPI/IEnvironmentInfo.cs rename to Torch.API/IEnvironmentInfo.cs index 3ea80a6..d941b2b 100644 --- a/PistonAPI/IEnvironmentInfo.cs +++ b/Torch.API/IEnvironmentInfo.cs @@ -1,4 +1,4 @@ -namespace Piston.API +namespace Torch.API { public interface IEnvironmentInfo { diff --git a/PistonAPI/IServerControls.cs b/Torch.API/IServerControls.cs similarity index 89% rename from PistonAPI/IServerControls.cs rename to Torch.API/IServerControls.cs index 5e13089..0fba0ca 100644 --- a/PistonAPI/IServerControls.cs +++ b/Torch.API/IServerControls.cs @@ -1,6 +1,6 @@ using System.Windows.Controls; -namespace Piston.API +namespace Torch.API { public interface IServerControls { diff --git a/PistonAPI/IPistonPlugin.cs b/Torch.API/ITorchPlugin.cs similarity index 69% rename from PistonAPI/IPistonPlugin.cs rename to Torch.API/ITorchPlugin.cs index 2d41e24..5acf2bc 100644 --- a/PistonAPI/IPistonPlugin.cs +++ b/Torch.API/ITorchPlugin.cs @@ -6,10 +6,11 @@ using System.Text; using System.Threading.Tasks; using VRage.Plugins; -namespace Piston.API +namespace Torch.API { - public interface IPistonPlugin : IPlugin + public interface ITorchPlugin : IPlugin { + void Init(ITorchServer server); void Reload(); } } diff --git a/Torch.API/ITorchServer.cs b/Torch.API/ITorchServer.cs new file mode 100644 index 0000000..4f2aecf --- /dev/null +++ b/Torch.API/ITorchServer.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Torch.API +{ + public interface ITorchServer + { + void Start(); + void Stop(); + } +} diff --git a/PistonAPI/PluginAttribute.cs b/Torch.API/PluginAttribute.cs similarity index 100% rename from PistonAPI/PluginAttribute.cs rename to Torch.API/PluginAttribute.cs diff --git a/PistonAPI/Properties/AssemblyInfo.cs b/Torch.API/Properties/AssemblyInfo.cs similarity index 94% rename from PistonAPI/Properties/AssemblyInfo.cs rename to Torch.API/Properties/AssemblyInfo.cs index c198d75..6a116b9 100644 --- a/PistonAPI/Properties/AssemblyInfo.cs +++ b/Torch.API/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // 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("PistonAPI")] +[assembly: AssemblyTitle("TorchAPI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PistonAPI")] +[assembly: AssemblyProduct("TorchAPI")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/PistonAPI/Piston.API.csproj b/Torch.API/Torch.API.csproj similarity index 93% rename from PistonAPI/Piston.API.csproj rename to Torch.API/Torch.API.csproj index 612c220..7b66c74 100644 --- a/PistonAPI/Piston.API.csproj +++ b/Torch.API/Torch.API.csproj @@ -7,8 +7,8 @@ {FBA5D932-6254-4A1E-BAF4-E229FA94E3C2} Library Properties - PistonAPI - PistonAPI + Torch.API + Torch.API v4.6.1 512 @@ -48,9 +48,10 @@ - + - + + diff --git a/Torch.API/TorchAPI.cs b/Torch.API/TorchAPI.cs new file mode 100644 index 0000000..8f09746 --- /dev/null +++ b/Torch.API/TorchAPI.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Controls; + +namespace Torch.API +{ + +} diff --git a/PistonClient/GameInitializer.cs b/Torch.Client/GameInitializer.cs similarity index 94% rename from PistonClient/GameInitializer.cs rename to Torch.Client/GameInitializer.cs index 9aab2d6..f4d04c3 100644 --- a/PistonClient/GameInitializer.cs +++ b/Torch.Client/GameInitializer.cs @@ -20,7 +20,7 @@ using VRage.Utils; using VRageRender; using Game = Sandbox.Engine.Platform.Game; -namespace Piston.Client +namespace Torch.Client { public class GameInitializer { @@ -44,7 +44,7 @@ namespace Piston.Client } //Add myself to the credits because I'm awesome. - var credits = new MyCreditsDepartment("Piston Developed By") { Persons = new List + var credits = new MyCreditsDepartment("Torch Developed By") { Persons = new List { new MyCreditsPerson("JIMMACLE"), new MyCreditsPerson("REXXAR"), @@ -102,8 +102,8 @@ namespace Piston.Client { var pistonBtn = new MyGuiControlImageButton { - Name = "PistonButton", - Text = "Piston", + Name = "TorchButton", + Text = "Torch", HighlightType = MyGuiControlHighlightType.WHEN_CURSOR_OVER, Visible = true, }; @@ -119,7 +119,7 @@ namespace Piston.Client //Fix Marek's name. MyPerGameSettings.Credits.Departments[1].Persons[0].Name.Clear().Append("MEARK ROAS"); - MyScreenManager.AddScreen(new PistonConsoleScreen()); + MyScreenManager.AddScreen(new TorchConsoleScreen()); } private void InitializeRender() @@ -149,7 +149,6 @@ namespace Piston.Client } MyRenderProxy.Initialize(_renderer); - MyRenderProxy.IS_OFFICIAL = true; MyRenderProxy.GetRenderProfiler().SetAutocommit(false); MyRenderProxy.GetRenderProfiler().InitMemoryHack("MainEntryPoint"); } diff --git a/PistonClient/Program.cs b/Torch.Client/Program.cs similarity index 74% rename from PistonClient/Program.cs rename to Torch.Client/Program.cs index 4bb1dc1..8c6e2c9 100644 --- a/PistonClient/Program.cs +++ b/Torch.Client/Program.cs @@ -1,7 +1,7 @@ using System; using System.Windows; -namespace Piston.Client +namespace Torch.Client { public static class Program { @@ -15,7 +15,7 @@ namespace Piston.Client } catch (Exception e) { - MessageBox.Show($"Piston encountered an error trying to initialize the game.\n{e.Message}"); + MessageBox.Show($"Torch encountered an error trying to initialize the game.\n{e.Message}"); return; } diff --git a/PistonClient/Properties/AssemblyInfo.cs b/Torch.Client/Properties/AssemblyInfo.cs similarity index 100% rename from PistonClient/Properties/AssemblyInfo.cs rename to Torch.Client/Properties/AssemblyInfo.cs diff --git a/PistonServer/Properties/Resources.Designer.cs b/Torch.Client/Properties/Resources.Designer.cs similarity index 94% rename from PistonServer/Properties/Resources.Designer.cs rename to Torch.Client/Properties/Resources.Designer.cs index 1de6547..426fa93 100644 --- a/PistonServer/Properties/Resources.Designer.cs +++ b/Torch.Client/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Server.Properties { +namespace Torch.Client.Properties { using System; @@ -39,7 +39,7 @@ namespace Piston.Server.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Piston.Server.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Torch.Client.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/Piston.Launcher/Properties/Resources.resx b/Torch.Client/Properties/Resources.resx similarity index 100% rename from Piston.Launcher/Properties/Resources.resx rename to Torch.Client/Properties/Resources.resx diff --git a/PistonClient/Properties/Settings.Designer.cs b/Torch.Client/Properties/Settings.Designer.cs similarity index 96% rename from PistonClient/Properties/Settings.Designer.cs rename to Torch.Client/Properties/Settings.Designer.cs index 7d5eca4..79f9adf 100644 --- a/PistonClient/Properties/Settings.Designer.cs +++ b/Torch.Client/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Client.Properties { +namespace Torch.Client.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/Piston.Launcher/Properties/Settings.settings b/Torch.Client/Properties/Settings.settings similarity index 100% rename from Piston.Launcher/Properties/Settings.settings rename to Torch.Client/Properties/Settings.settings diff --git a/PistonClient/Piston.Client.csproj b/Torch.Client/Torch.Client.csproj similarity index 95% rename from PistonClient/Piston.Client.csproj rename to Torch.Client/Torch.Client.csproj index a3b2ed8..69789d1 100644 --- a/PistonClient/Piston.Client.csproj +++ b/Torch.Client/Torch.Client.csproj @@ -7,8 +7,8 @@ {E36DF745-260B-4956-A2E8-09F08B2E7161} WinExe Properties - Piston.Client - PistonClient + Torch.Client + Torch.Client v4.6.1 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -87,8 +87,8 @@ - - + + Code @@ -114,9 +114,9 @@ - + {7E01635C-3B67-472E-BCD6-C5539564F214} - Piston + Torch diff --git a/PistonClient/PistonConsoleScreen.cs b/Torch.Client/TorchConsoleScreen.cs similarity index 84% rename from PistonClient/PistonConsoleScreen.cs rename to Torch.Client/TorchConsoleScreen.cs index d8e1e0d..ea06993 100644 --- a/PistonClient/PistonConsoleScreen.cs +++ b/Torch.Client/TorchConsoleScreen.cs @@ -10,18 +10,18 @@ using Sandbox.Gui; using VRage.Utils; using VRageMath; -namespace Piston.Client +namespace Torch.Client { - public class PistonConsoleScreen : MyGuiScreenBase + public class TorchConsoleScreen : MyGuiScreenBase { private MyGuiControlTextbox _textBox; public override string GetFriendlyName() { - return "Piston Console"; + return "Torch Console"; } - public PistonConsoleScreen() : base(isTopMostScreen: true) + public TorchConsoleScreen() : base(isTopMostScreen: true) { BackgroundColor = new Vector4(0, 0, 0, 0.5f); Size = new Vector2(0.5f); @@ -33,7 +33,7 @@ namespace Piston.Client Elements.Clear(); Elements.Add(new MyGuiControlLabel { - Text = "Piston Console", + Text = "Torch Console", OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP, Position = MyGuiManager.ComputeFullscreenGuiCoordinate(MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_TOP) }); @@ -50,8 +50,8 @@ namespace Piston.Client var pistonBtn = new MyGuiControlImageButton { - Name = "PistonButton", - Text = "Piston", + Name = "TorchButton", + Text = "Torch", HighlightType = MyGuiControlHighlightType.WHEN_CURSOR_OVER, Visible = true, OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_TOP diff --git a/PistonClient/PistonSettingsScreen.cs b/Torch.Client/TorchSettingsScreen.cs similarity index 75% rename from PistonClient/PistonSettingsScreen.cs rename to Torch.Client/TorchSettingsScreen.cs index c083f71..40dfbe6 100644 --- a/PistonClient/PistonSettingsScreen.cs +++ b/Torch.Client/TorchSettingsScreen.cs @@ -7,13 +7,13 @@ using Sandbox.Graphics.GUI; using VRage.Utils; using VRageMath; -namespace Piston.Client +namespace Torch.Client { - public class PistonSettingsScreen : MyGuiScreenBase + public class TorchSettingsScreen : MyGuiScreenBase { public override string GetFriendlyName() => "Piston Settings"; - public PistonSettingsScreen() : base(new Vector2(0.5f), null, new Vector2(0.5f), true, null, 0f, 0f) + public TorchSettingsScreen() : base(new Vector2(0.5f), null, new Vector2(0.5f), true, null, 0f, 0f) { this.BackgroundColor = new Vector4(0); RecreateControls(true); diff --git a/Piston.Launcher/App.config b/Torch.Launcher/App.config similarity index 100% rename from Piston.Launcher/App.config rename to Torch.Launcher/App.config diff --git a/Piston.Launcher/App.xaml b/Torch.Launcher/App.xaml similarity index 72% rename from Piston.Launcher/App.xaml rename to Torch.Launcher/App.xaml index 9c68c35..09b2f9a 100644 --- a/Piston.Launcher/App.xaml +++ b/Torch.Launcher/App.xaml @@ -1,7 +1,7 @@ - diff --git a/Piston.Launcher/App.xaml.cs b/Torch.Launcher/App.xaml.cs similarity index 92% rename from Piston.Launcher/App.xaml.cs rename to Torch.Launcher/App.xaml.cs index c8e73b6..f7e54a7 100644 --- a/Piston.Launcher/App.xaml.cs +++ b/Torch.Launcher/App.xaml.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Threading.Tasks; using System.Windows; -namespace Piston.Launcher +namespace Torch.Launcher { /// /// Interaction logic for App.xaml diff --git a/Piston.Launcher/Config.cs b/Torch.Launcher/Config.cs similarity index 98% rename from Piston.Launcher/Config.cs rename to Torch.Launcher/Config.cs index 9efc697..b8a8637 100644 --- a/Piston.Launcher/Config.cs +++ b/Torch.Launcher/Config.cs @@ -6,7 +6,7 @@ using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; -namespace Piston.Launcher +namespace Torch.Launcher { public class Config { diff --git a/Piston.Launcher/MainWindow.xaml b/Torch.Launcher/MainWindow.xaml similarity index 89% rename from Piston.Launcher/MainWindow.xaml rename to Torch.Launcher/MainWindow.xaml index 02a3754..108a75d 100644 --- a/Piston.Launcher/MainWindow.xaml +++ b/Torch.Launcher/MainWindow.xaml @@ -1,9 +1,9 @@ - diff --git a/Piston.Launcher/MainWindow.xaml.cs b/Torch.Launcher/MainWindow.xaml.cs similarity index 95% rename from Piston.Launcher/MainWindow.xaml.cs rename to Torch.Launcher/MainWindow.xaml.cs index 24fad6c..d2d2335 100644 --- a/Piston.Launcher/MainWindow.xaml.cs +++ b/Torch.Launcher/MainWindow.xaml.cs @@ -17,7 +17,7 @@ using System.IO; using System.Reflection; using Microsoft.Win32; -namespace Piston.Launcher +namespace Torch.Launcher { /// /// Interaction logic for MainWindow.xaml @@ -25,14 +25,14 @@ namespace Piston.Launcher public partial class MainWindow : Window { private Config _config; - private PistonFileManager _fileManager; + private TorchFileManager _fileManager; public MainWindow() { InitializeComponent(); _config = Config.Load(); Title += $" v{_config.Version}"; - _fileManager = new PistonFileManager(_config.RemoteFilePath); + _fileManager = new TorchFileManager(_config.RemoteFilePath); CheckSpaceDirectory(); CheckSEBranch(); diff --git a/Piston.Launcher/Properties/AssemblyInfo.cs b/Torch.Launcher/Properties/AssemblyInfo.cs similarity index 100% rename from Piston.Launcher/Properties/AssemblyInfo.cs rename to Torch.Launcher/Properties/AssemblyInfo.cs diff --git a/Piston.Launcher/Properties/Resources.Designer.cs b/Torch.Launcher/Properties/Resources.Designer.cs similarity index 94% rename from Piston.Launcher/Properties/Resources.Designer.cs rename to Torch.Launcher/Properties/Resources.Designer.cs index e35aa75..c52d0c4 100644 --- a/Piston.Launcher/Properties/Resources.Designer.cs +++ b/Torch.Launcher/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Launcher.Properties { +namespace Torch.Launcher.Properties { using System; @@ -39,7 +39,7 @@ namespace Piston.Launcher.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Piston.Launcher.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Torch.Launcher.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/PistonClient/Properties/Resources.resx b/Torch.Launcher/Properties/Resources.resx similarity index 100% rename from PistonClient/Properties/Resources.resx rename to Torch.Launcher/Properties/Resources.resx diff --git a/Piston.Launcher/Properties/Settings.Designer.cs b/Torch.Launcher/Properties/Settings.Designer.cs similarity index 96% rename from Piston.Launcher/Properties/Settings.Designer.cs rename to Torch.Launcher/Properties/Settings.Designer.cs index 7d10189..3926b12 100644 --- a/Piston.Launcher/Properties/Settings.Designer.cs +++ b/Torch.Launcher/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Launcher.Properties { +namespace Torch.Launcher.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/PistonClient/Properties/Settings.settings b/Torch.Launcher/Properties/Settings.settings similarity index 100% rename from PistonClient/Properties/Settings.settings rename to Torch.Launcher/Properties/Settings.settings diff --git a/Piston.Launcher/SpaceDirPrompt.xaml b/Torch.Launcher/SpaceDirPrompt.xaml similarity index 87% rename from Piston.Launcher/SpaceDirPrompt.xaml rename to Torch.Launcher/SpaceDirPrompt.xaml index 643b442..b983c72 100644 --- a/Piston.Launcher/SpaceDirPrompt.xaml +++ b/Torch.Launcher/SpaceDirPrompt.xaml @@ -1,9 +1,9 @@ - diff --git a/Piston.Launcher/SpaceDirPrompt.xaml.cs b/Torch.Launcher/SpaceDirPrompt.xaml.cs similarity index 98% rename from Piston.Launcher/SpaceDirPrompt.xaml.cs rename to Torch.Launcher/SpaceDirPrompt.xaml.cs index 6d1ccf9..c74b1fc 100644 --- a/Piston.Launcher/SpaceDirPrompt.xaml.cs +++ b/Torch.Launcher/SpaceDirPrompt.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -namespace Piston.Launcher +namespace Torch.Launcher { /// /// Interaction logic for SpaceDirPrompt.xaml diff --git a/Piston.Launcher/Piston.Launcher.csproj b/Torch.Launcher/Torch.Launcher.csproj similarity index 97% rename from Piston.Launcher/Piston.Launcher.csproj rename to Torch.Launcher/Torch.Launcher.csproj index b4f03d0..b4509d9 100644 --- a/Piston.Launcher/Piston.Launcher.csproj +++ b/Torch.Launcher/Torch.Launcher.csproj @@ -7,8 +7,8 @@ {19292801-5B9C-4EE0-961F-0FA37B3A6C3D} WinExe Properties - Piston.Launcher - PistonLauncher + Torch.Launcher + Torch.Launcher v4.6.1 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -69,7 +69,7 @@ Code - + MainWindow.xaml Code diff --git a/Piston.Launcher/PistonFileManager.cs b/Torch.Launcher/TorchFileManager.cs similarity index 96% rename from Piston.Launcher/PistonFileManager.cs rename to Torch.Launcher/TorchFileManager.cs index cf89dab..1ad94bb 100644 --- a/Piston.Launcher/PistonFileManager.cs +++ b/Torch.Launcher/TorchFileManager.cs @@ -10,13 +10,13 @@ using System.Threading; using System.Threading.Tasks; using System.Windows; -namespace Piston.Launcher +namespace Torch.Launcher { - public class PistonFileManager + public class TorchFileManager { private readonly string _baseUri; - public PistonFileManager(string baseUri) + public TorchFileManager(string baseUri) { _baseUri = baseUri; } diff --git a/PistonServer/MultiplayerManager.cs b/Torch.Server/MultiplayerManager.cs similarity index 93% rename from PistonServer/MultiplayerManager.cs rename to Torch.Server/MultiplayerManager.cs index 959c042..6f9b51b 100644 --- a/PistonServer/MultiplayerManager.cs +++ b/Torch.Server/MultiplayerManager.cs @@ -12,19 +12,19 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Data; using System.Windows.Threading; -using Piston; -using Piston.Server.ViewModels; +using Torch; using Sandbox; using Sandbox.Engine.Multiplayer; using Sandbox.Game.Multiplayer; using Sandbox.Game.World; using SteamSDK; +using Torch.Server.ViewModels; using VRage.Game; using VRage.Library.Collections; using VRage.Network; using VRage.Utils; -namespace Piston.Server +namespace Torch.Server { /// /// Provides a proxy to the game's multiplayer-related functions. @@ -39,21 +39,24 @@ namespace Piston.Server public MTObservableCollection ChatView { get; } = new MTObservableCollection(); public PlayerInfo LocalPlayer { get; private set; } - internal MultiplayerManager(ServerManager serverManager) + private TorchServer _server; + + internal MultiplayerManager(TorchServer server) { - serverManager.SessionLoaded += OnSessionLoaded; + _server = server; + _server.Server.SessionLoaded += OnSessionLoaded; } - public void KickPlayer(ulong steamId) => PistonServer.Server.BeginGameAction(() => MyMultiplayer.Static.KickClient(steamId)); + public void KickPlayer(ulong steamId) => _server.Server.BeginGameAction(() => MyMultiplayer.Static.KickClient(steamId)); public void BanPlayer(ulong steamId, bool banned = true) { - PistonServer.Server.BeginGameAction(() => - { - MyMultiplayer.Static.BanClient(steamId, banned); - if (_gameOwnerIds.ContainsKey(steamId)) - MyMultiplayer.Static.BanClient(_gameOwnerIds[steamId], banned); - }); + _server.Server.BeginGameAction(() => + { + MyMultiplayer.Static.BanClient(steamId, banned); + if (_gameOwnerIds.ContainsKey(steamId)) + MyMultiplayer.Static.BanClient(_gameOwnerIds[steamId], banned); + }); } /// diff --git a/PistonServer/Program.cs b/Torch.Server/Program.cs similarity index 58% rename from PistonServer/Program.cs rename to Torch.Server/Program.cs index 6f1530c..6331b38 100644 --- a/PistonServer/Program.cs +++ b/Torch.Server/Program.cs @@ -8,25 +8,27 @@ using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Threading; -using Piston; +using Torch; -namespace Piston.Server +namespace Torch.Server { public static class Program { + private static TorchServer _server = new TorchServer(); + [STAThread] public static void Main(string[] args) { - PistonServer.Init(); - PistonServer.Server.RunArgs = new[] { "-console" }; + _server.Init(); + _server.Server.RunArgs = new[] { "-console" }; if (args.Contains("-nogui")) - PistonServer.Server.StartServer(); + _server.Server.StartServer(); else StartUI(); - if (args.Contains("-autostart") && !PistonServer.Server.IsRunning) - PistonServer.Server.StartServerThread(); + if (args.Contains("-autostart") && !_server.Server.IsRunning) + _server.Server.StartServerThread(); Dispatcher.Run(); } @@ -34,13 +36,13 @@ namespace Piston.Server public static void StartUI() { Thread.CurrentThread.Name = "UI Thread"; - PistonServer.UI.Show(); + _server.UI.Show(); } public static void FullRestart() { - PistonServer.Server.StopServer(); - Process.Start("PistonServer.exe", "-autostart"); + _server.Server.StopServer(); + Process.Start("TorchServer.exe", "-autostart"); Environment.Exit(1); } } diff --git a/PistonServer/Properties/AssemblyInfo.cs b/Torch.Server/Properties/AssemblyInfo.cs similarity index 96% rename from PistonServer/Properties/AssemblyInfo.cs rename to Torch.Server/Properties/AssemblyInfo.cs index 74bd057..8ff64c2 100644 --- a/PistonServer/Properties/AssemblyInfo.cs +++ b/Torch.Server/Properties/AssemblyInfo.cs @@ -7,11 +7,11 @@ 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("PistonServer")] +[assembly: AssemblyTitle("TorchServer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PistonServer")] +[assembly: AssemblyProduct("TorchServer")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/PistonClient/Properties/Resources.Designer.cs b/Torch.Server/Properties/Resources.Designer.cs similarity index 94% rename from PistonClient/Properties/Resources.Designer.cs rename to Torch.Server/Properties/Resources.Designer.cs index 20e1768..9d38f2c 100644 --- a/PistonClient/Properties/Resources.Designer.cs +++ b/Torch.Server/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Client.Properties { +namespace Torch.Server.Properties { using System; @@ -39,7 +39,7 @@ namespace Piston.Client.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Piston.Client.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Torch.Server.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/PistonServer/Properties/Resources.resx b/Torch.Server/Properties/Resources.resx similarity index 100% rename from PistonServer/Properties/Resources.resx rename to Torch.Server/Properties/Resources.resx diff --git a/PistonServer/Properties/Settings.Designer.cs b/Torch.Server/Properties/Settings.Designer.cs similarity index 96% rename from PistonServer/Properties/Settings.Designer.cs rename to Torch.Server/Properties/Settings.Designer.cs index 118757d..335c439 100644 --- a/PistonServer/Properties/Settings.Designer.cs +++ b/Torch.Server/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Piston.Server.Properties { +namespace Torch.Server.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/PistonServer/Properties/Settings.settings b/Torch.Server/Properties/Settings.settings similarity index 100% rename from PistonServer/Properties/Settings.settings rename to Torch.Server/Properties/Settings.settings diff --git a/PistonServer/ServerManager.cs b/Torch.Server/ServerManager.cs similarity index 88% rename from PistonServer/ServerManager.cs rename to Torch.Server/ServerManager.cs index 95f1a63..a49f0fe 100644 --- a/PistonServer/ServerManager.cs +++ b/Torch.Server/ServerManager.cs @@ -7,7 +7,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; -using Piston; +using Torch; using Sandbox; using Sandbox.Engine.Multiplayer; using Sandbox.Game; @@ -18,7 +18,7 @@ using VRage.Game; using VRage.Game.SessionComponents; using VRage.Profiler; -namespace Piston.Server +namespace Torch.Server { public class ServerManager : IDisposable { @@ -74,20 +74,20 @@ namespace Piston.Server AutoResetEvent e = new AutoResetEvent(false); MySandboxGame.Static.Invoke(() => - { - try - { - action(); - } - catch (Exception ex) - { - //log - } - finally - { - e.Set(); - } - }); + { + try + { + action(); + } + catch (Exception ex) + { + //log + } + finally + { + e.Set(); + } + }); //timeout so we don't accidentally hang the server e.WaitOne(60000); diff --git a/PistonServer/SpaceEngineers.ico b/Torch.Server/SpaceEngineers.ico similarity index 100% rename from PistonServer/SpaceEngineers.ico rename to Torch.Server/SpaceEngineers.ico diff --git a/PistonServer/Piston.Server.csproj b/Torch.Server/Torch.Server.csproj similarity index 93% rename from PistonServer/Piston.Server.csproj rename to Torch.Server/Torch.Server.csproj index 91edf16..0ca4f42 100644 --- a/PistonServer/Piston.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -7,8 +7,8 @@ {CA50886B-7B22-4CD8-93A0-C06F38D4F77D} Exe Properties - Piston.Server - PistonServer + Torch.Server + Torch.Server v4.6.1 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -37,7 +37,7 @@ true - Piston.Server.Program + Torch.Server.Program SpaceEngineers.ico @@ -119,7 +119,7 @@ PistonUI.xaml - + PlayerListControl.xaml @@ -155,9 +155,17 @@ - + + {fba5d932-6254-4a1e-baf4-e229fa94e3c2} + Torch.API + + + {19292801-5B9C-4EE0-961F-0FA37B3A6C3D} + Torch.Launcher + + {7e01635c-3b67-472e-bcd6-c5539564f214} - Piston + Torch diff --git a/PistonServer/PistonServer.cs b/Torch.Server/TorchServer.cs similarity index 55% rename from PistonServer/PistonServer.cs rename to Torch.Server/TorchServer.cs index eb80597..3e1d45d 100644 --- a/PistonServer/PistonServer.cs +++ b/Torch.Server/TorchServer.cs @@ -4,38 +4,52 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using Piston; -using Piston.Server.Properties; +using Torch; using Sandbox; using Sandbox.Game; using SpaceEngineers.Game; +using Torch.API; +using Torch.Launcher; using VRage.Dedicated; using VRage.Game; using VRage.Game.SessionComponents; -namespace Piston.Server +namespace Torch.Server { /// /// Entry point for all Piston server functionality. /// - public static class PistonServer + public class TorchServer : ITorchServer { - public static ServerManager Server { get; private set; } - public static MultiplayerManager Multiplayer { get; private set; } - public static PluginManager Plugins { get; private set; } - public static PistonUI UI { get; private set; } + public ServerManager Server { get; private set; } + public MultiplayerManager Multiplayer { get; private set; } + public PluginManager Plugins { get; private set; } + public PistonUI UI { get; private set; } - private static bool _init; + private bool _init; - public static void Init() + public void Start() + { + if (!_init) + Init(); + + Server.StartServer(); + } + + public void Stop() + { + Server.StopServer(); + } + + public void Init() { if (_init) return; - Logger.Write("Initializing Piston"); + Logger.Write("Initializing Torch"); _init = true; Server = new ServerManager(); - Multiplayer = new MultiplayerManager(Server); + Multiplayer = new MultiplayerManager(this); Plugins = new PluginManager(); UI = new PistonUI(); @@ -45,9 +59,9 @@ namespace Piston.Server UI.PropGrid.SetObject(MySandboxGame.ConfigDedicated); } - public static void Reset() + public void Reset() { - Logger.Write("Resetting Piston"); + Logger.Write("Resetting Torch"); Server.Dispose(); UI.Close(); diff --git a/PistonServer/ViewModels/ChatItemInfo.cs b/Torch.Server/ViewModels/ChatItemInfo.cs similarity index 96% rename from PistonServer/ViewModels/ChatItemInfo.cs rename to Torch.Server/ViewModels/ChatItemInfo.cs index c12c83b..a4a91a3 100644 --- a/PistonServer/ViewModels/ChatItemInfo.cs +++ b/Torch.Server/ViewModels/ChatItemInfo.cs @@ -1,6 +1,6 @@ using System; -namespace Piston.Server.ViewModels +namespace Torch.Server.ViewModels { public class ChatItemInfo : ViewModel { diff --git a/PistonServer/ViewModels/ConfigDedicatedViewModel.cs b/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs similarity index 96% rename from PistonServer/ViewModels/ConfigDedicatedViewModel.cs rename to Torch.Server/ViewModels/ConfigDedicatedViewModel.cs index 6b3e28f..40522e2 100644 --- a/PistonServer/ViewModels/ConfigDedicatedViewModel.cs +++ b/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs @@ -7,7 +7,7 @@ using Sandbox.Engine.Utils; using VRage.Game; using VRage.Game.ModAPI; -namespace Piston.Server.ViewModels +namespace Torch.Server.ViewModels { public class ConfigDedicatedViewModel : ViewModel { diff --git a/PistonServer/Views/AddWorkshopItemsDialog.xaml b/Torch.Server/Views/AddWorkshopItemsDialog.xaml similarity index 88% rename from PistonServer/Views/AddWorkshopItemsDialog.xaml rename to Torch.Server/Views/AddWorkshopItemsDialog.xaml index 3b62e60..5d2daf2 100644 --- a/PistonServer/Views/AddWorkshopItemsDialog.xaml +++ b/Torch.Server/Views/AddWorkshopItemsDialog.xaml @@ -1,9 +1,9 @@ - diff --git a/PistonServer/Views/AddWorkshopItemsDialog.xaml.cs b/Torch.Server/Views/AddWorkshopItemsDialog.xaml.cs similarity index 98% rename from PistonServer/Views/AddWorkshopItemsDialog.xaml.cs rename to Torch.Server/Views/AddWorkshopItemsDialog.xaml.cs index 4f15832..18b00c8 100644 --- a/PistonServer/Views/AddWorkshopItemsDialog.xaml.cs +++ b/Torch.Server/Views/AddWorkshopItemsDialog.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -namespace Piston.Server +namespace Torch.Server { /// /// Interaction logic for AddModsDialog.xaml diff --git a/PistonServer/Views/ChatControl.xaml b/Torch.Server/Views/ChatControl.xaml similarity index 92% rename from PistonServer/Views/ChatControl.xaml rename to Torch.Server/Views/ChatControl.xaml index 98da407..2135908 100644 --- a/PistonServer/Views/ChatControl.xaml +++ b/Torch.Server/Views/ChatControl.xaml @@ -1,9 +1,9 @@ - diff --git a/PistonServer/Views/ChatControl.xaml.cs b/Torch.Server/Views/ChatControl.xaml.cs similarity index 88% rename from PistonServer/Views/ChatControl.xaml.cs rename to Torch.Server/Views/ChatControl.xaml.cs index c10f20a..2f53ec2 100644 --- a/PistonServer/Views/ChatControl.xaml.cs +++ b/Torch.Server/Views/ChatControl.xaml.cs @@ -13,13 +13,13 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Windows.Threading; -using Piston; +using Torch; using Sandbox; using Sandbox.Engine.Multiplayer; using Sandbox.Game.World; using SteamSDK; -namespace Piston.Server +namespace Torch.Server { /// /// Interaction logic for ChatControl.xaml @@ -29,7 +29,7 @@ namespace Piston.Server public ChatControl() { InitializeComponent(); - ChatItems.ItemsSource = PistonServer.Multiplayer.ChatView; + ChatItems.ItemsSource = TorchServer.Multiplayer.ChatView; } private void SendButton_Click(object sender, RoutedEventArgs e) @@ -47,7 +47,7 @@ namespace Piston.Server { //Can't use Message.Text directly because of object ownership in WPF. var text = Message.Text; - PistonServer.Multiplayer.SendMessage(text); + TorchServer.Multiplayer.SendMessage(text); Message.Text = ""; } } diff --git a/PistonServer/Views/ModsControl.xaml b/Torch.Server/Views/ModsControl.xaml similarity index 91% rename from PistonServer/Views/ModsControl.xaml rename to Torch.Server/Views/ModsControl.xaml index c38649b..095bd5f 100644 --- a/PistonServer/Views/ModsControl.xaml +++ b/Torch.Server/Views/ModsControl.xaml @@ -1,9 +1,9 @@ -