Files
tbd-station-14/Content.Server/EntryPoint.cs
DrSmugleaf dd385a0511 Change all of body system to use entities and components (#2074)
* Early commit

* Early commit 2

* merging master broke my git

* does anyone even read these

* life is fleeting

* it just works

* this time passing integration tests

* Remove hashset yaml serialization for now

* You got a license for those nullables?

* No examine, no context menu, part and mechanism parenting and visibility

* Fix wrong brain sprite state

* Removing layers was a mistake

* just tear body system a new one and see if it still breathes

* Remove redundant code

* Add that comment back

* Separate damage and body, component states, stomach rework

* Add containers for body parts

* Bring layers back pls

* Fix parts magically changing color

* Reimplement sprite layer visibility

* Fix tests

* Add leg test

* Active legs is gone

Crab rave

* Merge fixes, rename DamageState to CurrentState

* Remove IShowContextMenu and ICanExamine
2020-10-10 15:25:13 +02:00

97 lines
3.0 KiB
C#

using Content.Server.AI.Utility.Considerations;
using Content.Server.AI.WorldState;
using Content.Server.Database;
using Content.Server.GameObjects.Components.Mobs.Speech;
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
using Content.Server.Interfaces;
using Content.Server.Interfaces.Chat;
using Content.Server.Interfaces.GameTicking;
using Content.Server.Interfaces.PDA;
using Content.Server.Sandbox;
using Content.Shared.Kitchen;
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;
/// <inheritdoc />
public override void Init()
{
base.Init();
var factory = IoCManager.Resolve<IComponentFactory>();
factory.DoAutoRegistrations();
foreach (var ignoreName in IgnoredComponents.List)
{
factory.RegisterIgnore(ignoreName);
}
ServerContentIoC.Register();
if (TestingCallbacks != null)
{
var cast = (ServerModuleTestingCallbacks) TestingCallbacks;
cast.ServerBeforeIoC?.Invoke();
}
IoCManager.BuildGraph();
_gameTicker = IoCManager.Resolve<IGameTicker>();
IoCManager.Resolve<IServerNotifyManager>().Initialize();
IoCManager.Resolve<IChatManager>().Initialize();
var playerManager = IoCManager.Resolve<IPlayerManager>();
_statusShell = new StatusShell();
var logManager = IoCManager.Resolve<ILogManager>();
logManager.GetSawmill("Storage").Level = LogLevel.Info;
IoCManager.Resolve<IConnectionManager>().Initialize();
IoCManager.Resolve<IServerDbManager>().Init();
IoCManager.Resolve<IServerPreferencesManager>().Init();
IoCManager.Resolve<INodeGroupFactory>().Initialize();
IoCManager.Resolve<ISandboxManager>().Initialize();
IoCManager.Resolve<IAccentManager>().Initialize();
}
public override void PostInit()
{
base.PostInit();
_gameTicker.Initialize();
IoCManager.Resolve<RecipeManager>().Initialize();
IoCManager.Resolve<BlackboardManager>().Initialize();
IoCManager.Resolve<ConsiderationsManager>().Initialize();
IoCManager.Resolve<IPDAUplinkManager>().Initialize();
}
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
{
base.Update(level, frameEventArgs);
switch (level)
{
case ModUpdateLevel.PreEngine:
{
_gameTicker.Update(frameEventArgs);
break;
}
}
}
}
}