mirror of
https://github.com/space-wizards/RobustToolboxTemplate.git
synced 2026-10-24 06:12:50 -04:00
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:
parent
b417f4355e
commit
729c2a6206
18 changed files with 197 additions and 272 deletions
|
|
@ -3,43 +3,42 @@ using Robust.Shared.GameObjects;
|
|||
using Robust.Shared.IoC;
|
||||
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.
|
||||
namespace Content.Server
|
||||
// DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file.
|
||||
namespace Content.Server;
|
||||
|
||||
public class EntryPoint : GameServer
|
||||
{
|
||||
public class EntryPoint : GameServer
|
||||
public override void Init()
|
||||
{
|
||||
public override void Init()
|
||||
base.Init();
|
||||
|
||||
var factory = IoCManager.Resolve<IComponentFactory>();
|
||||
|
||||
factory.DoAutoRegistrations();
|
||||
|
||||
foreach (var ignoreName in IgnoredComponents.List)
|
||||
{
|
||||
base.Init();
|
||||
factory.RegisterIgnore(ignoreName);
|
||||
}
|
||||
|
||||
var factory = IoCManager.Resolve<IComponentFactory>();
|
||||
ServerContentIoC.Register();
|
||||
|
||||
factory.DoAutoRegistrations();
|
||||
|
||||
foreach (var ignoreName in IgnoredComponents.List)
|
||||
{
|
||||
factory.RegisterIgnore(ignoreName);
|
||||
}
|
||||
|
||||
ServerContentIoC.Register();
|
||||
|
||||
IoCManager.BuildGraph();
|
||||
IoCManager.BuildGraph();
|
||||
|
||||
factory.GenerateNetIds();
|
||||
factory.GenerateNetIds();
|
||||
|
||||
// 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.
|
||||
}
|
||||
// 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.
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue