From ca2bb9dcffbe28d5afe7fa12ff4d97d0bcf88ada Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Sun, 16 Nov 2025 20:34:33 +0100 Subject: [PATCH] Update RT to 268.0.0 --- Content.Client/Content.Client.csproj | 9 ++------- Content.Client/EntryPoint.cs | 8 ++++---- Content.Client/Program.cs | 1 + Content.Client/app.config | 15 --------------- Content.Server/Content.Server.csproj | 6 +----- Content.Server/EntryPoint.cs | 4 ++-- Content.Server/LocalHostConGroup.cs | 8 +++++--- Content.Server/ServerContentIoC.cs | 4 ++-- Content.Server/app.config | 15 --------------- Content.Shared/Content.Shared.csproj | 10 +++------- Content.Shared/EntryPoint.cs | 4 ++-- Content.Shared/app.config | 15 --------------- Directory.Packages.props | 6 ++++++ RobustTemplate.sln | 16 ++++++++++++++++ 14 files changed, 44 insertions(+), 77 deletions(-) delete mode 100644 Content.Client/app.config delete mode 100644 Content.Server/app.config delete mode 100644 Content.Shared/app.config create mode 100644 Directory.Packages.props diff --git a/Content.Client/Content.Client.csproj b/Content.Client/Content.Client.csproj index ded98b1..2aaf9d6 100644 --- a/Content.Client/Content.Client.csproj +++ b/Content.Client/Content.Client.csproj @@ -1,21 +1,16 @@ - - $(TargetFramework) - 11 false false ..\bin\Content.Client\ Exe nullable enable - Debug;Release;Tools;DebugOpt - AnyCPU - - + + diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 0cdec0e..7a49fb9 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -15,8 +15,8 @@ public sealed class EntryPoint : GameClient { public override void Init() { - var factory = IoCManager.Resolve(); - var prototypes = IoCManager.Resolve(); + var factory = Dependencies.Resolve(); + var prototypes = Dependencies.Resolve(); factory.DoAutoRegistrations(); @@ -44,9 +44,9 @@ public sealed class EntryPoint : GameClient base.PostInit(); // DEVNOTE: The line below will disable lighting, so you can see in-game sprites without the need for lights - IoCManager.Resolve().Enabled = false; + Dependencies.Resolve().Enabled = false; - var stateManager = IoCManager.Resolve(); + var stateManager = Dependencies.Resolve(); // DEVNOTE: It's recommended to look at how this works! It's for debug purposes and you probably want something prettier for the final game. // Additionally, state manager is the primary way you'll be changing between UIScreen instances. diff --git a/Content.Client/Program.cs b/Content.Client/Program.cs index 3f1e5c0..935aed1 100644 --- a/Content.Client/Program.cs +++ b/Content.Client/Program.cs @@ -5,6 +5,7 @@ namespace Content.Client; internal static class Program { + [STAThread] public static void Main(string[] args) { ContentStart.Start(args); diff --git a/Content.Client/app.config b/Content.Client/app.config deleted file mode 100644 index e1d9d49..0000000 --- a/Content.Client/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Content.Server/Content.Server.csproj b/Content.Server/Content.Server.csproj index 541abef..b6864a0 100644 --- a/Content.Server/Content.Server.csproj +++ b/Content.Server/Content.Server.csproj @@ -1,17 +1,13 @@ - - $(TargetFramework) - latest false false ..\bin\Content.Server\ - true Exe - + diff --git a/Content.Server/EntryPoint.cs b/Content.Server/EntryPoint.cs index 8258874..b39cc69 100644 --- a/Content.Server/EntryPoint.cs +++ b/Content.Server/EntryPoint.cs @@ -13,7 +13,7 @@ public sealed class EntryPoint : GameServer { base.Init(); - var factory = IoCManager.Resolve(); + var factory = Dependencies.Resolve(); factory.DoAutoRegistrations(); @@ -22,7 +22,7 @@ public sealed class EntryPoint : GameServer factory.RegisterIgnore(ignoreName); } - ServerContentIoC.Register(); + ServerContentIoC.Register(Dependencies); IoCManager.BuildGraph(); diff --git a/Content.Server/LocalHostConGroup.cs b/Content.Server/LocalHostConGroup.cs index d6b39a2..bc85b00 100644 --- a/Content.Server/LocalHostConGroup.cs +++ b/Content.Server/LocalHostConGroup.cs @@ -2,7 +2,6 @@ using System.Net; using JetBrains.Annotations; using Robust.Server.Console; -using Robust.Server.Player; using Robust.Shared.Player; using Robust.Shared.Toolshed; using Robust.Shared.Toolshed.Errors; @@ -14,7 +13,10 @@ namespace Content.Server; /// Debug/example ConGroup controller implementation that gives any client connected through localhost every permission. /// [UsedImplicitly] -public sealed class LocalHostConGroup : IConGroupControllerImplementation, IPostInjectInit { +public sealed class LocalHostConGroup : IConGroupControllerImplementation, IPostInjectInit +{ + [Dependency] private readonly IConGroupController _controller = null!; + public bool CanCommand(ICommonSession session, string cmdName) { return IsLocal(session); } @@ -50,7 +52,7 @@ public sealed class LocalHostConGroup : IConGroupControllerImplementation, IPost } void IPostInjectInit.PostInject() { - IoCManager.Resolve().Implementation = this; + _controller.Implementation = this; } private record NotLocalError : IConError diff --git a/Content.Server/ServerContentIoC.cs b/Content.Server/ServerContentIoC.cs index ad48edb..2c9f10f 100644 --- a/Content.Server/ServerContentIoC.cs +++ b/Content.Server/ServerContentIoC.cs @@ -2,9 +2,9 @@ namespace Content.Server; internal static class ServerContentIoC { - public static void Register() + public static void Register(IDependencyCollection dependencies) { // DEVNOTE: IoCManager registrations for the server go here and only here. - IoCManager.Register(); + dependencies.Register(); } } \ No newline at end of file diff --git a/Content.Server/app.config b/Content.Server/app.config deleted file mode 100644 index e1d9d49..0000000 --- a/Content.Server/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Content.Shared/Content.Shared.csproj b/Content.Shared/Content.Shared.csproj index a1bcfc0..5445abe 100644 --- a/Content.Shared/Content.Shared.csproj +++ b/Content.Shared/Content.Shared.csproj @@ -1,16 +1,11 @@ - - - $(TargetFramework) - 11 false - false nullable enable - + @@ -23,6 +18,7 @@ false - + + diff --git a/Content.Shared/EntryPoint.cs b/Content.Shared/EntryPoint.cs index b110718..7a05515 100644 --- a/Content.Shared/EntryPoint.cs +++ b/Content.Shared/EntryPoint.cs @@ -18,12 +18,12 @@ public sealed class EntryPoint : GameShared public override void PreInit() { - IoCManager.InjectDependencies(this); + Dependencies.InjectDependencies(this); // Default to en-US. // DEVNOTE: If you want your game to be multiregional at runtime, you'll need to // do something more complicated here. - IoCManager.Resolve().LoadCulture(new CultureInfo(Culture)); + Dependencies.Resolve().LoadCulture(new CultureInfo(Culture)); // TODO: Document what else you might want to put here } diff --git a/Content.Shared/app.config b/Content.Shared/app.config deleted file mode 100644 index e1d9d49..0000000 --- a/Content.Shared/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..6930a47 --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/RobustTemplate.sln b/RobustTemplate.sln index d1dfb5e..fb1dc2e 100644 --- a/RobustTemplate.sln +++ b/RobustTemplate.sln @@ -61,6 +61,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Content.Packaging", "Conten EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Serialization.Generator", "RobustToolbox\Robust.Serialization.Generator\Robust.Serialization.Generator.csproj", "{066A19F7-7D5B-4C2B-BFC5-DE8C6FD3E186}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Xaml", "RobustToolbox\Robust.Xaml\Robust.Xaml.csproj", "{DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Project Files", "Project Files", "{2B295911-706F-447E-892B-7B7CF13FC30E}" + ProjectSection(SolutionItems) = preProject + Directory.Packages.props = Directory.Packages.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -264,6 +271,14 @@ Global {066A19F7-7D5B-4C2B-BFC5-DE8C6FD3E186}.DebugOpt|Any CPU.Build.0 = Debug|Any CPU {066A19F7-7D5B-4C2B-BFC5-DE8C6FD3E186}.Tools|Any CPU.ActiveCfg = Debug|Any CPU {066A19F7-7D5B-4C2B-BFC5-DE8C6FD3E186}.Tools|Any CPU.Build.0 = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Release|Any CPU.Build.0 = Release|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.DebugOpt|Any CPU.ActiveCfg = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.DebugOpt|Any CPU.Build.0 = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Tools|Any CPU.ActiveCfg = Debug|Any CPU + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB}.Tools|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A829DE3-FCB2-4FEA-A6F3-B85122C8D11E} = {F5F87A9D-C304-4833-B107-D666317F6931} @@ -290,5 +305,6 @@ Global {81E28D82-BB23-44C7-AFFC-6CC1BB04CDF5} = {F5F87A9D-C304-4833-B107-D666317F6931} {D7F76B45-DAF9-49E1-A910-632DB0BDF471} = {F5F87A9D-C304-4833-B107-D666317F6931} {066A19F7-7D5B-4C2B-BFC5-DE8C6FD3E186} = {F5F87A9D-C304-4833-B107-D666317F6931} + {DBF1DF9E-6359-4179-9AB9-F38E5A348ABB} = {F5F87A9D-C304-4833-B107-D666317F6931} EndGlobalSection EndGlobal