From 4335a5e8978d8d711aed0cfb843198f153887e6e Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Fri, 16 Apr 2021 11:24:56 +0200 Subject: [PATCH] Add some clarifications --- Content.Client/EntryPoint.cs | 22 +++++++++++++++++++--- Content.Shared/EntryPoint.cs | 4 +++- README.md | 4 +++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index c590d00..91ebb9c 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -1,3 +1,4 @@ +using Robust.Client; using Robust.Shared.ContentPack; using Robust.Shared.GameObjects; using Robust.Shared.IoC; @@ -30,15 +31,30 @@ namespace Content.Client IoCManager.BuildGraph(); // DEVNOTE: This is generally where you'll be setting up the IoCManager further. - - IoCManager.InjectDependencies(this); } public override void PostInit() { base.PostInit(); - // DEVNOTE: Further setup, this is the spot you should start trying to connect to the server from. + // DEVNOTE: Further setup... + var client = IoCManager.Resolve(); + + // DEVNOTE: You might want a main menu to connect to a server, or start a singleplayer game. + // Be sure to check out StateManager for this! Below you'll find examples to start a game. + + // If you want to connect to a server... + // client.ConnectToServer("ip-goes-here", 1212); + + // Optionally, singleplayer also works! + // client.StartSinglePlayer(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + // DEVNOTE: You might want to do a proper shutdown here. } public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs) diff --git a/Content.Shared/EntryPoint.cs b/Content.Shared/EntryPoint.cs index c2c3b38..9056cb8 100644 --- a/Content.Shared/EntryPoint.cs +++ b/Content.Shared/EntryPoint.cs @@ -7,7 +7,9 @@ namespace Content.Shared { public class EntryPoint : GameShared { - // See line 25. Controls the default game culture and language. + // IoC services shared between the client and the server go here... + + // See line 23. Controls the default game culture and language. // Robust calls this culture, but you might find it more fitting to call it the game // language. Robust doesn't support changing this mid-game. Load your config file early // if you want that. diff --git a/README.md b/README.md index 13cbb3e..c77552d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ ### Robust Toolbox Template Project! -This is a template project for RobustToolbox, to help bootstrap the whole thing. Good luck. +This is a multiplayer (with optional singleplayer!) template project for RobustToolbox, to help bootstrap the whole thing. Good luck. + +Also check out our [singleplayer-only template](https://github.com/space-wizards/RobustToolboxTemplate/tree/singleplayer) \ No newline at end of file