using Content.Server.Chat;
using Content.Server.GameTicking;
using Content.Server.Interfaces;
using Content.Server.Interfaces.Chat;
using Content.Server.Interfaces.GameTicking;
using Content.Server.Sandbox;
using Content.Shared.Interfaces;
using Robust.Server.Interfaces.Player;
using Robust.Shared.ContentPack;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Log;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Timing;
namespace Content.Server
{
public class EntryPoint : GameServer
{
private IGameTicker _gameTicker;
private StatusShell _statusShell;
///
public override void Init()
{
base.Init();
var factory = IoCManager.Resolve();
factory.DoAutoRegistrations();
var registerIgnore = new[]
{
"ConstructionGhost",
"IconSmooth",
"SubFloorHide",
"LowWall",
"Window",
"CharacterInfo",
};
foreach (var ignoreName in registerIgnore)
{
factory.RegisterIgnore(ignoreName);
}
IoCManager.Register();
IoCManager.Register();
IoCManager.Register();
IoCManager.Register();
IoCManager.Register();
IoCManager.Register();
if (TestingCallbacks != null)
{
var cast = (ServerModuleTestingCallbacks) TestingCallbacks;
cast.ServerBeforeIoC?.Invoke();
}
IoCManager.BuildGraph();
_gameTicker = IoCManager.Resolve();
IoCManager.Resolve().Initialize();
IoCManager.Resolve().Initialize();
var playerManager = IoCManager.Resolve();
_statusShell = new StatusShell();
var logManager = IoCManager.Resolve();
logManager.GetSawmill("Storage").Level = LogLevel.Info;
}
public override void PostInit()
{
base.PostInit();
_gameTicker.Initialize();
IoCManager.Resolve().Initialize();
}
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
{
base.Update(level, frameEventArgs);
_gameTicker.Update(frameEventArgs);
}
}
}