Update template to latest RobustToolbox version.

- Converts template to use file-scoped namespaces.
- Add manifest.yml and comments for it.
This commit is contained in:
Vera Aguilera Puerto 2021-12-29 12:21:56 +01:00
parent b417f4355e
commit 729c2a6206
18 changed files with 197 additions and 272 deletions

View file

@ -1,12 +1,11 @@
using Robust.Shared.IoC; using Robust.Shared.IoC;
namespace Content.Client namespace Content.Client;
internal static class ClientContentIoC
{ {
internal static class ClientContentIoC
{
public static void Register() public static void Register()
{ {
// DEVNOTE: IoCManager registrations for the client go here and only here. // DEVNOTE: IoCManager registrations for the client go here and only here.
} }
}
} }

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 --> <!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework> <TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>9</LangVersion> <LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\bin\Content.Client\</OutputPath> <OutputPath>..\bin\Content.Client\</OutputPath>

View file

@ -6,11 +6,11 @@ using Robust.Shared.IoC;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Timing; using Robust.Shared.Timing;
// DEVNOTE: Games that want to be on the hub are FORCED use the "Content." prefix for assemblies they want to load. // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file.
namespace Content.Client namespace Content.Client;
public class EntryPoint : GameClient
{ {
public class EntryPoint : GameClient
{
public override void Init() public override void Init()
{ {
var factory = IoCManager.Resolve<IComponentFactory>(); var factory = IoCManager.Resolve<IComponentFactory>();
@ -69,7 +69,4 @@ namespace Content.Client
base.Update(level, frameEventArgs); base.Update(level, frameEventArgs);
// DEVNOTE: Game update loop goes here. Usually you'll want some independent GameTicker. // DEVNOTE: Game update loop goes here. Usually you'll want some independent GameTicker.
} }
}
} }

View file

@ -1,9 +1,8 @@
namespace Content.Client namespace Content.Client;
public static class IgnoredComponents
{ {
public static class IgnoredComponents
{
public static string[] List => new string[] { public static string[] List => new string[] {
// Stick components you want ignored here. // Stick components you want ignored here.
}; };
}
} }

View file

@ -1,9 +1,8 @@
namespace Content.Client namespace Content.Client;
public static class IgnoredPrototypes
{ {
public static class IgnoredPrototypes
{
public static string[] List => new string[] { public static string[] List => new string[] {
// Stick prototypes you want ignored here. // Stick prototypes you want ignored here.
}; };
}
} }

View file

@ -1,10 +1,10 @@
using Robust.Client; using Robust.Client;
using Robust.Shared.Utility; using Robust.Shared.Utility;
namespace Content.Client namespace Content.Client;
internal static class Program
{ {
internal static class Program
{
public static void Main(string[] args) public static void Main(string[] args)
{ {
ContentStart.Start(args); ContentStart.Start(args);
@ -23,5 +23,4 @@ namespace Content.Client
DefaultWindowTitle = "Robust Template" DefaultWindowTitle = "Robust Template"
});*/ });*/
} }
}
} }

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 --> <!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework> <TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>9</LangVersion> <LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\bin\Content.Server\</OutputPath> <OutputPath>..\bin\Content.Server\</OutputPath>

View file

@ -3,11 +3,11 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Timing; using Robust.Shared.Timing;
// DEVNOTE: Games that want to be on the hub are FORCED use the "Content." prefix for assemblies they want to load. // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file.
namespace Content.Server namespace Content.Server;
public class EntryPoint : GameServer
{ {
public class EntryPoint : GameServer
{
public override void Init() public override void Init()
{ {
base.Init(); base.Init();
@ -41,5 +41,4 @@ namespace Content.Server
base.Update(level, frameEventArgs); base.Update(level, frameEventArgs);
// DEVNOTE: Game update loop goes here. Usually you'll want some independent GameTicker. // DEVNOTE: Game update loop goes here. Usually you'll want some independent GameTicker.
} }
}
} }

View file

@ -1,9 +1,8 @@
namespace Content.Server namespace Content.Server;
public static class IgnoredComponents
{ {
public static class IgnoredComponents
{
public static string[] List => new string[] { public static string[] List => new string[] {
// Stick components you want ignored here. // Stick components you want ignored here.
}; };
}
} }

View file

@ -1,9 +1,9 @@
using Robust.Server; using Robust.Server;
namespace Content.Server namespace Content.Server;
internal static class Program
{ {
internal static class Program
{
public static void Main(string[] args) public static void Main(string[] args)
{ {
ContentStart.Start(args); ContentStart.Start(args);
@ -17,5 +17,4 @@ namespace Content.Server
}); });
*/ */
} }
}
} }

View file

@ -1,12 +1,11 @@
using Robust.Shared.IoC; using Robust.Shared.IoC;
namespace Content.Server namespace Content.Server;
internal static class ServerContentIoC
{ {
internal static class ServerContentIoC
{
public static void Register() public static void Register()
{ {
// DEVNOTE: IoCManager registrations for the server go here and only here. // DEVNOTE: IoCManager registrations for the server go here and only here.
} }
}
} }

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 --> <!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework> <TargetFramework>$(TargetFramework)</TargetFramework>
<LangVersion>9</LangVersion> <LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>../bin/Content.Shared</OutputPath> <OutputPath>../bin/Content.Shared</OutputPath>

View file

@ -3,11 +3,11 @@ using Robust.Shared.ContentPack;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
// DEVNOTE: Games that want to be on the hub are FORCED use the "Content." prefix for assemblies they want to load. // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file.
namespace Content.Shared namespace Content.Shared;
public class EntryPoint : GameShared
{ {
public class EntryPoint : GameShared
{
// IoC services shared between the client and the server go here... // IoC services shared between the client and the server go here...
// See line 23. Controls the default game culture and language. // See line 23. Controls the default game culture and language.
@ -38,5 +38,4 @@ namespace Content.Shared
// DEVNOTE: You might want to put special init handlers for, say, tiles here. // DEVNOTE: You might want to put special init handlers for, say, tiles here.
// TODO: Document what else you might want to put here // TODO: Document what else you might want to put here
} }
}
} }

View file

@ -1,13 +1,13 @@
using Robust.Shared; using Robust.Shared;
using Robust.Shared.Configuration; using Robust.Shared.Configuration;
namespace Content.Shared namespace Content.Shared;
// DEVNOTE: This is the same as SS14's CCVars. Except it's not named CCVars as that name is
// hot garbage.
[CVarDefs]
public sealed class GameConfigVars: CVars
{ {
// DEVNOTE: This is the same as SS14's CCVars. Except it's not named CCVars as that name is
// hot garbage.
[CVarDefs]
public sealed class GameConfigVars: CVars
{
// Declare persistent game config variables here. // Declare persistent game config variables here.
// ``` // ```
// public static readonly CVarDef<SerializableType> // public static readonly CVarDef<SerializableType>
@ -17,5 +17,4 @@ namespace Content.Shared
public static readonly CVarDef<bool> public static readonly CVarDef<bool>
DummyCVarForTemplate = CVarDef.Create("dummy.whydoineedthis", true, CVar.ARCHIVE); DummyCVarForTemplate = CVarDef.Create("dummy.whydoineedthis", true, CVar.ARCHIVE);
}
} }

View file

@ -1,11 +1,10 @@
using Robust.Shared.Input; using Robust.Shared.Input;
namespace Content.Shared.Input namespace Content.Shared.Input;
[KeyFunctions]
public static class ContentKeyFunctions
{ {
[KeyFunctions]
public static class ContentKeyFunctions
{
// DEVNOTE: Stick keys you want to be bindable here. // DEVNOTE: Stick keys you want to be bindable here.
// public static readonly DummyKey = "DummyKey"; // public static readonly DummyKey = "DummyKey";
}
} }

2
Resources/manifest.yml Normal file
View file

@ -0,0 +1,2 @@
modules: [] # Any needed RobustToolbox modules here.
assemblyPrefix: Content # Assembly prefix here.

View file

@ -59,16 +59,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Generators", "Robust
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Base", "RobustToolbox\Avalonia.Base\Avalonia.Base.csproj", "{BDF16A97-6269-4CA1-8D67-785DDD357B30}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Base", "RobustToolbox\Avalonia.Base\Avalonia.Base.csproj", "{BDF16A97-6269-4CA1-8D67-785DDD357B30}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Linguini", "Linguini", "{D23906E1-8276-4D63-9E06-F1194DCCBE3A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linguini.Bundle", "RobustToolbox\Linguini\Linguini.Bundle\Linguini.Bundle.csproj", "{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linguini.Shared", "RobustToolbox\Linguini\Linguini.Shared\Linguini.Shared.csproj", "{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linguini.Syntax", "RobustToolbox\Linguini\Linguini.Syntax\Linguini.Syntax.csproj", "{4789A7B8-FC16-4606-8544-94291C148937}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluralRules.Generator", "RobustToolbox\Linguini\PluralRules.Generator\PluralRules.Generator.csproj", "{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -346,54 +336,6 @@ Global
{BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x64.Build.0 = Release|Any CPU {BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x64.Build.0 = Release|Any CPU
{BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x86.ActiveCfg = Release|Any CPU {BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x86.ActiveCfg = Release|Any CPU
{BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x86.Build.0 = Release|Any CPU {BDF16A97-6269-4CA1-8D67-785DDD357B30}.Release|x86.Build.0 = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|x64.ActiveCfg = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|x64.Build.0 = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|x86.ActiveCfg = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Debug|x86.Build.0 = Debug|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|Any CPU.Build.0 = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|x64.ActiveCfg = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|x64.Build.0 = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|x86.ActiveCfg = Release|Any CPU
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D}.Release|x86.Build.0 = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|x64.ActiveCfg = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|x64.Build.0 = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|x86.ActiveCfg = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Debug|x86.Build.0 = Debug|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|Any CPU.Build.0 = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|x64.ActiveCfg = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|x64.Build.0 = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|x86.ActiveCfg = Release|Any CPU
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A}.Release|x86.Build.0 = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|x64.ActiveCfg = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|x64.Build.0 = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|x86.ActiveCfg = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Debug|x86.Build.0 = Debug|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|Any CPU.Build.0 = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|x64.ActiveCfg = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|x64.Build.0 = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|x86.ActiveCfg = Release|Any CPU
{4789A7B8-FC16-4606-8544-94291C148937}.Release|x86.Build.0 = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|x64.ActiveCfg = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|x64.Build.0 = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|x86.ActiveCfg = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Debug|x86.Build.0 = Debug|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|Any CPU.Build.0 = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|x64.ActiveCfg = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|x64.Build.0 = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|x86.ActiveCfg = Release|Any CPU
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{2A829DE3-FCB2-4FEA-A6F3-B85122C8D11E} = {F5F87A9D-C304-4833-B107-D666317F6931} {2A829DE3-FCB2-4FEA-A6F3-B85122C8D11E} = {F5F87A9D-C304-4833-B107-D666317F6931}
@ -420,10 +362,5 @@ Global
{D56D47F6-2C26-42D2-BA00-C39824CFAF55} = {F5F87A9D-C304-4833-B107-D666317F6931} {D56D47F6-2C26-42D2-BA00-C39824CFAF55} = {F5F87A9D-C304-4833-B107-D666317F6931}
{62452255-1DE7-4D37-BB01-A690EC7E3156} = {F5F87A9D-C304-4833-B107-D666317F6931} {62452255-1DE7-4D37-BB01-A690EC7E3156} = {F5F87A9D-C304-4833-B107-D666317F6931}
{BDF16A97-6269-4CA1-8D67-785DDD357B30} = {F5F87A9D-C304-4833-B107-D666317F6931} {BDF16A97-6269-4CA1-8D67-785DDD357B30} = {F5F87A9D-C304-4833-B107-D666317F6931}
{D23906E1-8276-4D63-9E06-F1194DCCBE3A} = {F5F87A9D-C304-4833-B107-D666317F6931}
{0B3BC868-306D-4D0D-93E2-38FBC24A4F1D} = {D23906E1-8276-4D63-9E06-F1194DCCBE3A}
{3D1D4CE5-5029-4EDB-882A-CD7951FF1B7A} = {D23906E1-8276-4D63-9E06-F1194DCCBE3A}
{4789A7B8-FC16-4606-8544-94291C148937} = {D23906E1-8276-4D63-9E06-F1194DCCBE3A}
{72910CCC-6EA7-41CE-9B56-9FFCFBA7BAF2} = {D23906E1-8276-4D63-9E06-F1194DCCBE3A}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

@ -1 +1 @@
Subproject commit 4ba56542531c4d810556455d2891a3ed82a53f86 Subproject commit e3dc446e9ea75d6802686397cf19023bd4433e64