Skip to content

Commit d2da824

Browse files
authored
Merge pull request #6 from TorchAPI/dep-manager
Update to use the new dependency manager
2 parents d587e41 + 3f2424d commit d2da824

4 files changed

Lines changed: 32 additions & 48 deletions

File tree

‎Essentials/AutoCommand.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Torch;
88
using Torch.API;
99
using Torch.Commands;
10+
using Torch.API.Managers;
1011
using Torch.Server;
1112

1213
namespace Essentials
@@ -39,7 +40,7 @@ private void RunCommand(object state)
3940
var autoCommand = (AutoCommand)state;
4041
TorchBase.Instance.Invoke(() =>
4142
{
42-
var manager = TorchBase.Instance.GetManager<CommandManager>();
43+
var manager = TorchBase.Instance.Managers.GetManager<CommandManager>();
4344
manager?.HandleCommandFromServer(autoCommand.Command);
4445
});
4546
}

‎Essentials/Commands/PlayerModule.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using VRage.Game;
1111
using VRage.Game.ModAPI;
1212
using VRage.ModAPI;
13+
using Torch.API.Managers;
1314

1415
namespace Essentials
1516
{
@@ -20,7 +21,7 @@ public class PlayerModule : CommandModule
2021
[Command("say", "Say a message as the server.")]
2122
public void Say(string message)
2223
{
23-
Context.Torch.GetManager<MultiplayerManager>()?.SendMessage(Context.RawArgs);
24+
Context.Torch.Managers.GetManager<MultiplayerManager>()?.SendMessage(Context.RawArgs);
2425
}
2526

2627
[Command("tp", "Teleport one entity to another.")]

‎Essentials/Essentials.csproj‎

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}</ProjectGuid>
86
<OutputType>Library</OutputType>
97
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -12,23 +10,6 @@
1210
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1311
<FileAlignment>512</FileAlignment>
1412
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<DebugSymbols>true</DebugSymbols>
17-
<DebugType>full</DebugType>
18-
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug\</OutputPath>
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21-
<ErrorReport>prompt</ErrorReport>
22-
<WarningLevel>4</WarningLevel>
23-
</PropertyGroup>
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<DebugType>pdbonly</DebugType>
26-
<Optimize>true</Optimize>
27-
<OutputPath>bin\Release\</OutputPath>
28-
<DefineConstants>TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
</PropertyGroup>
3213
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
3314
<DebugSymbols>true</DebugSymbols>
3415
<OutputPath>bin\x64\Debug\</OutputPath>
@@ -54,22 +35,22 @@
5435
<Reference Include="PresentationCore" />
5536
<Reference Include="PresentationFramework" />
5637
<Reference Include="Sandbox.Common">
57-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Common.dll</HintPath>
38+
<HintPath>..\..\Torch\GameBinaries\Sandbox.Common.dll</HintPath>
5839
</Reference>
5940
<Reference Include="Sandbox.Game">
60-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Game.dll</HintPath>
41+
<HintPath>..\..\Torch\GameBinaries\Sandbox.Game.dll</HintPath>
6142
</Reference>
6243
<Reference Include="Sandbox.Graphics">
63-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\Sandbox.Graphics.dll</HintPath>
44+
<HintPath>..\..\Torch\GameBinaries\Sandbox.Graphics.dll</HintPath>
6445
</Reference>
6546
<Reference Include="SpaceEngineers.Game">
66-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.Game.dll</HintPath>
47+
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.Game.dll</HintPath>
6748
</Reference>
6849
<Reference Include="SpaceEngineers.ObjectBuilders">
69-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.ObjectBuilders.dll</HintPath>
50+
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
7051
</Reference>
7152
<Reference Include="SpaceEngineers.ObjectBuilders.XmlSerializers">
72-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
53+
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
7354
</Reference>
7455
<Reference Include="System" />
7556
<Reference Include="System.Core" />
@@ -82,52 +63,52 @@
8263
<Reference Include="System.Net.Http" />
8364
<Reference Include="System.Xml" />
8465
<Reference Include="Torch">
85-
<HintPath>..\..\Torch\Torch.Server\bin\x64\Release\Torch.dll</HintPath>
66+
<HintPath>..\..\Torch\bin\x64\Release\Torch.dll</HintPath>
8667
</Reference>
8768
<Reference Include="Torch.API">
88-
<HintPath>..\..\Torch\Torch.Server\bin\x64\Release\Torch.API.dll</HintPath>
69+
<HintPath>..\..\Torch\bin\x64\Release\Torch.API.dll</HintPath>
8970
</Reference>
9071
<Reference Include="Torch.Server">
91-
<HintPath>..\..\Torch\Torch.Server\bin\x64\Release\Torch.Server.exe</HintPath>
72+
<HintPath>..\..\Torch\bin\x64\Release\Torch.Server.exe</HintPath>
9273
</Reference>
9374
<Reference Include="VRage">
94-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.dll</HintPath>
75+
<HintPath>..\..\Torch\GameBinaries\VRage.dll</HintPath>
9576
</Reference>
9677
<Reference Include="VRage.Audio">
97-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Audio.dll</HintPath>
78+
<HintPath>..\..\Torch\GameBinaries\VRage.Audio.dll</HintPath>
9879
</Reference>
9980
<Reference Include="VRage.Dedicated">
100-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Dedicated.dll</HintPath>
81+
<HintPath>..\..\Torch\GameBinaries\VRage.Dedicated.dll</HintPath>
10182
</Reference>
10283
<Reference Include="VRage.Game">
103-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Game.dll</HintPath>
84+
<HintPath>..\..\Torch\GameBinaries\VRage.Game.dll</HintPath>
10485
</Reference>
10586
<Reference Include="VRage.Game.XmlSerializers">
106-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Game.XmlSerializers.dll</HintPath>
87+
<HintPath>..\..\Torch\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
10788
</Reference>
10889
<Reference Include="VRage.Input">
109-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Input.dll</HintPath>
90+
<HintPath>..\..\Torch\GameBinaries\VRage.Input.dll</HintPath>
11091
</Reference>
11192
<Reference Include="VRage.Library">
112-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Library.dll</HintPath>
93+
<HintPath>..\..\Torch\GameBinaries\VRage.Library.dll</HintPath>
11394
</Reference>
11495
<Reference Include="VRage.Math">
115-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Math.dll</HintPath>
96+
<HintPath>..\..\Torch\GameBinaries\VRage.Math.dll</HintPath>
11697
</Reference>
11798
<Reference Include="VRage.Native">
118-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Native.dll</HintPath>
99+
<HintPath>..\..\Torch\GameBinaries\VRage.Native.dll</HintPath>
119100
</Reference>
120101
<Reference Include="VRage.OpenVRWrapper">
121-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.OpenVRWrapper.dll</HintPath>
102+
<HintPath>..\..\Torch\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
122103
</Reference>
123104
<Reference Include="VRage.Render">
124-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Render.dll</HintPath>
105+
<HintPath>..\..\Torch\GameBinaries\VRage.Render.dll</HintPath>
125106
</Reference>
126107
<Reference Include="VRage.Render11">
127-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Render11.dll</HintPath>
108+
<HintPath>..\..\Torch\GameBinaries\VRage.Render11.dll</HintPath>
128109
</Reference>
129110
<Reference Include="VRage.Scripting">
130-
<HintPath>..\..\..\..\..\..\..\steamcmd\steamapps\common\SpaceEngineersDedicatedServer\DedicatedServer64\VRage.Scripting.dll</HintPath>
111+
<HintPath>..\..\Torch\GameBinaries\VRage.Scripting.dll</HintPath>
131112
</Reference>
132113
<Reference Include="WindowsBase" />
133114
</ItemGroup>

‎Essentials/Essentials.sln‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.3
4+
VisualStudioVersion = 15.0.26730.8
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials", "Essentials.csproj", "{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}"
77
EndProject
@@ -13,16 +13,17 @@ Global
1313
Release|x64 = Release|x64
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17-
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|Any CPU.ActiveCfg = Debug|x64
1817
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.ActiveCfg = Debug|x64
1918
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.Build.0 = Debug|x64
20-
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|Any CPU.ActiveCfg = Release|x64
2220
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.ActiveCfg = Release|x64
2321
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.Build.0 = Release|x64
2422
EndGlobalSection
2523
GlobalSection(SolutionProperties) = preSolution
2624
HideSolutionNode = FALSE
2725
EndGlobalSection
26+
GlobalSection(ExtensibilityGlobals) = postSolution
27+
SolutionGuid = {F5A14432-44BA-480B-8B20-1AC78BEF79BC}
28+
EndGlobalSection
2829
EndGlobal

0 commit comments

Comments
 (0)