mirror of
https://github.com/space-wizards/RobustToolboxTemplate.git
synced 2026-02-10 16:24:49 -05:00
ohno
This commit is contained in:
parent
5bec4a5921
commit
50c6173d91
14 changed files with 261 additions and 8 deletions
41
Content.Server/EntryPoint.cs
Normal file
41
Content.Server/EntryPoint.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server
|
||||
{
|
||||
public class EntryPoint: GameServer
|
||||
{
|
||||
public override void Init() {
|
||||
base.Init();
|
||||
|
||||
var factory = IoCManager.Resolve<IComponentFactory>();
|
||||
|
||||
factory.DoAutoRegistrations();
|
||||
|
||||
foreach (var ignoreName in IgnoredComponents.List)
|
||||
{
|
||||
factory.RegisterIgnore(ignoreName);
|
||||
}
|
||||
|
||||
ServerContentIoC.Register();
|
||||
|
||||
IoCManager.BuildGraph();
|
||||
|
||||
// DEVNOTE: This is generally where you'll be setting up the IoCManager further.
|
||||
}
|
||||
|
||||
public override void PostInit()
|
||||
{
|
||||
base.PostInit();
|
||||
// DEVNOTE: Can also initialize IoC stuff more here.
|
||||
}
|
||||
|
||||
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
|
||||
{
|
||||
base.Update(level, frameEventArgs);
|
||||
// DEVNOTE: Game update loop goes here. Usually you'll want some independent GameTicker.
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Content.Server/IgnoredComponents.cs
Normal file
9
Content.Server/IgnoredComponents.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
namespace Content.Server
|
||||
{
|
||||
public static class IgnoredComponents
|
||||
{
|
||||
public static string[] List => new string[] {
|
||||
// Stick components you want ignored here.
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -4,9 +4,6 @@ namespace Content.Server
|
|||
{
|
||||
internal static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
ContentStart.Start(args);
|
||||
}
|
||||
public static void Main(string[] args) => ContentStart.Start(args);
|
||||
}
|
||||
}
|
||||
12
Content.Server/ServerContentIoC.cs
Normal file
12
Content.Server/ServerContentIoC.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server
|
||||
{
|
||||
internal static class ServerContentIoC
|
||||
{
|
||||
public static void Register()
|
||||
{
|
||||
// DEVNOTE: IoCManager registrations for the server go here and only here.
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Content.Server/app.config
Normal file
15
Content.Server/app.config
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Loading…
Add table
Add a link
Reference in a new issue